glsl: Lower UBO and SSBO access in glsl linker
All GLSL IR consumers run this lowering pass so we can move it to the linker. This moves the pass up quite a bit, but that's the point: it needs to run before we throw away information about per-component vector access. Reviewed-by: Iago Toral Quiroga <itoral@igalia.com> Reviewed-by: Jordan Justen <jordan.l.justen@intel.com> Signed-off-by: Kristian Høgsberg Kristensen <krh@bitplanet.net>
This commit is contained in:
@@ -4445,6 +4445,14 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
|
||||
|
||||
/* FINISHME: Assign fragment shader output locations. */
|
||||
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
if (prog->_LinkedShaders[i] == NULL)
|
||||
continue;
|
||||
|
||||
if (ctx->Const.ShaderCompilerOptions[i].LowerBufferInterfaceBlocks)
|
||||
lower_ubo_reference(prog->_LinkedShaders[i]);
|
||||
}
|
||||
|
||||
done:
|
||||
for (unsigned i = 0; i < MESA_SHADER_STAGES; i++) {
|
||||
free(shader_list[i]);
|
||||
|
||||
Reference in New Issue
Block a user