Mesa (main): radeonsi: don't treat skipped GS copy shader compilation as successful

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Apr 22 21:24:19 UTC 2022


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

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Sun Apr 10 21:08:00 2022 -0400

radeonsi: don't treat skipped GS copy shader compilation as successful

We don't expect the GS copy shader to ever use the scratch buffer,
so we just don't compile the shader, but the problem is we set ok to
true anyway.

Reviewed-by: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15965>

---

 src/gallium/drivers/radeonsi/si_shader_llvm_gs.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c
index 3dfc56269f1..fb105bf0857 100644
--- a/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c
+++ b/src/gallium/drivers/radeonsi/si_shader_llvm_gs.c
@@ -537,10 +537,9 @@ struct si_shader *si_generate_gs_copy_shader(struct si_screen *sscreen,
          fprintf(stderr, "GS Copy Shader:\n");
       si_shader_dump(sscreen, ctx.shader, debug, stderr, true);
 
+      assert(!ctx.shader->config.scratch_bytes_per_wave);
       if (!ctx.shader->config.scratch_bytes_per_wave)
          ok = si_shader_binary_upload(sscreen, ctx.shader, 0);
-      else
-         ok = true;
    }
 
    si_llvm_dispose(&ctx);



More information about the mesa-commit mailing list