aboutsummaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2014-04-24 00:45:19 -0400
committerIlia Mirkin <[email protected]>2014-04-26 12:01:13 -0400
commit9339f8ac1bc41942c77db6fbbe0dccab42efad4c (patch)
treefb46ffd1681cc9a9133acce07f58d1d67f9d1f43 /src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
parentb86d78b4c131dba679d13bf52c412ef88ee79398 (diff)
nvc0/ir: fetch shadow value from proper place for TG4 cube array
Signed-off-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
index ea545c21415..fc418bf4e3c 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_from_tgsi.cpp
@@ -1683,7 +1683,10 @@ Converter::handleTEX(Value *dst[4], int R, int S, int L, int C, int Dx, int Dy)
if (C == 0x0f)
C = 0x00 | MAX2(tgt.getArgCount(), 2); // guess DC src
- if (tgt.isShadow())
+ if (tgsi.getOpcode() == TGSI_OPCODE_TG4 &&
+ tgt == TEX_TARGET_CUBE_ARRAY_SHADOW)
+ shd = fetchSrc(1, 0);
+ else if (tgt.isShadow())
shd = fetchSrc(C >> 4, C & 3);
if (texi->op == OP_TXD) {