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

Author: Samuel Pitoiset <[email protected]>
Date:   Thu Oct 20 23:25:45 2022 +0000

aco,radv/llvm: do not export parameters on GFX11

They will be exported through the attribute ring instead.

Signed-off-by: Samuel Pitoiset <[email protected]>
Reviewed-by: Rhys Perry <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/19216>

---

 src/amd/compiler/aco_instruction_selection.cpp | 3 +++
 src/amd/vulkan/radv_nir_to_llvm.c              | 3 +++
 2 files changed, 6 insertions(+)

diff --git a/src/amd/compiler/aco_instruction_selection.cpp 
b/src/amd/compiler/aco_instruction_selection.cpp
index 3a4268af5d4..7386d15e126 100644
--- a/src/amd/compiler/aco_instruction_selection.cpp
+++ b/src/amd/compiler/aco_instruction_selection.cpp
@@ -10873,6 +10873,9 @@ create_vs_exports(isel_context* ctx)
    if (ctx->num_clip_distances + ctx->num_cull_distances > 4)
       export_vs_varying(ctx, VARYING_SLOT_CLIP_DIST1, true, &next_pos);
 
+   if (ctx->program->gfx_level >= GFX11)
+      return;
+
    if (ctx->export_clip_dists) {
       if (ctx->num_clip_distances + ctx->num_cull_distances > 0)
          export_vs_varying(ctx, VARYING_SLOT_CLIP_DIST0, false, &next_pos);
diff --git a/src/amd/vulkan/radv_nir_to_llvm.c 
b/src/amd/vulkan/radv_nir_to_llvm.c
index f8e7c244e82..33ab6137806 100644
--- a/src/amd/vulkan/radv_nir_to_llvm.c
+++ b/src/amd/vulkan/radv_nir_to_llvm.c
@@ -986,6 +986,9 @@ radv_llvm_export_vs(struct radv_shader_context *ctx, struct 
radv_shader_output_v
       ac_build_export(&ctx->ac, &pos_args[i]);
    }
 
+   if (ctx->options->gfx_level >= GFX11)
+      return;
+
    /* Build parameter exports */
    radv_build_param_exports(ctx, outputs, noutput, outinfo, export_clip_dists);
 }

Reply via email to