Module: Mesa
Branch: staging/23.0
Commit: 1059a23745da8c574399a8d586dbeb898e3b2ef0
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=1059a23745da8c574399a8d586dbeb898e3b2ef0

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>
(cherry picked from commit 83929f99557ad9d4eaf59938a927d85cfb37d351)

---

 .pick_status.json                            | 2 +-
 src/gallium/auxiliary/driver_trace/tr_dump.c | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index 3c3bf87cb2f..5ebbd3e90a5 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -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"
     },
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