From: Eric Anholt Date: Tue, 8 Nov 2011 22:49:07 +0000 (-0800) Subject: mesa: Make gl_VertexID be a system value like gl_InstanceID. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=919c53e87a1f6f5322bc1f1486bb3e6b954b00d5;p=mesa.git mesa: Make gl_VertexID be a system value like gl_InstanceID. Reviewed-by: Ian Romanick --- diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp index 0d804c2b6ee..ed6b922ca62 100644 --- a/src/glsl/builtin_variables.cpp +++ b/src/glsl/builtin_variables.cpp @@ -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[] = { diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index adcbaeb1986..deab97d3ec4 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -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;