Module: Mesa
Branch: main
Commit: 290f3b76f305abaa24332cbc751a7a3b005e41cf
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=290f3b76f305abaa24332cbc751a7a3b005e41cf

Author: Alyssa Rosenzweig <[email protected]>
Date:   Sun Feb 19 15:30:10 2023 -0500

agx: Disable tri merging with side effects

As Metal does.

Signed-off-by: Alyssa Rosenzweig <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/21712>

---

 src/asahi/compiler/agx_compile.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c
index f9fc8e47877..7f9358ca71e 100644
--- a/src/asahi/compiler/agx_compile.c
+++ b/src/asahi/compiler/agx_compile.c
@@ -2316,7 +2316,8 @@ agx_compile_shader_nir(nir_shader *nir, struct 
agx_shader_key *key,
    } else if (nir->info.stage == MESA_SHADER_FRAGMENT) {
       out->no_colour_output = !(nir->info.outputs_written >> 
FRAG_RESULT_DATA0);
       out->disable_tri_merging = nir->info.fs.needs_all_helper_invocations ||
-                                 nir->info.fs.needs_quad_helper_invocations;
+                                 nir->info.fs.needs_quad_helper_invocations ||
+                                 nir->info.writes_memory;
 
       /* Report a canonical depth layout */
       enum gl_frag_depth_layout layout = nir->info.fs.depth_layout;

Reply via email to