mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-09 08:20:12 +01:00
asahi: Preserve atomic ops when rewriting image to bindless
Bug fix on its own, and prevents regressions from using bindless more. Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24847>
This commit is contained in:
parent
8ae3eebba4
commit
58efa64c5c
1 changed files with 8 additions and 0 deletions
|
|
@ -82,8 +82,16 @@ lower(nir_builder *b, nir_instr *instr, void *data)
|
|||
}
|
||||
}
|
||||
|
||||
nir_atomic_op op = nir_atomic_op_iadd /* irrelevant */;
|
||||
if (nir_intrinsic_has_atomic_op(intr))
|
||||
op = nir_intrinsic_atomic_op(intr);
|
||||
|
||||
/* Otherwise, lower to bindless */
|
||||
intr->intrinsic = bindless_op;
|
||||
|
||||
if (nir_intrinsic_has_atomic_op(intr))
|
||||
nir_intrinsic_set_atomic_op(intr, op);
|
||||
|
||||
*internal_bindless = true;
|
||||
|
||||
index = nir_iadd_imm(b, nir_imul_imm(b, index, 2), offset);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue