nir/print: Do not print debug information when gathering it

Referencing a shader string with differend debug information is
confusing.

Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/28613>
This commit is contained in:
Konstantin Seurer 2025-02-24 19:52:44 +01:00 committed by Marge Bot
parent a04b5ebd3c
commit 3aeab4ce40

View file

@ -2046,7 +2046,7 @@ print_instr(const nir_instr *instr, print_state *state, unsigned tabs)
debug_info->nir_line = (uint32_t)ftell(fp);
}
if (state->shader->has_debug_info) {
if (state->shader->has_debug_info && !state->gather_debug_info) {
nir_instr_debug_info *debug_info = nir_instr_get_debug_info((nir_instr *)instr);
bool changed = state->last_debug_info.spirv_offset != debug_info->spirv_offset;