From ffbd3e5b2d6525af97ae838c38bc85277c6d1e81 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 2 Feb 2024 11:41:39 +0100 Subject: [PATCH] radv: change the user SGPR idx of AC_UD_TES_STATE When GS will be compiled separately, we will have to always declare both VS and TES user SGPRs because we can't know the previous stage, and the shader input arguments must match and mustn't overlap. Signed-off-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_shader.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/amd/vulkan/radv_shader.h b/src/amd/vulkan/radv_shader.h index 7c489ba13d0..8c307078c33 100644 --- a/src/amd/vulkan/radv_shader.h +++ b/src/amd/vulkan/radv_shader.h @@ -236,7 +236,10 @@ enum radv_ud_index { AC_UD_TCS_OFFCHIP_LAYOUT = AC_UD_VS_MAX_UD, AC_UD_TCS_EPILOG_PC, AC_UD_TCS_MAX_UD, - AC_UD_TES_STATE = AC_UD_SHADER_START, + /* We might not know the previous stage when compiling a geometry shader, so we just + * declare both TES and VS user SGPRs. + */ + AC_UD_TES_STATE = AC_UD_VS_MAX_UD, AC_UD_TES_MAX_UD, AC_UD_MAX_UD = AC_UD_CS_MAX_UD, };