[Mesa-dev] [PATCH v3 3/8] nv50/ir: fix tex constraints for surface coords on Fermi
Samuel Pitoiset
samuel.pitoiset at gmail.com
Sat May 21 15:16:56 UTC 2016
v2: - fix for surface stores (ilia)
Signed-off-by: Samuel Pitoiset <samuel.pitoiset at gmail.com>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu> (v1)
---
src/gallium/drivers/nouveau/codegen/nv50_ir_ra.cpp | 6 ++++++
1 file changed, 6 insertions(+)
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() &&
--
2.8.2
More information about the mesa-dev
mailing list