mesa: Group gl_system_value values by the stage where they exist
authorIan Romanick <ian.d.romanick@intel.com>
Wed, 18 Jun 2014 22:48:36 +0000 (15:48 -0700)
committerKenneth Graunke <kenneth@whitecape.org>
Thu, 7 Aug 2014 22:19:59 +0000 (15:19 -0700)
Signed-off-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/main/mtypes.h
src/mesa/state_tracker/st_glsl_to_tgsi.cpp

index f5ce360e4e3d5c0378afbf0f90bb9520bffb9db1..ff130da15d0eb924dab985d896e0d61872d092f1 100644 (file)
@@ -2051,13 +2051,31 @@ 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_SAMPLE_ID,      /**< Fragment shader only */
-   SYSTEM_VALUE_SAMPLE_POS,     /**< Fragment shader only */
-   SYSTEM_VALUE_SAMPLE_MASK_IN, /**< Fragment shader only */
-   SYSTEM_VALUE_INVOCATION_ID,  /**< Geometry shader only */
+   /**
+    * \name Vertex shader system values
+    */
+   /*@{*/
+   SYSTEM_VALUE_VERTEX_ID,
+   SYSTEM_VALUE_INSTANCE_ID,
+   /*@}*/
+
+   /**
+    * \name Geometry shader system values
+    */
+   /*@{*/
+   SYSTEM_VALUE_INVOCATION_ID,
+   /*@}*/
+
+   /**
+    * \name Fragment shader system values
+    */
+   /*@{*/
+   SYSTEM_VALUE_FRONT_FACE,     /**< (not done yet) */
+   SYSTEM_VALUE_SAMPLE_ID,
+   SYSTEM_VALUE_SAMPLE_POS,
+   SYSTEM_VALUE_SAMPLE_MASK_IN,
+   /*@}*/
+
    SYSTEM_VALUE_MAX             /**< Number of values */
 } gl_system_value;
 
index b4638dd6f5ec1fcfac94816aeac05b98ca7bc4fd..35c4b1b24103d29be1ed1bf8ab26d78b135e2df6 100644 (file)
@@ -4239,13 +4239,21 @@ struct st_translate {
 
 /** Map Mesa's SYSTEM_VALUE_x to TGSI_SEMANTIC_x */
 const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
-   TGSI_SEMANTIC_FACE,
+   /* Vertex shader
+    */
    TGSI_SEMANTIC_VERTEXID,
    TGSI_SEMANTIC_INSTANCEID,
+
+   /* Geometry shader
+    */
+   TGSI_SEMANTIC_INVOCATIONID,
+
+   /* Fragment shader
+    */
+   TGSI_SEMANTIC_FACE,
    TGSI_SEMANTIC_SAMPLEID,
    TGSI_SEMANTIC_SAMPLEPOS,
    TGSI_SEMANTIC_SAMPLEMASK,
-   TGSI_SEMANTIC_INVOCATIONID,
 };
 
 /**