[Mesa-dev] [PATCH] radeonsi: skip ES output stores for undefined output components

Dieter Nützel Dieter at nuetzel-hh.de
Fri May 18 03:49:07 UTC 2018


Tested-by: Dieter Nützel <Dieter at nuetzel-hh.de>

on RX580

with UH, UV, glmark2, Blender 2.79, FreeCAD 0.17, Gimp 2.10, digikam 
5.9.0, Krita 4.0.3 and some Mesa-demos

Dieter

Am 18.05.2018 00:14, schrieb Marek Olšák:
> From: Marek Olšák <marek.olsak at amd.com>
> 
> ---
>  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 e8d08cd8e7f..0d24c3af10a 100644
> --- a/src/gallium/drivers/radeonsi/si_shader.c
> +++ b/src/gallium/drivers/radeonsi/si_shader.c
> @@ -3591,20 +3591,23 @@ static void si_llvm_emit_es_epilogue(struct
> ac_shader_abi *abi,
>  		int param;
> 
>  		if (info->output_semantic_name[i] == TGSI_SEMANTIC_VIEWPORT_INDEX ||
>  		    info->output_semantic_name[i] == TGSI_SEMANTIC_LAYER)
>  			continue;
> 
>  		param = si_shader_io_get_unique_index(info->output_semantic_name[i],
>  						      info->output_semantic_index[i]);
> 
>  		for (chan = 0; chan < 4; chan++) {
> +			if (!(info->output_usagemask[i] & (1 << chan)))
> +				continue;
> +
>  			LLVMValueRef out_val = LLVMBuildLoad(ctx->ac.builder, addrs[4 * i
> + chan], "");
>  			out_val = ac_to_integer(&ctx->ac, out_val);
> 
>  			/* GFX9 has the ESGS ring in LDS. */
>  			if (ctx->screen->info.chip_class >= GFX9) {
>  				lds_store(ctx, param * 4 + chan, lds_base, out_val);
>  				continue;
>  			}
> 
>  			ac_build_buffer_store_dword(&ctx->ac,


More information about the mesa-dev mailing list