From: Marek Olšák Date: Thu, 17 May 2018 03:47:15 +0000 (-0400) Subject: radeonsi: skip ES output stores for undefined output components X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3d64ed57853d59d602789c45b041af0f9e272a75;p=mesa.git radeonsi: skip ES output stores for undefined output components Tested-by: Dieter Nützel Reviewed-by: Samuel Pitoiset --- 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 @@ -3598,6 +3598,9 @@ static void si_llvm_emit_es_epilogue(struct ac_shader_abi *abi, 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);