mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-15 20:48:13 +02:00
nir/print: print instr pass_flags
From time to time it can be helpful to "see" the pass_flags. Signed-off-by: Christian Gmeiner <cgmeiner@igalia.com> Reviewed-by: Rhys Perry <pendingchaos02@gmail.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/24234>
This commit is contained in:
parent
a89752d630
commit
019e5cbd39
3 changed files with 6 additions and 0 deletions
|
|
@ -89,6 +89,8 @@ static const struct debug_named_value nir_debug_control[] = {
|
|||
"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" },
|
||||
{ "print_pass_flags", NIR_DEBUG_PRINT_PASS_FLAGS,
|
||||
"Print pass_flags for every instruction when pass_flags are non-zero" },
|
||||
DEBUG_NAMED_VALUE_END
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ extern bool nir_debug_print_shader[MESA_SHADER_KERNEL + 1];
|
|||
#define NIR_DEBUG_PRINT_KS (1u << 19)
|
||||
#define NIR_DEBUG_PRINT_NO_INLINE_CONSTS (1u << 20)
|
||||
#define NIR_DEBUG_PRINT_INTERNAL (1u << 21)
|
||||
#define NIR_DEBUG_PRINT_PASS_FLAGS (1u << 22)
|
||||
|
||||
#define NIR_DEBUG_PRINT (NIR_DEBUG_PRINT_VS | \
|
||||
NIR_DEBUG_PRINT_TCS | \
|
||||
|
|
|
|||
|
|
@ -1829,6 +1829,9 @@ print_instr(const nir_instr *instr, print_state *state, unsigned tabs)
|
|||
unreachable("Invalid instruction type");
|
||||
break;
|
||||
}
|
||||
|
||||
if (NIR_DEBUG(PRINT_PASS_FLAGS) && instr->pass_flags)
|
||||
fprintf(fp, " (pass_flags: 0x%x)", instr->pass_flags);
|
||||
}
|
||||
|
||||
static bool
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue