diff options
author | Ian Romanick <[email protected]> | 2014-06-18 18:08:20 -0700 |
---|---|---|
committer | Ian Romanick <[email protected]> | 2014-09-12 16:46:28 -0700 |
commit | 73192345c333cb7cfcc6210bf085b6d87bdee423 (patch) | |
tree | 7964ab7bd8b2da55423a04b39dc9de4fae2afa20 /src | |
parent | 6bc4331c8ec18c5116bb72e4e1201c11fa729a53 (diff) |
mesa: Add SYSTEM_VALUE_VERTEX_ID_ZERO_BASE
There exists hardware, such as i965, that does not implement the OpenGL
semantic for gl_VertexID. Instead, that hardware does not include the
value of basevertex in the gl_VertexID value.
SYSTEM_VALUE_VERTEX_ID_ZERO_BASE is the system value that represents
this semantic.
Signed-off-by: Ian Romanick <[email protected]>
Reviewed-by: Kenneth Graunke <[email protected]>
Reviewed-by: Tapani Pälli <[email protected]>
(cherry picked from commit 5964a4f344fa4fd631bcccf67c065b9e66b94108)
Diffstat (limited to 'src')
-rw-r--r-- | src/mesa/main/mtypes.h | 12 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 |
2 files changed, 13 insertions, 0 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 933528ad146..b374aa2b138 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2083,6 +2083,8 @@ typedef enum * * gl_VertexID gets basevertex added in. This differs from DirectX where * SV_VertexID does \b not get basevertex added in. + * + * \sa SYSTEM_VALUE_VERTEX_ID_ZERO_BASE */ SYSTEM_VALUE_VERTEX_ID, @@ -2114,6 +2116,16 @@ typedef enum * Note that baseinstance is \b not included in the value of instance. */ SYSTEM_VALUE_INSTANCE_ID, + + /** + * DirectX-style vertex ID. + * + * Unlike \c SYSTEM_VALUE_VERTEX_ID, this system value does \b not include + * the value of basevertex. + * + * \sa SYSTEM_VALUE_VERTEX_ID, SYSTEM_VALUE_BASE_VERTEX + */ + SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, /*@}*/ /** diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index a0c89c46fa4..80a049a59c2 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4202,6 +4202,7 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = { */ TGSI_SEMANTIC_VERTEXID, TGSI_SEMANTIC_INSTANCEID, + 0, /* Geometry shader */ |