mesa: Add SYSTEM_VALUE_BASE_VERTEX
authorIan Romanick <ian.d.romanick@intel.com>
Fri, 20 Jun 2014 23:11:50 +0000 (16:11 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Wed, 10 Sep 2014 18:04:50 +0000 (11:04 -0700)
This system value represents the basevertex value passed to
glDrawElementsBaseVertex and related functions.

Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Kenneth Graunke <kenneth@whitecape.org>
Reviewed-by: Tapani Pälli <tapani.palli@intel.com>
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index 32e308a6172008c62aae5cce095a01b112bacb35..05534dba2886665b1b41da263a1035fb036d305d 100644 (file)
@@ -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,
    /*@}*/
 
    /**
index 18354605f8f58eba109d408414d8b7872d38fcf8..7c2f0fca03c311819aa5f5b5c378dafd47945cf5 100644 (file)
@@ -4168,6 +4168,7 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
    TGSI_SEMANTIC_VERTEXID,
    TGSI_SEMANTIC_INSTANCEID,
    0,
+   0,
 
    /* Geometry shader
     */