From: Ilia Mirkin Date: Wed, 6 Aug 2014 05:22:49 +0000 (-0400) Subject: nvc0/ir: add base tex offset for fermi indirect tex case X-Git-Tag: android-x86-4.4-r3~3774 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=af3619e88043ce85560b8220dc16244f8898a926;p=android-x86%2Fexternal-mesa.git nvc0/ir: add base tex offset for fermi indirect tex case Signed-off-by: Ilia Mirkin --- diff --git a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp index f010767e18a..4a9e48f7f6f 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -603,10 +603,18 @@ NVC0LoweringPass::handleTEX(TexInstruction *i) Value *ticRel = i->getIndirectR(); Value *tscRel = i->getIndirectS(); - if (ticRel) + if (ticRel) { i->setSrc(i->tex.rIndirectSrc, NULL); - if (tscRel) + if (i->tex.r) + ticRel = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getScratch(), + ticRel, bld.mkImm(i->tex.r)); + } + if (tscRel) { i->setSrc(i->tex.sIndirectSrc, NULL); + if (i->tex.s) + tscRel = bld.mkOp2v(OP_ADD, TYPE_U32, bld.getScratch(), + tscRel, bld.mkImm(i->tex.s)); + } Value *arrayIndex = i->tex.target.isArray() ? i->getSrc(lyr) : NULL; for (int s = dim; s >= 1; --s)