agx: Move nir_lower_fragcolor out of agx_preprocess_nir
authorMary <mary@mary.zone>
Fri, 11 Aug 2023 10:18:47 +0000 (12:18 +0200)
committerMarge Bot <emma+marge@anholt.net>
Fri, 11 Aug 2023 20:31:28 +0000 (20:31 +0000)
commit0f4e3a03fd8729ff97df82c1bc29988d41b0beae
tree42bd216b0aea184c6d69771c6b56962904a1a70b
parent3704caca0b99f158e1a9eb4a6b39c0d88defa1cd
agx: Move nir_lower_fragcolor out of agx_preprocess_nir

Do not apply "nir_lower_fragcolor" in the common code.

This fix a crash on agxv side when a frag shader have SSBO writes.

This is caused by "nir_lower_frag_color" assuming that every
"store_deref" will have a variable backing the
output.

Signed-off-by: Mary <mary@mary.zone>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24635>
src/asahi/compiler/agx_compile.c
src/gallium/drivers/asahi/agx_state.c