From 1490e7e622d1b3ffe35ad9f577f13744497c0169 Mon Sep 17 00:00:00 2001 From: Icecream95 Date: Mon, 7 Jun 2021 19:21:41 +1200 Subject: [PATCH] pan/mdg: Add a bundle ID to instructions So that it is possible to check if two instructions were scheduled into the same bundle. Cc: mesa-stable Part-of: --- src/panfrost/midgard/compiler.h | 2 ++ src/panfrost/midgard/midgard_schedule.c | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/src/panfrost/midgard/compiler.h b/src/panfrost/midgard/compiler.h index 310032823c3..7f3ea63cc52 100644 --- a/src/panfrost/midgard/compiler.h +++ b/src/panfrost/midgard/compiler.h @@ -183,6 +183,8 @@ typedef struct midgard_instruction { midgard_branch branch; }; + + unsigned bundle_id; } midgard_instruction; typedef struct midgard_block { diff --git a/src/panfrost/midgard/midgard_schedule.c b/src/panfrost/midgard/midgard_schedule.c index e3d49aaf64c..f987b7f17fd 100644 --- a/src/panfrost/midgard/midgard_schedule.c +++ b/src/panfrost/midgard/midgard_schedule.c @@ -1464,6 +1464,10 @@ schedule_block(compiler_context *ctx, midgard_block *block) else break; + for (unsigned i = 0; i < bundle.instruction_count; ++i) + bundle.instructions[i]->bundle_id = + ctx->quadword_count + block->quadword_count; + util_dynarray_append(&bundles, midgard_bundle, bundle); block->quadword_count += midgard_tag_props[bundle.tag].size; }