nv50/ir: do not try to attach JOIN ops to ATOM
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 7 Apr 2016 20:38:47 +0000 (22:38 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Thu, 7 Apr 2016 21:10:26 +0000 (23:10 +0200)
This might result in an INVALID_OPCODE dmesg error in case a join is
attached to an atomic operation.

Spotted with arb_shader_image_load_store-host-mem-barrier on GK104.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Acked-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: mesa-stable@lists.freedesktop.org
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp

index 66e7b2e824394e436587b0a68f15f73ad7b948d6..fea388685fabfe0b2af6d5f0eac274f511d623e8 100644 (file)
@@ -2824,7 +2824,7 @@ FlatteningPass::visit(BasicBlock *bb)
              !isSurfaceOp(insn->op) && // not confirmed
              insn->op != OP_LINTERP && // probably just nve4
              insn->op != OP_PINTERP && // probably just nve4
-             ((insn->op != OP_LOAD && insn->op != OP_STORE) ||
+             ((insn->op != OP_LOAD && insn->op != OP_STORE && insn->op != OP_ATOM) ||
               (typeSizeof(insn->dType) <= 4 && !insn->src(0).isIndirect(0))) &&
              !insn->isNop()) {
             insn->join = 1;