aboutsummaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
authorIan Romanick <[email protected]>2012-04-06 14:06:13 -0700
committerIan Romanick <[email protected]>2012-05-23 11:41:49 -0700
commita2e623054b5d8eafebc7499efe93e4bceae16ead (patch)
tree2faf92102faadd7f3113bd87bcc74d7f93335377 /src/glsl/link_uniforms.cpp
parent29362875f2613ad87abe7725ce3c56c36d16cf9b (diff)
glsl: Set initial values for uniforms in the linker
v2: Fix handling of arrays-of-structure. Thanks to Eric Anholt for pointing this out. v3: Minor comment change based on feedback from Ken. Fixes piglit glsl-1.20/execution/uniform-initializer/fs-structure-array and glsl-1.20/execution/uniform-initializer/vs-structure-array. Signed-off-by: Ian Romanick <[email protected]> Reviewed-by: Eric Anholt <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r--src/glsl/link_uniforms.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 2f1c9f5f70f..81a995e92bd 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -426,5 +426,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
prog->NumUserUniformStorage = num_user_uniforms;
prog->UniformStorage = uniforms;
+ link_set_uniform_initializers(prog);
+
return;
}