From 529f316d8790e84b9f1b441f4b2e4272c0b2cd0e Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Fri, 29 Apr 2022 17:51:11 +0200 Subject: [PATCH] radeonsi: fix VS kill_outputs handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Part-of: --- 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);