aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/linker.cpp
diff options
context:
space:
mode:
authorJordan Justen <[email protected]>2015-07-28 14:45:56 -0700
committerJordan Justen <[email protected]>2015-12-09 23:50:38 -0800
commit1078d712d7ef8e07b772231e768898a04a066e06 (patch)
tree3ab8915481d9fcc7e88497f0fa1ad804c6dfc413 /src/glsl/linker.cpp
parentf22ab2e8b3dbd7dfdada0d353da1c6ef898f1494 (diff)
glsl: Add lowering pass for shared variable references
In this lowering pass, shared variables are decomposed into intrinsic calls. v2: * Send mem_ctx as a parameter (Iago) v3: * Shared variables don't have an associated interface block (Iago) * Always use 430 packing (Iago) * Comment / whitespace cleanup (Iago) Signed-off-by: Jordan Justen <[email protected]> Reviewed-by: Iago Toral Quiroga <[email protected]> Reviewed-by: Kristian Høgsberg <[email protected]>
Diffstat (limited to 'src/glsl/linker.cpp')
-rw-r--r--src/glsl/linker.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/glsl/linker.cpp b/src/glsl/linker.cpp
index ae628cd86bd..a87bbb2b994 100644
--- a/src/glsl/linker.cpp
+++ b/src/glsl/linker.cpp
@@ -4607,6 +4607,10 @@ link_shaders(struct gl_context *ctx, struct gl_shader_program *prog)
if (ctx->Const.ShaderCompilerOptions[i].LowerBufferInterfaceBlocks)
lower_ubo_reference(prog->_LinkedShaders[i]);
+ if (ctx->Const.ShaderCompilerOptions[i].LowerShaderSharedVariables)
+ lower_shared_reference(prog->_LinkedShaders[i],
+ &prog->Comp.SharedSize);
+
lower_vector_derefs(prog->_LinkedShaders[i]);
}