diff --git a/src/panfrost/midgard/midgard.h b/src/panfrost/midgard/midgard.h index d7715c697cd..2121dc4790b 100644 --- a/src/panfrost/midgard/midgard.h +++ b/src/panfrost/midgard/midgard.h @@ -937,8 +937,8 @@ __attribute__((__packed__)) * be any dependency (the blob appears to forbid even accessing other * channels of a given texture register). */ - unsigned out_of_order : 2; - unsigned unknown4 : 10; + unsigned out_of_order : 4; + unsigned unknown4 : 8; /* In immediate mode, each offset field is an immediate range [0, 7]. * diff --git a/src/panfrost/midgard/midgard_emit.c b/src/panfrost/midgard/midgard_emit.c index 716e434b7bc..52dd4a85968 100644 --- a/src/panfrost/midgard/midgard_emit.c +++ b/src/panfrost/midgard/midgard_emit.c @@ -416,10 +416,11 @@ mir_pack_swizzle_tex(midgard_instruction *ins) /* TODO: bias component */ } -/* Up to 3 { ALU, LDST } bundles can execute in parallel with a texture op. +/* + * Up to 15 { ALU, LDST } bundles can execute in parallel with a texture op. * Given a texture op, lookahead to see how many such bundles we can flag for - * OoO execution */ - + * OoO execution + */ static bool mir_can_run_ooo(midgard_block *block, midgard_bundle *bundle, unsigned dependency) @@ -432,11 +433,14 @@ mir_can_run_ooo(midgard_block *block, midgard_bundle *bundle, if (!IS_ALU(bundle->tag) && bundle->tag != TAG_LOAD_STORE_4) return false; - /* Ensure there is no read-after-write dependency */ - for (unsigned i = 0; i < bundle->instruction_count; ++i) { midgard_instruction *ins = bundle->instructions[i]; + /* No branches, jumps, or discards */ + if (ins->compact_branch) + return false; + + /* No read-after-write data dependencies */ mir_foreach_src(ins, s) { if (ins->src[s] == dependency) return false; @@ -452,7 +456,7 @@ mir_pack_tex_ooo(midgard_block *block, midgard_bundle *bundle, midgard_instructi { unsigned count = 0; - for (count = 0; count < 3; ++count) { + for (count = 0; count < 15; ++count) { if (!mir_can_run_ooo(block, bundle + count + 1, ins->dest)) break; }