mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 05:18:08 +02:00
nir/print: Print annotations as comments
Also prints them in the same line as the instruction. Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39184>
This commit is contained in:
parent
17615b412b
commit
2ed16ed1a6
1 changed files with 4 additions and 3 deletions
|
|
@ -110,7 +110,7 @@ print_annotation(print_state *state, void *obj)
|
|||
const char *note = entry->data;
|
||||
_mesa_hash_table_remove(state->annotations, entry);
|
||||
|
||||
fprintf(fp, "%s\n\n", note);
|
||||
fprintf(fp, " %s", note);
|
||||
}
|
||||
|
||||
/* For 1 element, the size is intentionally omitted. */
|
||||
|
|
@ -1002,8 +1002,9 @@ print_var_decl(nir_variable *var, print_state *state)
|
|||
if (var->pointer_initializer)
|
||||
fprintf(fp, " = &%s", get_var_name(var->pointer_initializer, state));
|
||||
|
||||
fprintf(fp, "\n");
|
||||
print_annotation(state, var);
|
||||
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
static void
|
||||
|
|
@ -2356,8 +2357,8 @@ print_block(nir_block *block, print_state *state, unsigned tabs)
|
|||
|
||||
nir_foreach_instr(instr, block) {
|
||||
print_instr(instr, state, tabs);
|
||||
fprintf(fp, "\n");
|
||||
print_annotation(state, instr);
|
||||
fprintf(fp, "\n");
|
||||
}
|
||||
|
||||
print_indentation(tabs, fp);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue