Mesa (main): radeonsi: fix VS kill_outputs handling

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Mon May 2 12:05:46 UTC 2022


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

Author: Pierre-Eric Pelloux-Prayer <pierre-eric.pelloux-prayer at amd.com>
Date:   Fri Apr 29 17:51:11 2022 +0200

radeonsi: fix VS kill_outputs handling

981bd8cbe2d moved outputs removing handling to NIR, but instead of
applying it only to the last stage before the FS this now applies
it to both the GS and the VS.

This commit fixes this by clearing the kill_outputs field for
the VS when using a ES-GS shader.

Fixes: 981bd8cbe2d ("radeonsi: apply key.ge.opt.kill_{outputs,pointsize,clipdistance} in NIR")
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16249>

---

 src/gallium/drivers/radeonsi/si_shader_llvm.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/gallium/drivers/radeonsi/si_shader_llvm.c b/src/gallium/drivers/radeonsi/si_shader_llvm.c
index c6b31b540b8..7b99d68250a 100644
--- a/src/gallium/drivers/radeonsi/si_shader_llvm.c
+++ b/src/gallium/drivers/radeonsi/si_shader_llvm.c
@@ -1223,6 +1223,8 @@ bool si_llvm_compile_shader(struct si_screen *sscreen, struct ac_llvm_compiler *
          shader_es.key.ge.mono = shader->key.ge.mono;
          shader_es.key.ge.opt = shader->key.ge.opt;
          shader_es.key.ge.opt.inline_uniforms = false; /* only GS can inline uniforms */
+         /* kill_outputs was computed based on GS outputs so we can't use it to kill VS outputs */
+         shader_es.key.ge.opt.kill_outputs = 0;
          shader_es.is_monolithic = true;
 
          nir = si_get_nir_shader(es, &shader_es.key, &free_nir);



More information about the mesa-commit mailing list