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

Author: Alyssa Rosenzweig <[email protected]>
Date:   Sat Mar  4 11:43:04 2023 -0500

agx: Don't write sample mask from preambles

It doesn't make sense, they're basically little compute kernel environments.
Noticed while debugging dEQP-GLES31.functional.fbo.no_attachments.multisample.*

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

---

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

diff --git a/src/asahi/compiler/agx_compile.c b/src/asahi/compiler/agx_compile.c
index d9782ea52f6..b8d1333b401 100644
--- a/src/asahi/compiler/agx_compile.c
+++ b/src/asahi/compiler/agx_compile.c
@@ -2087,7 +2087,10 @@ agx_compile_function_nir(nir_shader *nir, 
nir_function_impl *impl,
     */
    agx_block *last_block = list_last_entry(&ctx->blocks, agx_block, link);
    agx_builder _b = agx_init_builder(ctx, agx_after_block(last_block));
-   agx_write_sample_mask_1(&_b);
+
+   if (ctx->stage == MESA_SHADER_FRAGMENT && !impl->function->is_preamble)
+      agx_write_sample_mask_1(&_b);
+
    agx_logical_end(&_b);
    agx_stop(&_b);
 

Reply via email to