From: Marek Olšák Date: Tue, 24 Dec 2019 01:17:46 +0000 (-0500) Subject: radeonsi: move VS_STATE.LS_OUT_PATCH_SIZE a few bits higher to make space there X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cf65c6f0d281bc64c9cea07b7f394036b2eeeaad;p=mesa.git radeonsi: move VS_STATE.LS_OUT_PATCH_SIZE a few bits higher to make space there Reviewed-by: Pierre-Eric Pelloux-Prayer --- diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index d68951533a7..99d4f818806 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -238,7 +238,7 @@ static LLVMValueRef get_rel_patch_id(struct si_shader_context *ctx) static LLVMValueRef get_tcs_in_patch_stride(struct si_shader_context *ctx) { - return si_unpack_param(ctx, ctx->vs_state_bits, 8, 13); + return si_unpack_param(ctx, ctx->vs_state_bits, 11, 13); } static unsigned get_tcs_out_vertex_dw_stride_constant(struct si_shader_context *ctx) diff --git a/src/gallium/drivers/radeonsi/si_shader.h b/src/gallium/drivers/radeonsi/si_shader.h index c4792da4782..7a26083eb49 100644 --- a/src/gallium/drivers/radeonsi/si_shader.h +++ b/src/gallium/drivers/radeonsi/si_shader.h @@ -256,8 +256,8 @@ enum { #define C_VS_STATE_PROVOKING_VTX_INDEX 0xFFFFFFCF #define S_VS_STATE_STREAMOUT_QUERY_ENABLED(x) (((unsigned)(x) & 0x1) << 6) #define C_VS_STATE_STREAMOUT_QUERY_ENABLED 0xFFFFFFBF -#define S_VS_STATE_LS_OUT_PATCH_SIZE(x) (((unsigned)(x) & 0x1FFF) << 8) -#define C_VS_STATE_LS_OUT_PATCH_SIZE 0xFFE000FF +#define S_VS_STATE_LS_OUT_PATCH_SIZE(x) (((unsigned)(x) & 0x1FFF) << 11) +#define C_VS_STATE_LS_OUT_PATCH_SIZE 0xFF0007FF #define S_VS_STATE_LS_OUT_VERTEX_SIZE(x) (((unsigned)(x) & 0xFF) << 24) #define C_VS_STATE_LS_OUT_VERTEX_SIZE 0x00FFFFFF diff --git a/src/gallium/drivers/radeonsi/si_shader_internal.h b/src/gallium/drivers/radeonsi/si_shader_internal.h index 6d36b9750c7..ef2bf2fd7db 100644 --- a/src/gallium/drivers/radeonsi/si_shader_internal.h +++ b/src/gallium/drivers/radeonsi/si_shader_internal.h @@ -95,8 +95,11 @@ struct si_shader_context { /* VS states and layout of LS outputs / TCS inputs at the end * [0] = clamp vertex color * [1] = indexed - * [8:20] = stride between patches in DW = num_inputs * num_vertices * 4 - * max = 32*32*4 + 32*4 + * [2:3] = NGG: output primitive type + * [4:5] = NGG: provoking vertex index + * [6] = NGG: streamout queries enabled + * [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 */