Mesa (master): gallium: add INVOCATIONID semantic
Ilia Mirkin
imirkin at kemper.freedesktop.org
Sat Apr 26 16:03:47 UTC 2014
Module: Mesa
Branch: master
Commit: 76db20fc672dafd70d40cbb184ae8793e72c7f80
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=76db20fc672dafd70d40cbb184ae8793e72c7f80
Author: Ilia Mirkin <imirkin at alum.mit.edu>
Date: Wed Apr 23 22:30:04 2014 -0400
gallium: add INVOCATIONID semantic
Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
---
src/gallium/auxiliary/tgsi/tgsi_strings.c | 3 ++-
src/gallium/docs/source/tgsi.rst | 6 ++++++
src/gallium/include/pipe/p_shader_tokens.h | 3 ++-
3 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 2be726c..5b6e47f 100644
--- a/src/gallium/auxiliary/tgsi/tgsi_strings.c
+++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c
@@ -84,7 +84,8 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
"CULLDIST",
"SAMPLEID",
"SAMPLEPOS",
- "SAMPLEMASK"
+ "SAMPLEMASK",
+ "INVOCATIONID",
};
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
index b7d016a..170f83e 100644
--- a/src/gallium/docs/source/tgsi.rst
+++ b/src/gallium/docs/source/tgsi.rst
@@ -2641,6 +2641,12 @@ For fragment shaders, this semantic label indicates that an output contains
the sample mask used to disable further sample processing
(i.e. gl_SampleMask). Only the X value is used, up to 32x MS.
+TGSI_SEMANTIC_INVOCATIONID
+""""""""""""""""""""""""""
+
+For geometry shaders, this semantic label indicates that a system value
+contains the current invocation id (i.e. gl_InvocationID). Only the X value is
+used.
Declaration Interpolate
^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h
index 74e0475..1903d53 100644
--- a/src/gallium/include/pipe/p_shader_tokens.h
+++ b/src/gallium/include/pipe/p_shader_tokens.h
@@ -170,7 +170,8 @@ struct tgsi_declaration_interp
#define TGSI_SEMANTIC_SAMPLEID 24
#define TGSI_SEMANTIC_SAMPLEPOS 25
#define TGSI_SEMANTIC_SAMPLEMASK 26
-#define TGSI_SEMANTIC_COUNT 27 /**< number of semantic values */
+#define TGSI_SEMANTIC_INVOCATIONID 27
+#define TGSI_SEMANTIC_COUNT 28 /**< number of semantic values */
struct tgsi_declaration_semantic
{
More information about the mesa-commit
mailing list