Module: Mesa
Branch: main
Commit: 83929f99557ad9d4eaf59938a927d85cfb37d351
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=83929f99557ad9d4eaf59938a927d85cfb37d351

Author: Mike Blumenkrantz <[email protected]>
Date:   Wed Mar 22 12:58:57 2023 -0400

aux/trace: fix GALLIUM_TRACE_NIR handling

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

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

Reviewed-by: Matti Hämäläinen <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22164>

---

 src/gallium/auxiliary/driver_trace/tr_dump.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/gallium/auxiliary/driver_trace/tr_dump.c 
b/src/gallium/auxiliary/driver_trace/tr_dump.c
index 963c22fb693..410c9d7065a 100644
--- a/src/gallium/auxiliary/driver_trace/tr_dump.c
+++ b/src/gallium/auxiliary/driver_trace/tr_dump.c
@@ -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;
    }

Reply via email to