summaryrefslogtreecommitdiff
path: root/src/gallium/drivers/nouveau
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2014-07-04 18:38:28 -0400
committerCarl Worth <cworth@cworth.org>2014-07-10 12:57:43 -0700
commit5e1bfed1cad651247315a5b63a33c722406fb179 (patch)
tree2cf626b45be17506384965840c2369671a7d753a /src/gallium/drivers/nouveau
parent0618881c8216aa45ae20f2b16266c102a5f41188 (diff)
nv50/ir: ignore bias for samplerCubeShadow on nv50
Unfortunately there's no good way to do this on the nv50 shader isa. Dropping the bias seems preferable to doing the compare post-filtering. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: <mesa-stable@lists.freedesktop.org> (cherry picked from commit 1065aa92f4e448fbfe47c074f08dded1933a7f1f)
Diffstat (limited to 'src/gallium/drivers/nouveau')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
index ed06def24ff..e283424844e 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nv50.cpp
@@ -797,6 +797,16 @@ NV50LoweringPreSSA::handleTXB(TexInstruction *i)
const CondCode cc[4] = { CC_EQU, CC_S, CC_C, CC_O };
int l, d;
+ // We can't actually apply bias *and* do a compare for a cube
+ // texture. Since the compare has to be done before the filtering, just
+ // drop the bias on the floor.
+ if (i->tex.target == TEX_TARGET_CUBE_SHADOW) {
+ i->op = OP_TEX;
+ i->setSrc(3, i->getSrc(4));
+ i->setSrc(4, NULL);
+ return handleTEX(i);
+ }
+
handleTEX(i);
Value *bias = i->getSrc(i->tex.target.getArgCount());
if (bias->isUniform())