[Mesa-dev] [PATCH 3/6] mesa: Make gl_VertexID be a system value like gl_InstanceID.
Eric Anholt
eric at anholt.net
Wed Nov 9 11:33:26 PST 2011
---
src/glsl/builtin_variables.cpp | 2 +-
src/mesa/main/mtypes.h | 1 +
2 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/src/glsl/builtin_variables.cpp b/src/glsl/builtin_variables.cpp
index 0d804c2..ed6b922 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 ae6a33e..9ec06d6 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -1793,6 +1793,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;
--
1.7.7
More information about the mesa-dev
mailing list