mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-28 12:30:09 +01:00
pan/mdg: Add type fields to IR
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/4793>
This commit is contained in:
parent
b9f7f06a61
commit
742b272314
2 changed files with 13 additions and 7 deletions
|
|
@ -97,6 +97,10 @@ typedef struct midgard_instruction {
|
|||
/* vec16 swizzle, unpacked, per source */
|
||||
unsigned swizzle[MIR_SRC_COUNT][MIR_VEC_COMPONENTS];
|
||||
|
||||
/* Types! */
|
||||
nir_alu_type src_types[MIR_SRC_COUNT];
|
||||
nir_alu_type dest_type;
|
||||
|
||||
/* Special fields for an ALU instruction */
|
||||
midgard_reg_info registers;
|
||||
|
||||
|
|
|
|||
|
|
@ -333,6 +333,7 @@ mir_print_instruction(midgard_instruction *ins)
|
|||
|
||||
printf(" ");
|
||||
mir_print_index(ins->dest);
|
||||
pan_print_alu_type(ins->dest_type, stdout);
|
||||
|
||||
if (ins->mask != 0xF)
|
||||
mir_print_mask(ins->mask);
|
||||
|
|
@ -345,6 +346,7 @@ mir_print_instruction(midgard_instruction *ins)
|
|||
mir_print_embedded_constant(ins, 0);
|
||||
else {
|
||||
mir_print_index(ins->src[0]);
|
||||
pan_print_alu_type(ins->src_types[0], stdout);
|
||||
mir_print_swizzle(ins->swizzle[0]);
|
||||
}
|
||||
printf(", ");
|
||||
|
|
@ -355,16 +357,16 @@ mir_print_instruction(midgard_instruction *ins)
|
|||
mir_print_embedded_constant(ins, 1);
|
||||
else {
|
||||
mir_print_index(ins->src[1]);
|
||||
pan_print_alu_type(ins->src_types[1], stdout);
|
||||
mir_print_swizzle(ins->swizzle[1]);
|
||||
}
|
||||
|
||||
printf(", ");
|
||||
mir_print_index(ins->src[2]);
|
||||
mir_print_swizzle(ins->swizzle[2]);
|
||||
|
||||
printf(", ");
|
||||
mir_print_index(ins->src[3]);
|
||||
mir_print_swizzle(ins->swizzle[3]);
|
||||
for (unsigned c = 2; c <= 3; ++c) {
|
||||
printf(", ");
|
||||
mir_print_index(ins->src[c]);
|
||||
pan_print_alu_type(ins->src_types[c], stdout);
|
||||
mir_print_swizzle(ins->swizzle[c]);
|
||||
}
|
||||
|
||||
if (ins->no_spill)
|
||||
printf(" /* no spill */");
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue