summaryrefslogtreecommitdiffstats
path: root/src/glsl/link_uniforms.cpp
diff options
context:
space:
mode:
authorEric Anholt <[email protected]>2012-07-20 16:57:22 -0700
committerEric Anholt <[email protected]>2012-08-07 11:47:49 -0700
commit71ba6de342b88dcf8ed3aa347da157b7724230e7 (patch)
tree38908552780c9c4525edcf6652c3f4b9368f0909 /src/glsl/link_uniforms.cpp
parent7e42302e7188a783221d2b17a4bb07ee89cae367 (diff)
glsl: Fix a reference to UniformBlocks during uniform linking.
When converting var->location from pointing at the program's UniformBlocks to pointing at the linked shader's UniformBlocks, I missed this change. It usually worked out in the end because the two lists happen to be the same in many testcases. Fixes a valgrind complaint on oglconform ubo-compile.cpp advanced.std140.2stage Reviewed-by: Ian Romanick <[email protected]> Reviewed-by: Kenneth Graunke <[email protected]>
Diffstat (limited to 'src/glsl/link_uniforms.cpp')
-rw-r--r--src/glsl/link_uniforms.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/glsl/link_uniforms.cpp b/src/glsl/link_uniforms.cpp
index 1baa46c5d52..1c975863c0d 100644
--- a/src/glsl/link_uniforms.cpp
+++ b/src/glsl/link_uniforms.cpp
@@ -223,13 +223,13 @@ public:
this->shader_shadow_samplers = 0;
}
- void set_and_process(struct gl_shader_program *prog,
+ void set_and_process(struct gl_shader *shader,
ir_variable *var)
{
ubo_var = NULL;
if (var->uniform_block != -1) {
struct gl_uniform_block *block =
- &prog->UniformBlocks[var->uniform_block];
+ &shader->UniformBlocks[var->uniform_block];
ubo_block_index = var->uniform_block;
ubo_var_index = var->location;
@@ -598,7 +598,7 @@ link_assign_uniform_locations(struct gl_shader_program *prog)
if (strncmp("gl_", var->name, 3) == 0)
continue;
- parcel.set_and_process(prog, var);
+ parcel.set_and_process(prog->_LinkedShaders[i], var);
}
prog->_LinkedShaders[i]->active_samplers = parcel.shader_samplers_used;