linker: Make invalidate_variable_locations available outside the compilation unit
authorIan Romanick <ian.d.romanick@intel.com>
Tue, 11 Oct 2011 23:15:47 +0000 (16:15 -0700)
committerIan Romanick <ian.d.romanick@intel.com>
Mon, 7 Nov 2011 21:33:15 +0000 (13:33 -0800)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Tom Stellard <thomas.stellard@amd.com>
src/glsl/linker.cpp
src/glsl/linker.h

index 915d5bbcf7dd091ef47dc0c1c9c5a07a45a81d04..32f4ca714644743dbf11de30ac77abcbc56ebc2b 100644 (file)
@@ -191,8 +191,8 @@ linker_warning(gl_shader_program *prog, const char *fmt, ...)
 
 
 void
-invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode,
-                             int generic_base)
+link_invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode,
+                                  int generic_base)
 {
    foreach_list(node, sh->ir) {
       ir_variable *const var = ((ir_instruction *) node)->as_variable();
@@ -1337,7 +1337,7 @@ assign_attribute_or_color_locations(gl_shader_program *prog,
       (target_index == MESA_SHADER_VERTEX) ? ir_var_in : ir_var_out;
 
 
-   invalidate_variable_locations(sh, direction, generic_base);
+   link_invalidate_variable_locations(sh, direction, generic_base);
 
    /* Temporary storage for the set of attributes that need locations assigned.
     */
@@ -1539,8 +1539,8 @@ assign_varying_locations(struct gl_context *ctx,
     *    not being inputs.  This lets the optimizer eliminate them.
     */
 
-   invalidate_variable_locations(producer, ir_var_out, VERT_RESULT_VAR0);
-   invalidate_variable_locations(consumer, ir_var_in, FRAG_ATTRIB_VAR0);
+   link_invalidate_variable_locations(producer, ir_var_out, VERT_RESULT_VAR0);
+   link_invalidate_variable_locations(consumer, ir_var_in, FRAG_ATTRIB_VAR0);
 
    foreach_list(node, producer->ir) {
       ir_variable *const output_var = ((ir_instruction *) node)->as_variable();
index 78c63296133c7c501878c6351a1b58a8fe25adda..669549bf0c54eea74f20649024e8697800dbacc4 100644 (file)
@@ -30,6 +30,10 @@ extern bool
 link_function_calls(gl_shader_program *prog, gl_shader *main,
                    gl_shader **shader_list, unsigned num_shaders);
 
+extern void
+link_invalidate_variable_locations(gl_shader *sh, enum ir_variable_mode mode,
+                                  int generic_base);
+
 /**
  * Class for processing all of the leaf fields of an uniform
  *