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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/11212>
This commit is contained in:
Icecream95 2021-06-07 19:21:41 +12:00 committed by Marge Bot
parent 3e3ec59895
commit 1490e7e622
2 changed files with 6 additions and 0 deletions

View file

@ -183,6 +183,8 @@ typedef struct midgard_instruction {
midgard_branch branch;
};
unsigned bundle_id;
} midgard_instruction;
typedef struct midgard_block {

View file

@ -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;
}