mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-16 04:38:30 +02:00
nv50/ir: set position before i instead of i->next in NV50LoweringPreSSA::visit
Fixes rendering glitches in Psychonauts such as Raz's eyes flickering white. Fixes https://bugs.freedesktop.org/show_bug.cgi?id=51962.
This commit is contained in:
parent
b2a44cde64
commit
248e6f0331
1 changed files with 2 additions and 7 deletions
|
|
@ -701,6 +701,7 @@ NV50LoweringPreSSA::handleTXL(TexInstruction *i)
|
|||
BasicBlock *texiBB = i->bb->splitBefore(i, false);
|
||||
BasicBlock *joinBB = i->bb->splitAfter(i);
|
||||
|
||||
bld.setPosition(currBB, true);
|
||||
currBB->joinAt = bld.mkFlow(OP_JOINAT, joinBB, CC_ALWAYS, NULL);
|
||||
|
||||
for (int l = 0; l <= 3; ++l) {
|
||||
|
|
@ -1030,13 +1031,7 @@ NV50LoweringPreSSA::checkPredicate(Instruction *insn)
|
|||
bool
|
||||
NV50LoweringPreSSA::visit(Instruction *i)
|
||||
{
|
||||
if (i->prev)
|
||||
bld.setPosition(i->prev, true);
|
||||
else
|
||||
if (i->next)
|
||||
bld.setPosition(i->next, false);
|
||||
else
|
||||
bld.setPosition(i->bb, true);
|
||||
bld.setPosition(i, false);
|
||||
|
||||
if (i->cc != CC_ALWAYS)
|
||||
checkPredicate(i);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue