pan/midgard: Sync midgard_block field names with Bifrost
authorAlyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Wed, 11 Mar 2020 12:22:08 +0000 (08:22 -0400)
committerMarge Bot <eric+marge@anholt.net>
Wed, 11 Mar 2020 20:28:20 +0000 (20:28 +0000)
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4150>

src/panfrost/midgard/compiler.h
src/panfrost/midgard/midgard_compile.c
src/panfrost/midgard/midgard_print.c
src/panfrost/midgard/midgard_schedule.c

index cf9420bf42842928b21c8614959285b4124941ec..f7e69f916552037c0a23438b60874abb1b8ccd6e 100644 (file)
@@ -173,9 +173,9 @@ typedef struct midgard_block {
         struct list_head instructions;
 
         /* Index of the block in source order */
-        unsigned source_id;
+        unsigned name;
 
-        bool is_scheduled;
+        bool scheduled;
 
         /* List of midgard_bundles emitted (after the scheduler has run) */
         struct util_dynarray bundles;
index 0bc17dc719b44744cce952aa3fc69f1790e6d5e8..df51f19c762d38594d19922df2d86ea33caf3033 100644 (file)
@@ -78,7 +78,7 @@ create_empty_block(compiler_context *ctx)
                         _mesa_hash_pointer,
                         _mesa_key_pointer_equal);
 
-        blk->source_id = ctx->block_source_count++;
+        blk->name = ctx->block_source_count++;
 
         return blk;
 }
@@ -2366,7 +2366,7 @@ emit_block(compiler_context *ctx, nir_block *block)
 
         list_addtail(&this_block->link, &ctx->blocks);
 
-        this_block->is_scheduled = false;
+        this_block->scheduled = false;
         ++ctx->block_count;
 
         /* Set up current block */
index e23e7d59817d675288c68bec1c89bfe90cf2e690..c90f6465037b4477a4ab3e9bb6d1733158966534 100644 (file)
@@ -377,9 +377,9 @@ mir_print_instruction(midgard_instruction *ins)
 void
 mir_print_block(midgard_block *block)
 {
-        printf("block%u: {\n", block->source_id);
+        printf("block%u: {\n", block->name);
 
-        if (block->is_scheduled) {
+        if (block->scheduled) {
                 mir_foreach_bundle_in_block(block, bundle) {
                         for (unsigned i = 0; i < bundle->instruction_count; ++i)
                                 mir_print_instruction(bundle->instructions[i]);
@@ -397,14 +397,14 @@ mir_print_block(midgard_block *block)
         if (block->nr_successors) {
                 printf(" -> ");
                 for (unsigned i = 0; i < block->nr_successors; ++i) {
-                        printf("block%u%s", block->successors[i]->source_id,
+                        printf("block%u%s", block->successors[i]->name,
                                         (i + 1) != block->nr_successors ? ", " : "");
                 }
         }
 
         printf(" from { ");
         mir_foreach_predecessor(block, pred)
-                printf("block%u ", pred->source_id);
+                printf("block%u ", pred->name);
         printf("}");
 
         printf("\n\n");
index 55fdba0b546959a1187ab10d8522ed3f563c251d..2ca0f95656c9c744823e8e366753d01afa336fc5 100644 (file)
@@ -1156,7 +1156,7 @@ schedule_block(compiler_context *ctx, midgard_block *block)
         if (blend_offset)
                 ctx->blend_constant_offset = ((ctx->quadword_count + block->quadword_count) - blend_offset - 1) * 0x10;
 
-        block->is_scheduled = true;
+        block->scheduled = true;
         ctx->quadword_count += block->quadword_count;
 
         /* Reorder instructions to match bundled. First remove existing