From b9c6ef7f51888c4418a1cbedbf344832281ae675 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= Date: Mon, 20 Feb 2023 00:13:35 -0500 Subject: [PATCH] radeonsi: remove unused VS_STATE_LS_OUT_PATCH_SIZE This became unused when we switched to nir_lower_hs_inputs_to_mem. Reviewed-by: Pierre-Eric Pelloux-Prayer Part-of: --- src/gallium/drivers/radeonsi/si_shader.h | 2 -- src/gallium/drivers/radeonsi/si_shader_internal.h | 2 -- src/gallium/drivers/radeonsi/si_state_draw.cpp | 6 +----- 3 files changed, 1 insertion(+), 9 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index 9f068057ae6..91786572033 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -259,8 +259,6 @@ enum * in the shader via vs_state_bits in LS/HS. */ /* bit gap */ -#define VS_STATE_LS_OUT_PATCH_SIZE__SHIFT 11 -#define VS_STATE_LS_OUT_PATCH_SIZE__MASK 0x1fff #define VS_STATE_LS_OUT_VERTEX_SIZE__SHIFT 24 #define VS_STATE_LS_OUT_VERTEX_SIZE__MASK 0xff diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index 0f85c193d85..c7aab664abc 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -63,8 +63,6 @@ struct si_shader_args { * Expand to FP32 like this: ((0x70 | value) << 23); * With 0x70 = 112, we get 2^(112 + value - 127) = 2^(value - 15) * = 1/2^(15 - value) in FP32 - * [11:23] = stride between patches in DW = num_inputs * num_vertices * 4 - * max = 32*32*4 + 32*4 * [24:31] = stride between vertices in DW = num_inputs * 4 * max = 32*4 */ diff --git a/src/gallium/drivers/radeonsi/si_state_draw.cpp b/src/gallium/drivers/radeonsi/si_state_draw.cpp index 5f72b7f7cd7..8204d9e1e54 100644 --- a/src/gallium/drivers/radeonsi/si_state_draw.cpp +++ b/src/gallium/drivers/radeonsi/si_state_draw.cpp @@ -782,7 +782,6 @@ static void si_emit_derived_tess_state(struct si_context *sctx) /* Compute userdata SGPRs. */ assert(((input_vertex_size / 4) & ~0xff) == 0); assert(((output_vertex_size / 4) & ~0xff) == 0); - assert(((input_patch_size / 4) & ~0x1fff) == 0); assert(((output_patch_size / 4) & ~0x1fff) == 0); assert(((output_patch0_offset / 4) & ~0xffff) == 0); assert(((perpatch_output_offset / 4) & ~0xffff) == 0); @@ -813,7 +812,6 @@ static void si_emit_derived_tess_state(struct si_context *sctx) } /* Set SI_SGPR_VS_STATE_BITS. */ - SET_FIELD(sctx->current_vs_state, VS_STATE_LS_OUT_PATCH_SIZE, input_patch_size / 4); SET_FIELD(sctx->current_vs_state, VS_STATE_LS_OUT_VERTEX_SIZE, input_vertex_size / 4); /* We should be able to support in-shader LDS use with LLVM >= 9 @@ -1197,9 +1195,7 @@ static void si_emit_vs_state(struct si_context *sctx, unsigned index_size) vs_state |= ENCODE_FIELD(VS_STATE_INDEXED, 1); /* Copy all state bits from vs_state to gs_state except the LS bits. */ - gs_state |= vs_state & - CLEAR_FIELD(VS_STATE_LS_OUT_PATCH_SIZE) & - CLEAR_FIELD(VS_STATE_LS_OUT_VERTEX_SIZE); + gs_state |= vs_state & CLEAR_FIELD(VS_STATE_LS_OUT_VERTEX_SIZE); if (vs_state != sctx->last_vs_state || ((HAS_GS || NGG) && gs_state != sctx->last_gs_state)) {