mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-10 06:00:14 +01:00
gm107/ir: fix texturing with indirect samplers
The indirect handle has to come right after the coordinates, so if there was a sample/bias/depth compare/offset, everything would end up being shifted by one argument position. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: mesa-stable@lists.freedesktop.org
This commit is contained in:
parent
34099894c3
commit
ecea2f69ef
1 changed files with 10 additions and 0 deletions
|
|
@ -751,6 +751,16 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
|||
i->tex.rIndirectSrc = 0;
|
||||
i->tex.sIndirectSrc = -1;
|
||||
}
|
||||
// Move the indirect reference to right after the coords
|
||||
else if (i->tex.rIndirectSrc >= 0 && chipset >= NVISA_GM107_CHIPSET) {
|
||||
Value *hnd = i->getIndirectR();
|
||||
|
||||
i->setIndirectR(NULL);
|
||||
i->moveSources(arg, 1);
|
||||
i->setSrc(arg, hnd);
|
||||
i->tex.rIndirectSrc = 0;
|
||||
i->tex.sIndirectSrc = -1;
|
||||
}
|
||||
} else
|
||||
// (nvc0) generate and move the tsc/tic/array source to the front
|
||||
if (i->tex.target.isArray() || i->tex.rIndirectSrc >= 0 || i->tex.sIndirectSrc >= 0) {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue