From e12a9ce8d691a311cd37eecbdeadb30400adeb95 Mon Sep 17 00:00:00 2001 From: Alyssa Rosenzweig Date: Fri, 19 Aug 2022 19:22:14 -0400 Subject: [PATCH] pan/bi: Don't reorder image loads across stores Fixes flaking in dEQP-GLES31.functional.image_load_store.cube.qualifiers.volatile_r32i due to image reads being moved past a BARRIER. To make this more robust/optimal, we probably need scheduling information (coherent/volatile/etc) added to instructions like ACO does. That's left for a future extension, for now I just want the test to stop flaking. Fixes: 569e5dc7450 ("pan/bi: Schedule for pressure pre-RA") Signed-off-by: Alyssa Rosenzweig Part-of: --- src/panfrost/bifrost/bi_pressure_schedule.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/src/panfrost/bifrost/bi_pressure_schedule.c b/src/panfrost/bifrost/bi_pressure_schedule.c index f27331cb16a..b6d1309f242 100644 --- a/src/panfrost/bifrost/bi_pressure_schedule.c +++ b/src/panfrost/bifrost/bi_pressure_schedule.c @@ -144,6 +144,20 @@ create_dag(bi_context *ctx, bi_block *block, void *memctx) break; + case BIFROST_MESSAGE_ATTRIBUTE: + /* Regular attribute loads can be reordered, but + * writeable attributes can't be. Our one use of + * writeable attributes are images. + */ + if ((I->op == BI_OPCODE_LD_TEX) || + (I->op == BI_OPCODE_LD_TEX_IMM) || + (I->op == BI_OPCODE_LD_ATTR_TEX)) { + add_dep(node, memory_store); + memory_load = node; + } + + break; + case BIFROST_MESSAGE_STORE: assert(I->seg != BI_SEG_UBO); add_dep(node, memory_load);