[Mesa-stable] [PATCH 04/13] mesa: Group gl_system_value values by the stage where they exist
Ian Romanick
idr at freedesktop.org
Fri Jun 20 18:00:54 PDT 2014
From: Ian Romanick <ian.d.romanick at intel.com>
Signed-off-by: Ian Romanick <ian.d.romanick at intel.com>
Cc: Ilia Mirkin <imirkin at alum.mit.edu>
Cc: Marek Olšák <marek.olsak at amd.com>
Cc: Roland Scheidegger <sroland at vmware.com>
Cc: "10.2" <mesa-stable at lists.freedesktop.org>
---
src/mesa/main/mtypes.h | 32 +++++++++++++++++++++++-------
src/mesa/state_tracker/st_glsl_to_tgsi.cpp | 12 +++++++++--
2 files changed, 35 insertions(+), 9 deletions(-)
diff --git a/src/mesa/main/mtypes.h b/src/mesa/main/mtypes.h
index 8b7ee30..3899e7f 100644
--- a/src/mesa/main/mtypes.h
+++ b/src/mesa/main/mtypes.h
@@ -2035,13 +2035,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 fbfbea6..fa95493 100644
--- a/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
+++ b/src/mesa/state_tracker/st_glsl_to_tgsi.cpp
@@ -4236,13 +4236,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,
};
/**
--
1.8.1.4
More information about the mesa-stable
mailing list