ir3/lower_pcopy: Use right flags for src const/immed
authorConnor Abbott <cwabbott0@gmail.com>
Tue, 7 Sep 2021 09:42:21 +0000 (11:42 +0200)
committerMarge Bot <eric+marge@anholt.net>
Tue, 7 Sep 2021 17:12:37 +0000 (17:12 +0000)
At some point I split up the flags into overall/source flags and made
copies from immed/const only set IR3_REG_IMMED/IR3_REG_CONST on the
source flags, but I forgot to update this. Noticed by inspection.

Fixes: 0ffcb19b9d9 ("ir3: Rewrite register allocation")
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12747>

src/freedreno/ir3/ir3_lower_parallelcopy.c

index 32b2d300c5553110fe705a2515f1640c7ca1d96b..54cc9725b955fde5d8f58d62d1bd3e64acb1ec64 100644 (file)
@@ -282,7 +282,7 @@ static void
 split_32bit_copy(struct copy_ctx *ctx, struct copy_entry *entry)
 {
    assert(!entry->done);
-   assert(!(entry->flags & (IR3_REG_IMMED | IR3_REG_CONST)));
+   assert(!(entry->src.flags & (IR3_REG_IMMED | IR3_REG_CONST)));
    assert(copy_entry_size(entry) == 2);
    struct copy_entry *new_entry = &ctx->entries[ctx->entry_count++];
 
@@ -362,7 +362,7 @@ _handle_copies(struct ir3_compiler *compiler, struct ir3_instruction *instr,
 
          if (((ctx->physreg_use_count[entry->dst] == 0 ||
                ctx->physreg_use_count[entry->dst + 1] == 0)) &&
-             !(entry->flags & (IR3_REG_IMMED | IR3_REG_CONST))) {
+             !(entry->src.flags & (IR3_REG_IMMED | IR3_REG_CONST))) {
             split_32bit_copy(ctx, entry);
             progress = true;
          }