gallium/tgsi: Define system values used to query the compute grid parameters.
authorFrancisco Jerez <currojerez@riseup.net>
Sun, 18 Mar 2012 17:13:29 +0000 (18:13 +0100)
committerFrancisco Jerez <currojerez@riseup.net>
Fri, 11 May 2012 10:39:41 +0000 (12:39 +0200)
src/gallium/auxiliary/tgsi/tgsi_strings.c
src/gallium/include/pipe/p_shader_tokens.h

index 1d959b6e0e901efee2060a88245ddc0f99ae4335..d7b74ba2b8b2d3638db7fd264baddee80847edd1 100644 (file)
@@ -74,7 +74,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] =
index d45a914924e5f149ca9c6de3342a2920ef016616..70a3221f8a97ece0cfdebe3b4a1a87dd3c2419f1 100644 (file)
@@ -158,7 +158,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
 {