diff options
author | Connor Abbott <cwabbott0@gmail.com> | 2023-03-02 13:28:44 +0100 |
---|---|---|
committer | Marge Bot <emma+marge@anholt.net> | 2024-04-26 12:55:13 +0000 |
commit | ac132b3f62dc8cc016476a9e1e442d329c7bec4d (patch) | |
tree | 55653fe355e29b4a0009173bfadf051a2a6758ab | |
parent | 497fcd26b51e7be7ddcd30a6450e1fa273af6206 (diff) |
ir3: Create reduce identity directly
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22075>
-rw-r--r-- | src/freedreno/ir3/ir3_compiler_nir.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/src/freedreno/ir3/ir3_compiler_nir.c b/src/freedreno/ir3/ir3_compiler_nir.c index 4ab8c86fd86..e99ed4eb0f1 100644 --- a/src/freedreno/ir3/ir3_compiler_nir.c +++ b/src/freedreno/ir3/ir3_compiler_nir.c @@ -1960,9 +1960,8 @@ emit_intrinsic_reduce(struct ir3_context *ctx, nir_intrinsic_instr *intr) * not supported. */ struct ir3_instruction *identity = - create_immed(ctx->block, get_reduce_identity(nir_reduce_op, dst_size)); - identity = ir3_READ_FIRST_MACRO(ctx->block, identity, 0); - identity->dsts[0]->flags |= IR3_REG_SHARED; + create_immed_shared(ctx->block, get_reduce_identity(nir_reduce_op, dst_size), + true); /* OPC_SCAN_MACRO has the following destinations: * - Exclusive scan result (interferes with source) @@ -2025,8 +2024,8 @@ emit_intrinsic_reduce_clusters(struct ir3_context *ctx, * not supported. */ struct ir3_instruction *identity = - create_immed(ctx->block, get_reduce_identity(nir_reduce_op, dst_size)); - identity->dsts[0]->flags |= IR3_REG_SHARED; + create_immed_shared(ctx->block, get_reduce_identity(nir_reduce_op, dst_size), + true); /* OPC_SCAN_CLUSTERS_MACRO has the following destinations: * - Shared reg reduction result, must be initialized to the identity |