summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian König <[email protected]>2013-02-04 17:46:42 +0100
committerChristian König <[email protected]>2013-02-12 18:57:12 +0100
commit8514f5ac01cb769b16dab0a307f9b0313556a495 (patch)
tree540b4d70df737fbdb5aa6911b817cfd3c55e1720
parentf8426eea35e2e08797cdd29fc295720514081988 (diff)
radeonsi: support constants as TEX coordinates
Signed-off-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]>
-rw-r--r--src/gallium/drivers/radeonsi/radeonsi_shader.c9
1 files changed, 9 insertions, 0 deletions
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);