[Mesa-dev] [PATCH 07/11] gallium/tgsi: Define system values used to query the compute grid parameters.
Francisco Jerez
currojerez at riseup.net
Thu Mar 22 17:40:36 PDT 2012
---
src/gallium/auxiliary/tgsi/tgsi_strings.c | 6 +++++-
src/gallium/include/pipe/p_shader_tokens.h | 6 +++++-
2 files changed, 10 insertions(+), 2 deletions(-)
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c
index 9e9c0dc..cad46e8 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -73,7 +73,11 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
"VERTEXID",
"STENCIL",
"CLIPDIST",
- "CLIPVERTEX"
+ "CLIPVERTEX",
+ "GRID_SIZE",
+ "BLOCK_ID",
+ "BLOCK_SIZE",
+ "THREAD_ID"
};
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index ad91a24..d36be0a 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -157,7 +157,11 @@ struct tgsi_declaration_interp
#define TGSI_SEMANTIC_STENCIL 12
#define TGSI_SEMANTIC_CLIPDIST 13
#define TGSI_SEMANTIC_CLIPVERTEX 14
-#define TGSI_SEMANTIC_COUNT 15 /**< number of semantic values */
+#define TGSI_SEMANTIC_GRID_SIZE 15 /**< grid size in blocks */
+#define TGSI_SEMANTIC_BLOCK_ID 16 /**< id of the current block */
+#define TGSI_SEMANTIC_BLOCK_SIZE 17 /**< block size in threads */
+#define TGSI_SEMANTIC_THREAD_ID 18 /**< block-relative id of the current thread */
+#define TGSI_SEMANTIC_COUNT 19 /**< number of semantic values */
struct tgsi_declaration_semantic
{
--
1.7.9.2
More information about the mesa-dev
mailing list