diff options
author | Kristian Høgsberg Kristensen <[email protected]> | 2015-11-04 14:55:32 -0800 |
---|---|---|
committer | Kristian Høgsberg Kristensen <[email protected]> | 2015-11-10 12:02:46 -0800 |
commit | 60dd5287ff8dbbbe0dbe76bdff6d13c7a5ea9ef0 (patch) | |
tree | 619e689c9bd104ac3ab806d7e92ca39d4dd61c6d /src/glsl | |
parent | f0e95c2500fdb720d4102976f17361c294e1f3a3 (diff) |
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 <[email protected]>
Reviewed-by: Jordan Justen <[email protected]>
Signed-off-by: Kristian Høgsberg Kristensen <[email protected]>
Diffstat (limited to 'src/glsl')
-rw-r--r-- | src/glsl/linker.cpp | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp index 26c02986be4..a8baee07f10 100644 --- a/src/glsl/linker.cpp +++ b/src/glsl/linker.cpp @@ -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]); |