aux/trace: fix GALLIUM_TRACE_NIR handling

this now correctly doesn't dump nir when the counter is zero

Fixes: f99eab23ad ("aux/trace: delete GALLIUM_TRACE_NIR log message")

Reviewed-by: Matti Hämäläinen <ccr@tnsp.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22164>
(cherry picked from commit 83929f9955)
This commit is contained in:
Mike Blumenkrantz 2023-03-22 12:58:57 -04:00 committed by Dylan Baker
parent 6ca17e3a72
commit 1059a23745
2 changed files with 2 additions and 2 deletions

View file

@ -3487,7 +3487,7 @@
"description": "aux/trace: fix GALLIUM_TRACE_NIR handling",
"nominated": true,
"nomination_type": 1,
"resolution": 0,
"resolution": 1,
"main_sha": null,
"because_sha": "f99eab23ad6d58e08336d862adcb642f9714eb51"
},

View file

@ -658,7 +658,7 @@ void trace_dump_nir(void *nir)
if (!dumping)
return;
if (nir_count < 0) {
if (--nir_count < 0) {
fputs("<string>...</string>", stream);
return;
}