gallium: add support for gl_HelperInvocation semantic
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Glenn Kennard <glenn.kennard@gmail.com>
This commit is contained in:
@@ -95,6 +95,7 @@ const char *tgsi_semantic_names[TGSI_SEMANTIC_COUNT] =
|
|||||||
"TESSOUTER",
|
"TESSOUTER",
|
||||||
"TESSINNER",
|
"TESSINNER",
|
||||||
"VERTICESIN",
|
"VERTICESIN",
|
||||||
|
"HELPER_INVOCATION",
|
||||||
};
|
};
|
||||||
|
|
||||||
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
|
const char *tgsi_texture_names[TGSI_TEXTURE_COUNT] =
|
||||||
|
@@ -2941,6 +2941,14 @@ TGSI_SEMANTIC_VERTICESIN
|
|||||||
For tessellation evaluation/control shaders, this semantic label indicates the
|
For tessellation evaluation/control shaders, this semantic label indicates the
|
||||||
number of vertices provided in the input patch. Only the X value is defined.
|
number of vertices provided in the input patch. Only the X value is defined.
|
||||||
|
|
||||||
|
TGSI_SEMANTIC_HELPER_INVOCATION
|
||||||
|
"""""""""""""""""""""""""""""""
|
||||||
|
|
||||||
|
For fragment shaders, this semantic indicates whether the current
|
||||||
|
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.
|
||||||
|
|
||||||
|
|
||||||
Declaration Interpolate
|
Declaration Interpolate
|
||||||
^^^^^^^^^^^^^^^^^^^^^^^
|
^^^^^^^^^^^^^^^^^^^^^^^
|
||||||
|
@@ -185,7 +185,8 @@ struct tgsi_declaration_interp
|
|||||||
#define TGSI_SEMANTIC_TESSOUTER 32 /**< outer tessellation levels */
|
#define TGSI_SEMANTIC_TESSOUTER 32 /**< outer tessellation levels */
|
||||||
#define TGSI_SEMANTIC_TESSINNER 33 /**< inner tessellation levels */
|
#define TGSI_SEMANTIC_TESSINNER 33 /**< inner tessellation levels */
|
||||||
#define TGSI_SEMANTIC_VERTICESIN 34 /**< number of input vertices */
|
#define TGSI_SEMANTIC_VERTICESIN 34 /**< number of input vertices */
|
||||||
#define TGSI_SEMANTIC_COUNT 35 /**< number of semantic values */
|
#define TGSI_SEMANTIC_HELPER_INVOCATION 35 /**< current invocation is helper */
|
||||||
|
#define TGSI_SEMANTIC_COUNT 36 /**< number of semantic values */
|
||||||
|
|
||||||
struct tgsi_declaration_semantic
|
struct tgsi_declaration_semantic
|
||||||
{
|
{
|
||||||
|
@@ -4408,7 +4408,7 @@ const unsigned _mesa_sysval_to_semantic[SYSTEM_VALUE_MAX] = {
|
|||||||
TGSI_SEMANTIC_SAMPLEID,
|
TGSI_SEMANTIC_SAMPLEID,
|
||||||
TGSI_SEMANTIC_SAMPLEPOS,
|
TGSI_SEMANTIC_SAMPLEPOS,
|
||||||
TGSI_SEMANTIC_SAMPLEMASK,
|
TGSI_SEMANTIC_SAMPLEMASK,
|
||||||
0, /* gl_HelperInvocation */
|
TGSI_SEMANTIC_HELPER_INVOCATION,
|
||||||
|
|
||||||
/* Tessellation shaders
|
/* Tessellation shaders
|
||||||
*/
|
*/
|
||||||
@@ -5139,6 +5139,8 @@ st_translate_program(
|
|||||||
TGSI_SEMANTIC_BASEVERTEX);
|
TGSI_SEMANTIC_BASEVERTEX);
|
||||||
assert(_mesa_sysval_to_semantic[SYSTEM_VALUE_TESS_COORD] ==
|
assert(_mesa_sysval_to_semantic[SYSTEM_VALUE_TESS_COORD] ==
|
||||||
TGSI_SEMANTIC_TESSCOORD);
|
TGSI_SEMANTIC_TESSCOORD);
|
||||||
|
assert(_mesa_sysval_to_semantic[SYSTEM_VALUE_HELPER_INVOCATION] ==
|
||||||
|
TGSI_SEMANTIC_HELPER_INVOCATION);
|
||||||
|
|
||||||
t = CALLOC_STRUCT(st_translate);
|
t = CALLOC_STRUCT(st_translate);
|
||||||
if (!t) {
|
if (!t) {
|
||||||
|
Reference in New Issue
Block a user