diff options
author | Christoph Bumiller <[email protected]> | 2011-10-14 19:58:04 +0200 |
---|---|---|
committer | Christoph Bumiller <[email protected]> | 2011-10-21 23:00:38 +0200 |
commit | 37a08ddce54d28f90dc8db8e10792d0759938590 (patch) | |
tree | 5bd0b8abe0c5fd7561aa68e1c206acf23a26d15b /src/gallium/drivers/nvc0 | |
parent | 2ec5c8feb331af29548e98b0e78e810bbbc7009e (diff) |
nv50/ir: fix argument count for CUBE_ARRAY texture target
Diffstat (limited to 'src/gallium/drivers/nvc0')
-rw-r--r-- | src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp index 4b448c6900f..2ef5a87c47d 100644 --- a/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nvc0/codegen/nv50_ir_lowering_nvc0.cpp @@ -307,14 +307,14 @@ NVC0LoweringPass::visit(BasicBlock *bb) bool NVC0LoweringPass::handleTEX(TexInstruction *i) { - const int dim = i->tex.target.getDim(); - const int arg = i->tex.target.getDim() + i->tex.target.isArray(); + const int dim = i->tex.target.getDim() + i->tex.target.isCube(); + const int arg = i->tex.target.getArgCount(); // generate and move the tsc/tic/array source to the front if (dim != arg || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) { LValue *src = new_LValue(func, FILE_GPR); // 0xttxsaaaa - Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(dim) : NULL; + Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(arg - 1) : NULL; for (int s = dim; s >= 1; --s) i->setSrc(s, i->getSrc(s - 1)); i->setSrc(0, arrayIndex); |