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>
(cherry picked from commit 1490e7e622)
This commit is contained in:
Icecream95 2021-06-07 19:21:41 +12:00 committed by Eric Engestrom
parent c0d172016d
commit 30b99a6a9d
3 changed files with 7 additions and 1 deletions

View file

@ -373,7 +373,7 @@
"description": "pan/mdg: Add a bundle ID to instructions",
"nominated": true,
"nomination_type": 0,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": null
},

View file

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

View file

@ -1416,6 +1416,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;
}