diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2024-04-12 12:25:09 -0400 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-26 12:55:13 +0000 |
commit | f8ac16b4b98732153ea838e6cc4c1546551823af (patch) | |
tree | 995cea30ad6ead9c61444d5c73510ab6b352244e | |
parent | 507b51e7ae669b811fb1d246951728747a15e080 (diff) |
ir3: Use correct category for OPC_PUSH_CONSTS_LOAD_MACRO
This prevents is_scalar_alu() from crashing, and seems like the right
thing to do to prevent other "surprises." Make it have the category of
the instructions it expands to.
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
-rw-r--r-- | src/freedreno/ir3/instr-a3xx.h | 10 | ||||
-rw-r--r-- | src/freedreno/ir3/ir3_validate.c | 2 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/freedreno/ir3/instr-a3xx.h b/src/freedreno/ir3/instr-a3xx.h index b56292efcbd..3a40d2976da 100644 --- a/src/freedreno/ir3/instr-a3xx.h +++ b/src/freedreno/ir3/instr-a3xx.h @@ -130,11 +130,6 @@ typedef enum { OPC_SCAN_MACRO = _OPC(1, 58), OPC_SCAN_CLUSTERS_MACRO = _OPC(1, 60), - /* Macros that expand to an stsc at the start of the preamble. - * It loads into const file and should not be optimized in any way. - */ - OPC_PUSH_CONSTS_LOAD_MACRO = _OPC(1, 59), - /* category 2: */ OPC_ADD_F = _OPC(2, 0), OPC_MIN_F = _OPC(2, 1), @@ -364,6 +359,11 @@ typedef enum { OPC_STSC = _OPC(6, 82), OPC_LDG_K = _OPC(6, 83), + /* Macros that expand to an stsc at the start of the preamble. + * It loads into const file and should not be optimized in any way. + */ + OPC_PUSH_CONSTS_LOAD_MACRO = _OPC(6, 84), + /* category 7: */ OPC_BAR = _OPC(7, 0), OPC_FENCE = _OPC(7, 1), diff --git a/src/freedreno/ir3/ir3_validate.c b/src/freedreno/ir3/ir3_validate.c index 45c6c4ef866..31bfc932a24 100644 --- a/src/freedreno/ir3/ir3_validate.c +++ b/src/freedreno/ir3/ir3_validate.c @@ -387,6 +387,8 @@ validate_instr(struct ir3_validate_ctx *ctx, struct ir3_instruction *instr) validate_reg_size(ctx, instr->srcs[0], instr->cat6.type); validate_assert(ctx, !(instr->srcs[1]->flags & IR3_REG_HALF)); break; + case OPC_PUSH_CONSTS_LOAD_MACRO: + break; case OPC_LDC_K: validate_assert(ctx, !(instr->srcs[0]->flags & IR3_REG_HALF)); validate_assert(ctx, !(instr->srcs[1]->flags & IR3_REG_HALF)); |