diff options
author | Christoph Bumiller <[email protected]> | 2011-10-11 17:58:14 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-10-21 23:00:39 +0200 |
commit | 9c930639d9f6d713ccfd16b390a41a9f584f348c (patch) | |
tree | b8b1b5c37b2bdab168ecdbab1a16a93749094fd8 /src/gallium/drivers/nv50 | |
parent | 0e4e0ca6df52ddecd1bb2fe9a427549d1a82b9f9 (diff) |
nv50/ir: fix textureGrad with offsets and in non-FPs
Diffstat (limited to 'src/gallium/drivers/nv50')
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir.h | 1 | ||||
-rw-r--r-- | src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir.h b/src/gallium/drivers/nv50/codegen/nv50_ir.h index 88306087a98..cf7bd3c0d05 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir.h +++ b/src/gallium/drivers/nv50/codegen/nv50_ir.h @@ -803,6 +803,7 @@ public: bool liveOnly; // only execute on live pixels of a quad (optimization) bool levelZero; + bool derivAll; int8_t useOffsets; // 0, 1, or 4 for textureGatherOffsets int8_t offset[4][3]; diff --git a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp index ea5f4723f3c..ff6d9666a19 100644 --- a/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp +++ b/src/gallium/drivers/nv50/codegen/nv50_ir_ra.cpp @@ -933,6 +933,8 @@ RegAlloc::InsertConstraintsPass::visit(BasicBlock *bb) if (!tex->tex.target.isArray() && (tex->tex.rIndirectSrc >= 0 || tex->tex.sIndirectSrc >= 0)) ++s; + if (tex->op == OP_TXD && tex->tex.useOffsets) + ++s; n = tex->srcCount(0xff) - s; assert(n <= 4); } |