summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/mesa/main/mtypes.h32
-rw-r--r--src/mesa/state_tracker/st_glsl_to_tgsi.cpp12
2 files changed, 35 insertions, 9 deletions
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index f5ce360e4e3..ff130da15d0 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -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;
diff --git a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
index b4638dd6f5e..35c4b1b2410 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -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,
};
/**