diff options
author | Samuel Pitoiset <samuel.pitoiset@gmail.com> | 2016-10-21 17:43:00 +0200 |
---|---|---|
committer | Emil Velikov <emil.l.velikov@gmail.com> | 2016-10-27 11:28:30 +0100 |
commit | 5c004253543eb1ebc492be127f21cc8cd335384a (patch) | |
tree | e188cf72662f77e87362cf4aa526acfc9a26e0df /src/gallium | |
parent | 6458a9dc6cb045ea297bfcd4d652c8f7e55911ab (diff) | |
download | external_mesa3d-5c004253543eb1ebc492be127f21cc8cd335384a.zip external_mesa3d-5c004253543eb1ebc492be127f21cc8cd335384a.tar.gz external_mesa3d-5c004253543eb1ebc492be127f21cc8cd335384a.tar.bz2 |
nvc0/ir: fix emission of SHLADD with NEG modifiers
This affects GF100:GK110 chipsets, but not GM107+ where the
logic is a bit different. The emitters tried to emit sub
instead of subr when src0 has a NEG modifier.
This fixes the following piglit tests glsl-fs-loop-nested
and glsl-vs-loop-nested.
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "13.0" <mesa-stable@lists.freedesktop.org>
(cherry picked from commit 1ec7227d44dceae8de7b93f846bbd33d66007909)
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp | 2 | ||||
-rw-r--r-- | src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp index ce20ed3..dbba4b1 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_gk110.cpp @@ -760,7 +760,7 @@ CodeEmitterGK110::emitISAD(const Instruction *i) void CodeEmitterGK110::emitSHLADD(const Instruction *i) { - uint8_t addOp = (i->src(2).mod.neg() << 1) | i->src(0).mod.neg(); + uint8_t addOp = (i->src(0).mod.neg() << 1) | i->src(2).mod.neg(); const ImmediateValue *imm = i->src(1).get()->asImm(); assert(imm); diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp index 0be9f7a..3d3e1cb 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nvc0.cpp @@ -762,7 +762,7 @@ CodeEmitterNVC0::emitIMAD(const Instruction *i) void CodeEmitterNVC0::emitSHLADD(const Instruction *i) { - uint8_t addOp = (i->src(2).mod.neg() << 1) | i->src(0).mod.neg(); + uint8_t addOp = (i->src(0).mod.neg() << 1) | i->src(2).mod.neg(); const ImmediateValue *imm = i->src(1).get()->asImm(); assert(imm); |