From 8514f5ac01cb769b16dab0a307f9b0313556a495 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Christian=20K=C3=B6nig?= Date: Mon, 4 Feb 2013 17:46:42 +0100 Subject: [PATCH] radeonsi: support constants as TEX coordinates MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 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(+) 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); -- 2.30.2