From 1e87fbd78f15f262b3dd2cbc16099e9f484c42a0 Mon Sep 17 00:00:00 2001 From: Ian Romanick Date: Fri, 20 Jun 2014 16:11:50 -0700 Subject: [PATCH] mesa: Add SYSTEM_VALUE_BASE_VERTEX MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit This system value represents the basevertex value passed to glDrawElementsBaseVertex and related functions. Signed-off-by: Ian Romanick Reviewed-by: Kenneth Graunke Reviewed-by: Tapani Pälli --- src/mesa/main/mtypes.h | 15 ++++++++++++++- src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 1 + 2 files changed, 15 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h index 32e308a6172..05534dba288 100644 --- a/src/mesa/main/mtypes.h +++ b/src/mesa/main/mtypes.h @@ -2084,7 +2084,12 @@ 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 + * \note + * If all system values are available, \c SYSTEM_VALUE_VERTEX_ID will be + * equal to \c SYSTEM_VALUE_VERTEX_ID_ZERO_BASE plus + * \c SYSTEM_VALUE_BASE_VERTEX. + * + * \sa SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, SYSTEM_VALUE_BASE_VERTEX */ SYSTEM_VALUE_VERTEX_ID, @@ -2126,6 +2131,14 @@ typedef enum * \sa SYSTEM_VALUE_VERTEX_ID, SYSTEM_VALUE_BASE_VERTEX */ SYSTEM_VALUE_VERTEX_ID_ZERO_BASE, + + /** + * Value of \c basevertex passed to \c glDrawElementsBaseVertex and similar + * functions. + * + * \sa SYSTEM_VALUE_VERTEX_ID, SYSTEM_VALUE_VERTEX_ID_ZERO_BASE + */ + SYSTEM_VALUE_BASE_VERTEX, /*@}*/ /** diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp index 18354605f8f..7c2f0fca03c 100644 --- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp +++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp @@ -4168,6 +4168,7 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = { TGSI_SEMANTIC_VERTEXID, TGSI_SEMANTIC_INSTANCEID, 0, + 0, /* Geometry shader */ -- 2.30.2