summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorIlia Mirkin <[email protected]>2015-09-10 03:55:06 -0400
committerEmil Velikov <[email protected]>2015-09-11 19:19:31 +0100
commit94b8f60146f47709ff22a4f76ecf044176dd6a3d (patch)
treec3306f65079e71b492daa4a9cd1ec5354a099fd2
parent94bf2e2e0551413c149950cb924c0c33c3a330d2 (diff)
nv50/ir: fix emission of 8-byte wide interp instruction
This can come up if the target register number is > 63, which is fairly rare. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=91551 Signed-off-by: Ilia Mirkin <[email protected]> Cc: "11.0" <[email protected]> (cherry picked from commit ce28ca713364dbe83cb3c371ca034bc2c2947616)
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp11
1 files changed, 6 insertions, 5 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 67ea6df773c..90147668c91 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
@@ -884,7 +884,7 @@ CodeEmitterNV50::emitINTERP(const Instruction *i)
defId(i->def(0), 2);
srcAddr8(i->src(0), 16);
- if (i->getInterpMode() == NV50_IR_INTERP_FLAT) {
+ if (i->encSize != 8 && i->getInterpMode() == NV50_IR_INTERP_FLAT) {
code[0] |= 1 << 8;
} else {
if (i->op == OP_PINTERP) {
@@ -896,10 +896,11 @@ CodeEmitterNV50::emitINTERP(const Instruction *i)
}
if (i->encSize == 8) {
- code[1] =
- (code[0] & (3 << 24)) >> (24 - 16) |
- (code[0] & (1 << 8)) << (18 - 8);
- code[0] &= ~0x03000100;
+ if (i->getInterpMode() == NV50_IR_INTERP_FLAT)
+ code[1] = 4 << 16;
+ else
+ code[1] = (code[0] & (3 << 24)) >> (24 - 16);
+ code[0] &= ~0x03000000;
code[0] |= 1;
emitFlagsRd(i);
}