diff options
author | Ilia Mirkin <[email protected]> | 2015-12-29 16:37:19 -0500 |
---|---|---|
committer | Ilia Mirkin <[email protected]> | 2015-12-30 16:55:56 -0500 |
commit | bb52ea45cc731d4580d8a6c90f604023dc04ddcc (patch) | |
tree | 7afedc5f00a2b4004862ca77e20e628c481d91e0 /src | |
parent | d50e6128b815595f7918d6818e8a9cd20d53efd1 (diff) |
gallium: add baseinstance/drawid semantics
Signed-off-by: Ilia Mirkin <[email protected]>
Reviewed-by: Roland Scheidegger <[email protected]>
Diffstat (limited to 'src')
-rw-r--r-- | src/gallium/auxiliary/tgsi/tgsi_strings.c | 2 | ||||
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 13 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 4 |
3 files changed, 18 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/tgsi/tgsi_strings.c b/src/gallium/auxiliary/tgsi/tgsi_strings.c index fc29a2398aa..fd926b37c47 100644 --- a/src/gallium/auxiliary/tgsi/tgsi_strings.c +++ b/src/gallium/auxiliary/tgsi/tgsi_strings.c @@ -96,6 +96,8 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] = "TESSINNER", "VERTICESIN", "HELPER_INVOCATION", + "BASEINSTANCE", + "DRAWID", }; 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 e7b0c2f6377..955ece89da5 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -2949,6 +2949,19 @@ invocation is covered or not. Helper invocations are created in order to properly compute derivatives, however it may be desirable to skip some of the logic in those cases. See ``gl_HelperInvocation`` documentation. +TGSI_SEMANTIC_BASEINSTANCE +"""""""""""""""""""""""""" + +For vertex shaders, the base instance argument supplied for this +draw. This is an integer value, and only the X component is used. + +TGSI_SEMANTIC_DRAWID +"""""""""""""""""""" + +For vertex shaders, the zero-based index of the current draw in a +``glMultiDraw*`` invocation. This is an integer value, and only the X +component 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 a3137aec8db..e8f4ad210e1 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -186,7 +186,9 @@ struct tgsi_declaration_interp #define TGSI_SEMANTIC_TESSINNER 33 /**< inner tessellation levels */ #define TGSI_SEMANTIC_VERTICESIN 34 /**< number of input vertices */ #define TGSI_SEMANTIC_HELPER_INVOCATION 35 /**< current invocation is helper */ -#define TGSI_SEMANTIC_COUNT 36 /**< number of semantic values */ +#define TGSI_SEMANTIC_BASEINSTANCE 36 +#define TGSI_SEMANTIC_DRAWID 37 +#define TGSI_SEMANTIC_COUNT 38 /**< number of semantic values */ struct tgsi_declaration_semantic { |