[Mesa-dev] [PATCH 3/4] radv: fix computing the number of ES VGPRS for TES on GFX10

Samuel Pitoiset samuel.pitoiset at gmail.com
Tue Jul 9 06:27:30 UTC 2019


Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
---
 src/amd/vulkan/radv_shader.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/amd/vulkan/radv_shader.c b/src/amd/vulkan/radv_shader.c
index b6270136643..ec68f51901f 100644
--- a/src/amd/vulkan/radv_shader.c
+++ b/src/amd/vulkan/radv_shader.c
@@ -802,7 +802,8 @@ static void radv_postprocess_config(const struct radv_physical_device *pdevice,
 		if (stage == MESA_SHADER_VERTEX) {
 			es_vgpr_comp_cnt = info->info.vs.needs_instance_id ? 3 : 0;
 		} else if (stage == MESA_SHADER_TESS_EVAL) {
-			es_vgpr_comp_cnt = info->info.vs.needs_instance_id ? 3 : 2;
+			bool enable_prim_id = info->tes.export_prim_id || info->info.uses_prim_id;
+			es_vgpr_comp_cnt = enable_prim_id ? 3 : 2;
 		}
 
 		bool tes_triangles = stage == MESA_SHADER_TESS_EVAL &&
-- 
2.22.0



More information about the mesa-dev mailing list