It can always be inferred from the types.
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5151>
unsigned nr_dependencies;
BITSET_WORD *dependents;
- /* For load/store ops.. force 64-bit destination */
- bool load_64;
-
union {
midgard_load_store_word load_store;
midgard_vector_alu alu;
/* Once we have the NIR mask, we need to normalize to work in 32-bit space */
unsigned bytemask = pan_to_bytemask(dsize, nir_mask);
mir_set_bytemask(ins, bytemask);
-
- if (dsize == 64)
- ins->load_64 = true;
+ ins->dest_type = nir_type_uint | dsize;
}
/* Uniforms and UBOs use a shared code path, as uniforms are just (slightly
(size == 64) ? 3 : /* (1 << 3) = 8-byte */
3; /* 8-bit todo */
- if (ins->type == TAG_LOAD_STORE_4 && ins->load_64)
- min_alignment[dest] = 3;
-
/* We don't have a swizzle for the conditional and we don't
* want to muck with the conditional itself, so just force
* alignment for now */
needs_move |= BITSET_TEST(special, ins->dest);
if (needs_move) {
+ unsigned type_size = nir_alu_type_get_type_size(ins->dest_type);
midgard_instruction mov = v_mov(promoted, ins->dest);
- if (ins->load_64)
+ if (type_size == 64)
mov.alu.reg_mode = midgard_reg_mode_64;
- unsigned type_size = nir_alu_type_get_type_size(ins->dest_type);
uint16_t rounded = mir_round_bytemask_up(mir_bytemask(ins), type_size);
mir_set_bytemask(&mov, rounded);
mir_insert_instruction_before(ctx, ins, mov);