Module: Mesa
Branch: intel-ci
Commit: 185ee6b612aca567dfaa31ae1be93e3385af4be4
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=185ee6b612aca567dfaa31ae1be93e3385af4be4

Author: Nicolai Hähnle <[email protected]>
Date:   Tue Jan 19 15:18:31 2016 -0500

radeonsi: fix discard-only fragment shaders (11.1 version)

When a fragment shader is used that has no outputs but does conditional
discard (KILL_IF), all fragments are killed without this patch.

By comparing various register settings, my conclusion is that the exec mask
is either not properly forwarded to the DB by NULL exports or ends up being
unused, at least when there is _only_ a NULL export (the ISA documentation
claims that NULL exports can be used to override a previously exported exec
mask).

Of the various approaches I have tried to work around the problem, this one
seems to be the least invasive one.

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93761
Cc: "11.0 11.1" <[email protected]>
Reviewed-by: Marek Olšák <[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 1baa2eb..1c1aaa0 100644
--- a/src/gallium/drivers/radeonsi/si_shader.c
+++ b/src/gallium/drivers/radeonsi/si_shader.c
@@ -2291,6 +2291,9 @@ static void si_llvm_emit_fs_epilogue(struct 
lp_build_tgsi_context * bld_base)
                last_args[6]= uint->zero;
                last_args[7]= uint->zero;
                last_args[8]= uint->zero;
+
+               if (info->uses_kill)
+                       si_shader_ctx->shader->spi_shader_z_format = 
V_028710_SPI_SHADER_32_R;
        }
 
        /* Specify whether the EXEC mask represents the valid mask */

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

Reply via email to