From 272dcaff012caf9d61f51a9d37a43cd03b1d6b42 Mon Sep 17 00:00:00 2001 From: "Eric R. Smith" Date: Thu, 23 May 2024 20:26:37 -0300 Subject: [PATCH] panfrost: fix some omissions in valhall flow control The code for checking flow control did not realize that `LD_TEX` and `LD_TEX_IMM` were memory accesses, and hence was not inserting waits where these were necessary. This showed up as flakes in KHR-GLES31.core.shader_image_load_store.basic-glsl-misc-fs Cc: mesa-stable Reviewed-by: Boris Brezillon Part-of: --- src/panfrost/compiler/valhall/va_insert_flow.c | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/panfrost/compiler/valhall/va_insert_flow.c b/src/panfrost/compiler/valhall/va_insert_flow.c index 5cbe6a13ad6..00560c60b31 100644 --- a/src/panfrost/compiler/valhall/va_insert_flow.c +++ b/src/panfrost/compiler/valhall/va_insert_flow.c @@ -115,9 +115,16 @@ bi_ld_vary_writes_hidden_register(const bi_instr *I) static bool bi_is_memory_access(const bi_instr *I) { - /* On the attribute unit but functionally a general memory load */ - if (I->op == BI_OPCODE_LD_ATTR_TEX) + /* Some instructions on the attribute unit are functionally + a general memory load */ + switch (I->op) { + case BI_OPCODE_LD_ATTR_TEX: + case BI_OPCODE_LD_TEX: + case BI_OPCODE_LD_TEX_IMM: return true; + default: + break; + } /* UBOs are read-only so there are no ordering constriants */ if (I->seg == BI_SEG_UBO)