summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Mirkin <imirkin@alum.mit.edu>2021-02-24 22:15:04 -0500
committerIlia Mirkin <imirkin@alum.mit.edu>2021-04-11 12:31:22 -0400
commitaf8665c3a5bc91b2132c31e8ff619592f9472140 (patch)
tree3ff2d0da294b547772728e94cf7c7a25e8d9c411
parent96e8e74813b142a1681c9eef49ca71d49db0502b (diff)
nv50/ir: fix emission of logic ops on half-regs
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Acked-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9299>
-rw-r--r--src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp8
1 files changed, 5 insertions, 3 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 a65c59e9ec1..a15b43a92e4 100644
--- a/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
+++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_emit_nv50.cpp
@@ -1614,13 +1614,15 @@ CodeEmitterNV50::emitLogicOp(const Instruction *i)
emitForm_IMM(i);
} else {
switch (i->op) {
- case OP_AND: code[1] = 0x04000000; break;
- case OP_OR: code[1] = 0x04004000; break;
- case OP_XOR: code[1] = 0x04008000; break;
+ case OP_AND: code[1] = 0x00000000; break;
+ case OP_OR: code[1] = 0x00004000; break;
+ case OP_XOR: code[1] = 0x00008000; break;
default:
assert(0);
break;
}
+ if (typeSizeof(i->dType) == 4)
+ code[1] |= 0x04000000;
if (i->src(0).mod & Modifier(NV50_IR_MOD_NOT))
code[1] |= 1 << 16;
if (i->src(1).mod & Modifier(NV50_IR_MOD_NOT))