[Mesa-dev] [PATCH 1/4] gallium: add baseinstance/drawid semantics
Roland Scheidegger
sroland at vmware.com
Tue Dec 29 14:17:47 PST 2015
Am 29.12.2015 um 23:04 schrieb Ilia Mirkin:
> Signed-off-by: Ilia Mirkin <imirkin at alum.mit.edu>
> ---
> src/gallium/docs/source/tgsi.rst | 13 +++++++++++++
> src/gallium/include/pipe/p_shader_tokens.h | 4 +++-
> 2 files changed, 16 insertions(+), 1 deletion(-)
>
> diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst
> index acd8f75..f69998f 100644
> --- a/src/gallium/docs/source/tgsi.rst
> +++ b/src/gallium/docs/source/tgsi.rst
> @@ -2955,6 +2955,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 a3137ae..e8f4ad2 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
> {
>
Those should be added to tgsi_strings.c.
Roland
More information about the mesa-dev
mailing list