mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-22 15:40:11 +01:00
gk104/ir: fix conditions for adding a texbar
Sometimes a register source can actually be double- or even quad-wide. We must make sure that the inserted texbars take that width into account. Based on an earlier patch by Samuel Pitoiset. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com> Cc: "12.0 11.2" <mesa-stable@lists.freedesktop.org>
This commit is contained in:
parent
8239da28e8
commit
71ad8a173f
1 changed files with 6 additions and 4 deletions
|
|
@ -227,18 +227,20 @@ NVC0LegalizePostRA::findFirstUsesBB(
|
|||
continue;
|
||||
|
||||
for (int d = 0; insn->defExists(d); ++d) {
|
||||
const Value *def = insn->def(d).rep();
|
||||
if (insn->def(d).getFile() != FILE_GPR ||
|
||||
insn->def(d).rep()->reg.data.id < minGPR ||
|
||||
insn->def(d).rep()->reg.data.id > maxGPR)
|
||||
def->reg.data.id + def->reg.size / 4 - 1 < minGPR ||
|
||||
def->reg.data.id > maxGPR)
|
||||
continue;
|
||||
addTexUse(uses, insn, texi);
|
||||
return;
|
||||
}
|
||||
|
||||
for (int s = 0; insn->srcExists(s); ++s) {
|
||||
const Value *src = insn->src(s).rep();
|
||||
if (insn->src(s).getFile() != FILE_GPR ||
|
||||
insn->src(s).rep()->reg.data.id < minGPR ||
|
||||
insn->src(s).rep()->reg.data.id > maxGPR)
|
||||
src->reg.data.id + src->reg.size / 4 - 1 < minGPR ||
|
||||
src->reg.data.id > maxGPR)
|
||||
continue;
|
||||
addTexUse(uses, insn, texi);
|
||||
return;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue