From 2e377190f58a738f5c352dbf7c73a59394d1921d Mon Sep 17 00:00:00 2001 From: Asahi Lina Date: Wed, 10 May 2023 15:11:36 +0900 Subject: [PATCH] asahi: Disable tilebuffer write masking optimization This seems to flake some dEQPs due to some kind of race/UB (which doesn't even always cause the dEQPs to fail due to leeway in the image comparison, since the problem is usually just a few pixels, but it's there). I spent a bunch of time trying other flags/things, and almost everything changed the bad pixel pattern randomly but nothing fixed it. Let's revisit this one later, since it looks like a pretty deep rabbit hole. Signed-off-by: Asahi Lina Part-of: --- src/gallium/drivers/asahi/agx_state.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/gallium/drivers/asahi/agx_state.c b/src/gallium/drivers/asahi/agx_state.c index f37e56cae44..4dad95e4106 100644 --- a/src/gallium/drivers/asahi/agx_state.c +++ b/src/gallium/drivers/asahi/agx_state.c @@ -1379,7 +1379,11 @@ agx_compile_variant(struct agx_device *dev, struct agx_uncompiled_shader *so, uint8_t colormasks[PIPE_MAX_COLOR_BUFS] = {0}; for (unsigned i = 0; i < PIPE_MAX_COLOR_BUFS; ++i) { - if (agx_tilebuffer_supports_mask(&tib, i)) { + /* TODO: Flakes some dEQPs, seems to invoke UB. Revisit later. + * dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.77 + * dEQP-GLES2.functional.fragment_ops.interaction.basic_shader.98 + */ + if (0 /* agx_tilebuffer_supports_mask(&tib, i) */) { colormasks[i] = key->blend.rt[i].colormask; opts.rt[i].colormask = BITFIELD_MASK(4); } else {