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>
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);
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);