On 20.01.2016 05:18, Nicolai Hähnle wrote:
> From: Nicolai Hähnle <[email protected]>
> 
> 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]>
> ---
>  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 */
> 

I recommend not bothering with backporting patches to stable branches
until they've landed on master. :)


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer
_______________________________________________
mesa-dev mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/mesa-dev

Reply via email to