nvc0/ir: offset appears to come before the Z ref
Fixes textureGatherOffset when used with a shadow sampler. Also verified against blob compiler with textureLodOffset manually (no piglit tests for texture[Lod]Offset + shadow samplers). Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
This commit is contained in:
parent
50034c0171
commit
f782d6e792
|
@ -737,10 +737,12 @@ NVC0LoweringPass::handleTEX(TexInstruction *i)
|
|||
assert(chipset >= NVISA_GK104_CHIPSET ||
|
||||
!i->tex.useOffsets || !i->tex.target.isMS());
|
||||
|
||||
// offset is last source (lod 1st, dc 2nd)
|
||||
// offset is between lod and dc
|
||||
if (i->tex.useOffsets) {
|
||||
int n, c;
|
||||
int s = i->srcCount(0xff, true);
|
||||
if (i->tex.target.isShadow())
|
||||
s--;
|
||||
if (i->srcExists(s)) // move potential predicate out of the way
|
||||
i->moveSources(s, 1);
|
||||
if (i->tex.useOffsets == 4 && i->srcExists(s + 1))
|
||||
|
|
Loading…
Reference in New Issue