summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2010-06-23 12:09:14 -0700
committerIan Romanick <ian.d.romanick@intel.com>2010-06-23 12:09:14 -0700
commited1fe3db3b871a6aa48d49b46fa22938b2784bdc (patch)
tree14e30651c145f2b62740e89d7455a46b53ed1133
parentf36460e1a7de3bd311135673b3d5b60f3a8655da (diff)
linker: Refactor parameters to cross_validate_uniforms
-rw-r--r--linker.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/linker.cpp b/linker.cpp
index 4d1ff01..bdc4c57 100644
--- a/linker.cpp
+++ b/linker.cpp
@@ -250,15 +250,14 @@ validate_fragment_shader_executable(struct glsl_program *prog,
* Perform validation of uniforms used across multiple shader stages
*/
bool
-cross_validate_uniforms(struct glsl_program *prog,
- struct glsl_shader **shaders, unsigned num_shaders)
+cross_validate_uniforms(struct glsl_program *prog)
{
/* Examine all of the uniforms in all of the shaders and cross validate
* them.
*/
glsl_symbol_table uniforms;
- for (unsigned i = 0; i < num_shaders; i++) {
- foreach_list(node, &shaders[i]->ir) {
+ for (unsigned i = 0; i < prog->_NumLinkedShaders; i++) {
+ foreach_list(node, &prog->_LinkedShaders[i]->ir) {
ir_variable *const var = ((ir_instruction *) node)->as_variable();
if ((var == NULL) || (var->mode != ir_var_uniform))
@@ -829,8 +828,7 @@ link_shaders(struct glsl_program *prog)
prog->_NumLinkedShaders++;
}
- if (cross_validate_uniforms(prog, prog->_LinkedShaders,
- prog->_NumLinkedShaders)) {
+ if (cross_validate_uniforms(prog)) {
/* Validate the inputs of each stage with the output of the preceeding
* stage.
*/