From: Ilia Mirkin Date: Fri, 11 Sep 2015 03:58:17 +0000 (-0400) Subject: nvc0/ir: start offset at texBindBase for txq, like regular texturing X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=92b62b8870687f96adf101bc26ce61801dc4b29f;p=android-x86%2Fexternal-mesa.git nvc0/ir: start offset at texBindBase for txq, like regular texturing Curiously this has no actual effect. I think it's because the first 8 textures are bound in multiple slots for some reason. However seems prudent to use these the same way as regular texturing, esp in the case where there are more than 8 textures bound. Signed-off-by: Ilia Mirkin (cherry picked from commit 5877a594d54fdd2b3aa329f4d35b3491a7ee8a33) Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=93110 --- 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 b1f406585a9..b3fc73a2beb 100644 --- a/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp +++ b/src/gallium/drivers/nouveau/codegen/nv50_ir_lowering_nvc0.cpp @@ -962,11 +962,14 @@ NVC0LoweringPass::handleTXD(TexInstruction *txd) bool NVC0LoweringPass::handleTXQ(TexInstruction *txq) { + const int chipset = prog->getTarget()->getChipset(); + if (chipset >= NVISA_GK104_CHIPSET && txq->tex.rIndirectSrc < 0) + txq->tex.r += prog->driver->io.texBindBase / 4; + if (txq->tex.rIndirectSrc < 0) return true; Value *ticRel = txq->getIndirectR(); - const int chipset = prog->getTarget()->getChipset(); txq->setIndirectS(NULL); txq->tex.sIndirectSrc = -1;