Module: Mesa
Branch: master
Commit: f783677a82e08a7510da22809548863e3620a103
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=f783677a82e08a7510da22809548863e3620a103

Author: Marek Olšák <[email protected]>
Date:   Fri Nov 17 04:56:13 2017 +0100

radeonsi: don't write undefined output channels to LDS in LS

Reviewed-by: Nicolai Hähnle <[email protected]>

---

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

diff --git a/src/gallium/drivers/radeonsi/si_shader.c 
b/src/gallium/drivers/radeonsi/si_shader.c
index bca0ca9224..16036e3163 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -3176,6 +3176,9 @@ static void si_llvm_emit_ls_epilogue(struct 
lp_build_tgsi_context *bld_base)
                                        LLVMConstInt(ctx->i32, param * 4, 0), 
"");
 
                for (chan = 0; chan < 4; chan++) {
+                       if (!(info->output_usagemask[i] & (1 << chan)))
+                               continue;
+
                        lds_store(bld_base, chan, dw_addr,
                                  LLVMBuildLoad(ctx->ac.builder, out_ptr[chan], 
""));
                }

_______________________________________________
mesa-commit mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to