From 856a8acab09d5e4f4c8a0f0073ef7dbda663d0f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Timur=20Krist=C3=B3f?= Date: Sun, 12 Jun 2022 06:07:41 +0200 Subject: [PATCH] radv: Enable NGG wave ID for mesh shader scratch ring. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This wave ID is used to address the scratch ring, so it should be enabled when the scratch ring is used. Note: the naming is confusing here, as this ID is actually the same accross the whole workgroup. (It would be more appropriate to call it workgroup ID instead.) Fixes: 0280b526d58e85d65b53d3f9c8b0f7364d853751 Signed-off-by: Timur Kristóf Reviewed-by: Samuel Pitoiset Part-of: --- src/amd/vulkan/radv_pipeline.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/amd/vulkan/radv_pipeline.c b/src/amd/vulkan/radv_pipeline.c index 88777beb68b..31504441a73 100644 --- a/src/amd/vulkan/radv_pipeline.c +++ b/src/amd/vulkan/radv_pipeline.c @@ -6513,6 +6513,9 @@ radv_pipeline_emit_vgt_shader_config(struct radeon_cmdbuf *ctx_cs, } else if (radv_pipeline_has_stage(pipeline, MESA_SHADER_MESH)) { assert(!radv_pipeline_has_ngg_passthrough(pipeline)); stages |= S_028B54_GS_EN(1) | S_028B54_GS_FAST_LAUNCH(1); + + if (pipeline->base.shaders[MESA_SHADER_MESH]->info.ms.needs_ms_scratch_ring) + stages |= S_028B54_NGG_WAVE_ID_EN(1); } else if (radv_pipeline_has_ngg(pipeline)) { stages |= S_028B54_ES_EN(V_028B54_ES_STAGE_REAL); }