From 8514f5ac01cb769b16dab0a307f9b0313556a495 Mon Sep 17 00:00:00 2001 From: Christian König Date: Mon, 4 Feb 2013 17:46:42 +0100 Subject: radeonsi: support constants as TEX coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Christian König Reviewed-by: Michel Dänzer --- src/gallium/drivers/radeonsi/radeonsi_shader.c | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/gallium/drivers') diff --git a/src/gallium/drivers/radeonsi/radeonsi_shader.c b/src/gallium/drivers/radeonsi/radeonsi_shader.c index 36711be352f..1556a0768b1 100644 --- a/src/gallium/drivers/radeonsi/radeonsi_shader.c +++ b/src/gallium/drivers/radeonsi/radeonsi_shader.c @@ -433,6 +433,15 @@ static LLVMValueRef fetch_constant( LLVMValueRef offset; LLVMValueRef load; + if (swizzle == LP_CHAN_ALL) { + unsigned chan; + LLVMValueRef values[4]; + for (chan = 0; chan < TGSI_NUM_CHANNELS; ++chan) + values[chan] = fetch_constant(bld_base, reg, type, chan); + + return lp_build_gather_values(bld_base->base.gallivm, values, 4); + } + /* currently not supported */ if (reg->Register.Indirect) { assert(0); -- cgit v1.2.3