diff options
-rw-r--r-- | src/gallium/docs/source/tgsi.rst | 12 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.c | 6 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shader.h | 7 | ||||
-rw-r--r-- | src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c | 4 | ||||
-rw-r--r-- | src/gallium/include/pipe/p_shader_tokens.h | 2 |
5 files changed, 19 insertions, 12 deletions
diff --git a/src/gallium/docs/source/tgsi.rst b/src/gallium/docs/source/tgsi.rst index e72b047dbd5..287f4b72729 100644 --- a/src/gallium/docs/source/tgsi.rst +++ b/src/gallium/docs/source/tgsi.rst @@ -3495,6 +3495,18 @@ A bit mask of ``bit index < TGSI_SEMANTIC_SUBGROUP_INVOCATION``, i.e. ``(1 << subgroup_invocation) - 1`` in arbitrary precision arithmetic. +TGSI_SEMANTIC_TESS_DEFAULT_OUTER_LEVEL +"""""""""""""""""""""""""""""""""""""" + +A system value equal to the default_outer_level array set via set_tess_level. + + +TGSI_SEMANTIC_TESS_DEFAULT_INNER_LEVEL +"""""""""""""""""""""""""""""""""""""" + +A system value equal to the default_inner_level array set via set_tess_level. + + Declaration Interpolate ^^^^^^^^^^^^^^^^^^^^^^^ diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 032b6c24965..69466361d41 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -2116,8 +2116,8 @@ void si_load_system_value(struct si_shader_context *ctx, value = load_tess_level(ctx, decl->Semantic.Name); break; - case TGSI_SEMANTIC_DEFAULT_TESSOUTER_SI: - case TGSI_SEMANTIC_DEFAULT_TESSINNER_SI: + case TGSI_SEMANTIC_TESS_DEFAULT_OUTER_LEVEL: + case TGSI_SEMANTIC_TESS_DEFAULT_INNER_LEVEL: { LLVMValueRef buf, slot, val[4]; int i, offset; @@ -2125,7 +2125,7 @@ void si_load_system_value(struct si_shader_context *ctx, slot = LLVMConstInt(ctx->i32, SI_HS_CONST_DEFAULT_TESS_LEVELS, 0); buf = LLVMGetParam(ctx->main_fn, ctx->param_rw_buffers); buf = ac_build_load_to_sgpr(&ctx->ac, buf, slot); - offset = decl->Semantic.Name == TGSI_SEMANTIC_DEFAULT_TESSINNER_SI ? 4 : 0; + offset = decl->Semantic.Name == TGSI_SEMANTIC_TESS_DEFAULT_INNER_LEVEL ? 4 : 0; for (i = 0; i < 4; i++) val[i] = buffer_load_const(ctx, buf, diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 0054a48ac15..2e4e4130e5c 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -256,13 +256,6 @@ enum { #define S_VS_STATE_LS_OUT_VERTEX_SIZE(x) (((unsigned)(x) & 0xFF) << 24) #define C_VS_STATE_LS_OUT_VERTEX_SIZE 0x00FFFFFF -/* Driver-specific system values. */ -enum { - /* Values from set_tess_state. */ - TGSI_SEMANTIC_DEFAULT_TESSOUTER_SI = TGSI_SEMANTIC_COUNT, - TGSI_SEMANTIC_DEFAULT_TESSINNER_SI, -}; - enum { /* Use a property enum that CS wouldn't use. */ TGSI_PROPERTY_CS_LOCAL_SIZE = TGSI_PROPERTY_FS_COORD_ORIGIN, diff --git a/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c b/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c index 57f8aec550c..fbf83a08c94 100644 --- a/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c +++ b/src/gallium/drivers/radeonsi/si_shaderlib_tgsi.c @@ -105,9 +105,9 @@ void *si_create_fixed_func_tcs(struct si_context *sctx) return NULL; outer = ureg_DECL_system_value(ureg, - TGSI_SEMANTIC_DEFAULT_TESSOUTER_SI, 0); + TGSI_SEMANTIC_TESS_DEFAULT_OUTER_LEVEL, 0); inner = ureg_DECL_system_value(ureg, - TGSI_SEMANTIC_DEFAULT_TESSINNER_SI, 0); + TGSI_SEMANTIC_TESS_DEFAULT_INNER_LEVEL, 0); tessouter = ureg_DECL_output(ureg, TGSI_SEMANTIC_TESSOUTER, 0); tessinner = ureg_DECL_output(ureg, TGSI_SEMANTIC_TESSINNER, 0); diff --git a/src/gallium/include/pipe/p_shader_tokens.h b/src/gallium/include/pipe/p_shader_tokens.h index bff3b78ab24..b30a257df2f 100644 --- a/src/gallium/include/pipe/p_shader_tokens.h +++ b/src/gallium/include/pipe/p_shader_tokens.h @@ -209,6 +209,8 @@ enum tgsi_semantic { TGSI_SEMANTIC_SUBGROUP_LE_MASK, TGSI_SEMANTIC_SUBGROUP_LT_MASK, TGSI_SEMANTIC_CS_USER_DATA_AMD, + TGSI_SEMANTIC_TESS_DEFAULT_OUTER_LEVEL, /**< from set_tess_state */ + TGSI_SEMANTIC_TESS_DEFAULT_INNER_LEVEL, /**< from set_tess_state */ TGSI_SEMANTIC_COUNT, /**< number of semantic values */ }; |