mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-04 10:58:15 +02:00
nir/deref: consider atomics that store derefs as complex use
src[1] or src[2] would mean that the atomic uses the deref as data for the
op, we only want to allow address source uses.
Fixes: bb311ce370 ("nir: Allow atomics as non-complex uses for var-splitting passes")
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41818>
This commit is contained in:
parent
6d0b1ebd3d
commit
dea444f80f
1 changed files with 2 additions and 1 deletions
|
|
@ -230,7 +230,8 @@ nir_deref_instr_has_complex_use(nir_deref_instr *deref,
|
|||
|
||||
case nir_intrinsic_deref_atomic:
|
||||
case nir_intrinsic_deref_atomic_swap:
|
||||
if (opts & nir_deref_instr_has_complex_use_allow_atomics)
|
||||
if (use_src == &use_intrin->src[0] &&
|
||||
(opts & nir_deref_instr_has_complex_use_allow_atomics))
|
||||
continue;
|
||||
return true;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue