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

Author: Rob Clark <[email protected]>
Date:   Tue Aug 31 13:52:22 2021 -0700

freedreno/ir3: Fix sched debug msgs

Signed-off-by: Rob Clark <[email protected]>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12923>

---

 src/freedreno/ir3/ir3_postsched.c | 8 +++++---
 src/freedreno/ir3/ir3_sched.c     | 8 +++++---
 2 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/src/freedreno/ir3/ir3_postsched.c 
b/src/freedreno/ir3/ir3_postsched.c
index b3a6a9d6a87..507302a0090 100644
--- a/src/freedreno/ir3/ir3_postsched.c
+++ b/src/freedreno/ir3/ir3_postsched.c
@@ -39,15 +39,17 @@
 #define d(fmt, ...)                                                            
\
    do {                                                                        
\
       if (SCHED_DEBUG) {                                                       
\
-         printf("PSCHED: " fmt "\n", ##__VA_ARGS__);                           
\
+         mesa_logi("PSCHED: " fmt, ##__VA_ARGS__);                             
\
       }                                                                        
\
    } while (0)
 
 #define di(instr, fmt, ...)                                                    
\
    do {                                                                        
\
       if (SCHED_DEBUG) {                                                       
\
-         printf("PSCHED: " fmt ": ", ##__VA_ARGS__);                           
\
-         ir3_print_instr(instr);                                               
\
+         struct log_stream *stream = mesa_log_streami();                       
\
+         mesa_log_stream_printf(stream, "PSCHED: " fmt ": ", ##__VA_ARGS__);   
\
+         ir3_print_instr_stream(stream, instr);                                
\
+         mesa_log_stream_destroy(stream);                                      
\
       }                                                                        
\
    } while (0)
 
diff --git a/src/freedreno/ir3/ir3_sched.c b/src/freedreno/ir3/ir3_sched.c
index 12ef6954821..c6893747118 100644
--- a/src/freedreno/ir3/ir3_sched.c
+++ b/src/freedreno/ir3/ir3_sched.c
@@ -38,15 +38,17 @@
 #define d(fmt, ...)                                                            
\
    do {                                                                        
\
       if (SCHED_DEBUG) {                                                       
\
-         printf("SCHED: " fmt "\n", ##__VA_ARGS__);                            
\
+         mesa_logi("SCHED: " fmt, ##__VA_ARGS__);                              
\
       }                                                                        
\
    } while (0)
 
 #define di(instr, fmt, ...)                                                    
\
    do {                                                                        
\
       if (SCHED_DEBUG) {                                                       
\
-         printf("SCHED: " fmt ": ", ##__VA_ARGS__);                            
\
-         ir3_print_instr(instr);                                               
\
+         struct log_stream *stream = mesa_log_streami();                       
\
+         mesa_log_stream_printf(stream, "SCHED: " fmt ": ", ##__VA_ARGS__);    
\
+         ir3_print_instr_stream(stream, instr);                                
\
+         mesa_log_stream_destroy(stream);                                      
\
       }                                                                        
\
    } while (0)
 

Reply via email to