mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-04-21 12:00:41 +02:00
nir/print: Make NIR_DEBUG=print_consts behavior the default
Now there's a NIR_DEBUG=print_no_inline_consts to omit them. Reviewed-by: Jesse Natalie <jenatali@microsoft.com> Acked-by: Emma Anholt <emma@anholt.net> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23562>
This commit is contained in:
parent
260a9167db
commit
8f64415af7
3 changed files with 5 additions and 5 deletions
|
|
@ -85,8 +85,8 @@ static const struct debug_named_value nir_debug_control[] = {
|
|||
"Dump resulting callable shader after each successful lowering/optimization call" },
|
||||
{ "print_ks", NIR_DEBUG_PRINT_KS,
|
||||
"Dump resulting kernel shader after each successful lowering/optimization call" },
|
||||
{ "print_consts", NIR_DEBUG_PRINT_CONSTS,
|
||||
"Print const value near each use of const SSA variable" },
|
||||
{ "print_no_inline_consts", NIR_DEBUG_PRINT_NO_INLINE_CONSTS,
|
||||
"Do not print const value near each use of const SSA variable" },
|
||||
{ "print_internal", NIR_DEBUG_PRINT_INTERNAL,
|
||||
"Print shaders even if they are marked as internal" },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
|
|
|
|||
|
|
@ -87,7 +87,7 @@ extern bool nir_debug_print_shader[MESA_SHADER_KERNEL + 1];
|
|||
#define NIR_DEBUG_PRINT_IS (1u << 17)
|
||||
#define NIR_DEBUG_PRINT_CBS (1u << 18)
|
||||
#define NIR_DEBUG_PRINT_KS (1u << 19)
|
||||
#define NIR_DEBUG_PRINT_CONSTS (1u << 20)
|
||||
#define NIR_DEBUG_PRINT_NO_INLINE_CONSTS (1u << 20)
|
||||
#define NIR_DEBUG_PRINT_INTERNAL (1u << 21)
|
||||
|
||||
#define NIR_DEBUG_PRINT (NIR_DEBUG_PRINT_VS | \
|
||||
|
|
|
|||
|
|
@ -234,7 +234,7 @@ print_ssa_use(nir_ssa_def *def, print_state *state)
|
|||
FILE *fp = state->fp;
|
||||
fprintf(fp, "ssa_%u", def->index);
|
||||
nir_instr *instr = def->parent_instr;
|
||||
if (instr->type == nir_instr_type_load_const && NIR_DEBUG(PRINT_CONSTS)) {
|
||||
if (instr->type == nir_instr_type_load_const && !NIR_DEBUG(PRINT_NO_INLINE_CONSTS)) {
|
||||
fprintf(fp, " ");
|
||||
print_const_from_load(nir_instr_as_load_const(instr), state, true);
|
||||
}
|
||||
|
|
@ -1780,7 +1780,7 @@ print_function_impl(nir_function_impl *impl, print_state *state)
|
|||
fprintf(fp, "\tpreamble %s\n", impl->preamble->name);
|
||||
}
|
||||
|
||||
if (NIR_DEBUG(PRINT_CONSTS)) {
|
||||
if (!NIR_DEBUG(PRINT_NO_INLINE_CONSTS)) {
|
||||
/* Don't reindex the SSA as suggested by nir_gather_ssa_types() because
|
||||
* nir_print don't modify the shader. If needed, a limit for ssa_alloc
|
||||
* can be added.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue