From: Samuel Pitoiset Date: Wed, 27 Apr 2016 16:27:10 +0000 (+0200) Subject: nv50/ir: fix tex constraints for surface coords on Fermi X-Git-Tag: upstream/17.1.0~9599 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=8aa1fd321dd26a9e3cd348f218f102a6debebe92;p=platform%2Fupstream%2Fmesa.git nv50/ir: fix tex constraints for surface coords on Fermi Signed-off-by: Samuel Pitoiset Reviewed-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp index 65d11f8..6b52d7b 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp @@ -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() &&