nvc0/ir: account for indirect textures on fermi for txd
authorIlia Mirkin <imirkin@alum.mit.edu>
Wed, 9 Jul 2014 04:42:52 +0000 (00:42 -0400)
committerIlia Mirkin <imirkin@alum.mit.edu>
Thu, 10 Jul 2014 01:10:24 +0000 (21:10 -0400)
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp

index c102bc5214cfca4d4a39a9f0af0e91794e082ddf..bc95cd843ea7334bbc75e89802f150d75b1dde93 100644 (file)
@@ -787,6 +787,9 @@ NVC0LoweringPass::handleTXD(TexInstruction *txd)
    } else {
       if (txd->tex.useOffsets)
          expected_args++;
+      if (!txd->tex.target.isArray() && (
+                txd->tex.rIndirectSrc >= 0 || txd->tex.sIndirectSrc >= 0))
+         expected_args++;
    }
 
    if (expected_args > 4 ||