mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-26 03:48:12 +02:00
nir/print: Do not print raw values
In many cases the raw value is not really helpful, since we only work with enums and the raw value is already printed for indices without special printing. If an index benefits from having special printing AND the raw value, we can include the printing of the raw value as part of its handler. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Marcin Ślusarz <marcin.slusarz@intel.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23375>
This commit is contained in:
parent
49c7fd7a7e
commit
60664285a9
1 changed files with 0 additions and 5 deletions
|
|
@ -933,7 +933,6 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
|
|||
|
||||
for (unsigned i = 0; i < info->num_indices; i++) {
|
||||
unsigned idx = info->indices[i];
|
||||
bool print_raw = true;
|
||||
if (i != 0)
|
||||
fprintf(fp, ", ");
|
||||
switch (idx) {
|
||||
|
|
@ -956,7 +955,6 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
|
|||
case NIR_INTRINSIC_ATOMIC_OP: {
|
||||
nir_atomic_op atomic_op = nir_intrinsic_atomic_op(instr);
|
||||
fprintf(fp, "atomic_op=");
|
||||
print_raw = false;
|
||||
|
||||
switch (atomic_op) {
|
||||
case nir_atomic_op_iadd: fprintf(fp, "iadd"); break;
|
||||
|
|
@ -1251,12 +1249,9 @@ print_intrinsic_instr(nir_intrinsic_instr *instr, print_state *state)
|
|||
default: {
|
||||
unsigned off = info->index_map[idx] - 1;
|
||||
fprintf(fp, "%s=%d", nir_intrinsic_index_names[idx], instr->const_index[off]);
|
||||
print_raw = false;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (print_raw)
|
||||
fprintf(fp, " /*%d*/", instr->const_index[i]);
|
||||
}
|
||||
fprintf(fp, ")");
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue