mesa: Make gl_VertexID be a system value like gl_InstanceID.
authorEric Anholt <eric@anholt.net>
Tue, 8 Nov 2011 22:49:07 +0000 (14:49 -0800)
committerEric Anholt <eric@anholt.net>
Fri, 11 Nov 2011 16:27:51 +0000 (08:27 -0800)
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
src/glsl/builtin_variables.cpp
src/mesa/main/mtypes.h

index 0d804c2b6eebea430fedd203eaa2ca52b8ff14f0..ed6b922ca62473b3a505a954222f917f69365ff8 100644 (file)
@@ -98,7 +98,7 @@ static const builtin_variable builtin_120_fs_variables[] = {
 };
 
 static const builtin_variable builtin_130_vs_variables[] = {
-   { ir_var_in,  -1,                 "int",   "gl_VertexID" },
+   { ir_var_system_value,  SYSTEM_VALUE_VERTEX_ID, "int",   "gl_VertexID" },
 };
 
 static const builtin_variable builtin_110_deprecated_uniforms[] = {
index adcbaeb198642fdacfc08b7049fac179c97dff59..deab97d3ec4ccdf58c4973fa803cdf8321b75170 100644 (file)
@@ -1798,6 +1798,7 @@ typedef enum
 typedef enum
 {
    SYSTEM_VALUE_FRONT_FACE,  /**< Fragment shader only (not done yet) */
+   SYSTEM_VALUE_VERTEX_ID,   /**< Vertex shader only */
    SYSTEM_VALUE_INSTANCE_ID, /**< Vertex shader only */
    SYSTEM_VALUE_MAX          /**< Number of values */
 } gl_system_value;