From e58af862f4bf5e16c191198a62b55c24b19a762f Mon Sep 17 00:00:00 2001 From: Tom Stellard Date: Wed, 25 Feb 2015 11:44:59 -0500 Subject: [PATCH] radeonsi: Pad image offset vectors with zero instead of undef undef is interpreted as 'any value', so it is better to use a constant like zero, because we can be sure that the behavior of the instruction will always be the same. --- src/gallium/drivers/radeonsi/si_shader.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/gallium/drivers/radeonsi/si_shader.c b/src/gallium/drivers/radeonsi/si_shader.c index 0ddb806..9698dbe 100644 --- a/src/gallium/drivers/radeonsi/si_shader.c +++ b/src/gallium/drivers/radeonsi/si_shader.c @@ -1703,7 +1703,7 @@ static void tex_fetch_args( /* Pad to a power-of-two size. */ while (txf_count < util_next_power_of_two(txf_count)) - txf_address[txf_count++] = LLVMGetUndef(LLVMInt32TypeInContext(gallivm->context)); + txf_address[txf_count++] = bld_base->uint_bld.zero; /* Read FMASK using TXF. */ inst.Instruction.Opcode = TGSI_OPCODE_TXF; @@ -1880,7 +1880,7 @@ static void tex_fetch_args( /* Pad to power of two vector */ while (count < util_next_power_of_two(count)) - address[count++] = LLVMGetUndef(LLVMInt32TypeInContext(gallivm->context)); + address[count++] = bld_base->uint_bld.zero; emit_data->args[0] = lp_build_gather_values(gallivm, address, count); } -- 1.8.5.5