summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2016-02-16 02:26:54 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2016-02-16 18:20:10 -0500
commitca23c8081f1f9f709df7a63b9e6de379c0b8df44 (patch)
treefed35e0bf096808854bcc8a467e4b09cfc893992 /src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
parent1d1ddfe5f887980acfb1283cf1c0b1240b3a60a6 (diff)
downloadexternal_mesa3d-ca23c8081f1f9f709df7a63b9e6de379c0b8df44.zip
external_mesa3d-ca23c8081f1f9f709df7a63b9e6de379c0b8df44.tar.gz
external_mesa3d-ca23c8081f1f9f709df7a63b9e6de379c0b8df44.tar.bz2
nv50/ir: fix quadop emission in the presence of predication
When there's a predicate, it just goes onto the sources list. If the quadop only has a single regular source, we will end up thinking that the predicate is the second source. Check explicitly for the predSrc so that we don't accidentally emit the wrong thing. This fixes a bunch of dEQP-GLES3.functional.shaders.derivate.* tests. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Cc: mesa-stable@lists.freedesktop.org
Diffstat (limited to 'src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp')
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
index bc8354d..682a19d 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
@@ -527,7 +527,8 @@ CodeEmitterNV50::emitForm_ADD(const Instruction *i)
setSrcFileBits(i, NV50_OP_ENC_LONG_ALT);
setSrc(i, 0, 0);
- setSrc(i, 1, 2);
+ if (i->predSrc != 1)
+ setSrc(i, 1, 2);
if (i->getIndirect(0, 0)) {
assert(!i->getIndirect(1, 0));
@@ -840,7 +841,7 @@ CodeEmitterNV50::emitQUADOP(const Instruction *i, uint8_t lane, uint8_t quOp)
emitForm_ADD(i);
- if (!i->srcExists(1))
+ if (!i->srcExists(1) || i->predSrc == 1)
srcId(i->src(0), 32 + 14);
}