From 7c74d46567f30f82a4cd6a62910aec13f45c17ad 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: (cherry picked from commit 272dcaff012caf9d61f51a9d37a43cd03b1d6b42) --- .pick_status.json | 2 +- src/panfrost/compiler/valhall/va_insert_flow.c | 11 +++++++++-- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/.pick_status.json b/.pick_status.json index ab4be5f9862..af7e423babc 100644 --- a/.pick_status.json +++ b/.pick_status.json @@ -2044,7 +2044,7 @@ "description": "panfrost: fix some omissions in valhall flow control", "nominated": true, "nomination_type": 0, - "resolution": 0, + "resolution": 1, "main_sha": null, "because_sha": null, "notes": null 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)