[Mesa-dev] [PATCH 01/19] glsl: Construct gl_in with a location of -1.

Paul Berry stereotype441 at gmail.com
Wed Oct 2 17:45:14 PDT 2013


We use a location of -1 for variables which don't have their own
assigned locations--this includes ir_variables which represent named
interface blocks.  Technically the location assigned to gl_in doesn't
matter, since gl_in is only accessed via its members (which have their
own locations).  But it's nice to be consistent.
---
 src/glsl/builtin_variables.cpp | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 7ab120a..3667dc8 100644
--- a/src/glsl/builtin_variables.cpp
+++ b/src/glsl/builtin_variables.cpp
@@ -829,7 +829,7 @@ builtin_variable_generator::generate_varyings()
                                            GLSL_INTERFACE_PACKING_STD140,
                                            "gl_in");
       ir_variable *var = add_variable("gl_in", array(per_vertex_type, 0),
-                                      ir_var_shader_in, 0);
+                                      ir_var_shader_in, -1);
       var->init_interface_type(per_vertex_type);
    }
 }
-- 
1.8.4



More information about the mesa-dev mailing list