nvc0/ir: can't have a join on a load with an indirect source
authorIlia Mirkin <imirkin@alum.mit.edu>
Thu, 18 Jun 2015 02:18:09 +0000 (22:18 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 18 Jun 2015 02:23:20 +0000 (22:23 -0400)
Triggers an INVALID_OPCODE warning on GK208. Seems rare enough to not
warrant verification on other chips. Fixes the new piglits:

  ubo_array_indexing/fs-nonuniform-control-flow.shader_test
  ubo_array_indexing/vs-nonuniform-control-flow.shader_test

Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Cc: "10.5 10.6" <mesa-stable@lists.freedesktop.org>
src/gallium/drivers/nouveau/codegen/nv50_ir_peephole.cpp

index b7fcd56724dc87be9a8f5dfb16e1c2038448def2..ae739eeda83c63b460759de2cdf398f2270b40e5 100644 (file)
@@ -2288,7 +2288,7 @@ FlatteningPass::visit(BasicBlock *bb)
              insn->op != OP_LINTERP && // probably just nve4
              insn->op != OP_PINTERP && // probably just nve4
              ((insn->op != OP_LOAD && insn->op != OP_STORE) ||
-              typeSizeof(insn->dType) <= 4) &&
+              (typeSizeof(insn->dType) <= 4 && !insn->src(0).isIndirect(0))) &&
              !insn->isNop()) {
             insn->join = 1;
             bb->remove(bb->getExit());