Mesa (main): radv: Enable NGG wave ID for mesh shader scratch ring.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Wed Jun 15 18:28:10 UTC 2022


Module: Mesa
Branch: main
Commit: 856a8acab09d5e4f4c8a0f0073ef7dbda663d0f2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=856a8acab09d5e4f4c8a0f0073ef7dbda663d0f2

Author: Timur Kristóf <timur.kristof at gmail.com>
Date:   Sun Jun 12 06:07:41 2022 +0200

radv: Enable NGG wave ID for mesh shader scratch ring.

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 <timur.kristof at gmail.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/17022>

---

 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);
    }



More information about the mesa-commit mailing list