nv50/ir: fix tex constraints for surface coords on Fermi
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Wed, 27 Apr 2016 16:27:10 +0000 (18:27 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Sat, 21 May 2016 16:32:49 +0000 (18:32 +0200)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Ilia Mirkin <imirkin@alum.mit.edu>
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp

index 65d11f8..6b52d7b 100644 (file)
@@ -2152,6 +2152,12 @@ RegAlloc::InsertConstraintsPass::texConstraintNVC0(TexInstruction *tex)
    if (tex->op == OP_TXQ) {
       s = tex->srcCount(0xff);
       n = 0;
+   } else if (isSurfaceOp(tex->op)) {
+      s = tex->tex.target.getDim() + (tex->tex.target.isArray() || tex->tex.target.isCube());
+      if (tex->op == OP_SUSTB || tex->op == OP_SUSTP)
+         n = 4;
+      else
+         n = 0;
    } else {
       s = tex->tex.target.getArgCount() - tex->tex.target.isMS();
       if (!tex->tex.target.isArray() &&