[Mesa-dev] [PATCH 07/13] mesa: Add SYSTEM_VALUE_BASE_VERTEX
Ian Romanick
idr at freedesktop.org
Fri Jun 20 18:00:57 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
This system value represents the basevertex value passed to
glDrawElementsBaseVertex and related functions.
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
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 91f29a8..c66a16a 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2059,7 +2059,12 @@ typedef enum
* gl_VertexID gets basevertex added in. This differs from DirectX where
* it's equivalent to gl_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,
@@ -2101,6 +2106,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 5e4b497..f7b0b6b 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4241,6 +4241,7 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
TGSI_SEMANTIC_VERTEXID,
TGSI_SEMANTIC_INSTANCEID,
0,
+ 0,
/* Geometry shader
*/
--
1.8.1.4
More information about the mesa-dev
mailing list