mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-08 18:58:17 +02:00
nv50/ir: "zero" register does not work with g[] memory
Evidence suggests that having it anywhere, even as a regular e.g. atom argument, causes issues. Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu> Reviewed-by: Karol Herbst <kherbst@redhat.com> Acked-by: Pierre Moreau <dev@pmoreau.org> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10164>
This commit is contained in:
parent
21f9b1cbe7
commit
348db055dd
1 changed files with 5 additions and 1 deletions
|
|
@ -278,10 +278,14 @@ TargetNV50::insnCanLoad(const Instruction *i, int s,
|
|||
DataFile sf = ld->src(0).getFile();
|
||||
|
||||
// immediate 0 can be represented by GPR $r63/$r127
|
||||
// this does not work with global memory ld/st/atom
|
||||
if (sf == FILE_IMMEDIATE && ld->getSrc(0)->reg.data.u64 == 0)
|
||||
return (!i->isPseudo() &&
|
||||
!i->asTex() &&
|
||||
i->op != OP_EXPORT && i->op != OP_STORE);
|
||||
i->op != OP_EXPORT &&
|
||||
i->op != OP_STORE &&
|
||||
((i->op != OP_ATOM && i->op != OP_LOAD) ||
|
||||
i->src(0).getFile() != FILE_MEMORY_GLOBAL));
|
||||
|
||||
if (sf == FILE_IMMEDIATE && (i->predSrc >= 0 || i->flagsDef >= 0))
|
||||
return false;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue