summaryrefslogtreecommitdiff
path: root/src/glsl/linker.h
diff options
context:
space:
mode:
authorIan Romanick <ian.d.romanick@intel.com>2013-10-04 10:46:29 -0700
committerIan Romanick <ian.d.romanick@intel.com>2013-10-22 15:23:30 -0700
commit63974c0f5b26e369a790505af6820d4bbcf451b2 (patch)
tree227b453fc6e459d5cb04ae6a5baad96c5454134f /src/glsl/linker.h
parent1eee0a9f016a1049869f4677f5919186ee3785a2 (diff)
glsl: Simplify the interface to link_invalidate_variable_locations
The unit tests added in the previous commits prove some things about the state of some internal data structures. The most important of these is that all built-in input and output variables have explicit_location set. This means that link_invalidate_variable_locations doesn't need to know the range of non-generic shader inputs or outputs. It can simply reset location state depending on whether explicit_location is set. There are two additional assumptions that were already implicit in the code that comments now document. - ir_variable::is_unmatched_generic_inout is only used by the linker when connecting outputs from one shader stage to inputs of another shader stage. - Any varying that has explicit_location set must be a built-in. This will be true until GL_ARB_separate_shader_objects is supported. As a result, the input_base and output_base parameters to link_invalidate_variable_locations are no longer necessary, and the code for resetting locations and setting is_unmatched_generic_inout can be simplified. Signed-off-by: Ian Romanick <ian.d.romanick@intel.com> Reviewed-by: Paul Berry <stereotype441@gmail.com>
Diffstat (limited to 'src/glsl/linker.h')
-rw-r--r--src/glsl/linker.h3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/glsl/linker.h b/src/glsl/linker.h
index 9915c38b01e..887cd33d1cd 100644
--- a/src/glsl/linker.h
+++ b/src/glsl/linker.h
@@ -31,8 +31,7 @@ link_function_calls(gl_shader_program *prog, gl_shader *main,
gl_shader **shader_list, unsigned num_shaders);
extern void
-link_invalidate_variable_locations(exec_list *ir, int input_base,
- int output_base);
+link_invalidate_variable_locations(exec_list *ir);
extern void
link_assign_uniform_locations(struct gl_shader_program *prog);