Module: Mesa
Branch: staging/23.3
Commit: df7347e58cf728900b2b7d505a6511501c401ae3
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=df7347e58cf728900b2b7d505a6511501c401ae3

Author: Gert Wollny <gert.wol...@collabora.com>
Date:   Thu Nov 30 10:53:05 2023 +0100

r600/sfn: Fix usage of std::string constructor

Fixes: f718ac62688b (r600/sfn: Add a basic nir shader backend)

Signed-off-by: Gert Wollny <gert.wol...@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26415>
(cherry picked from commit ac4b8aab21ccea79ac2f6f00ba1bc4be1ea1311e)

---

 .pick_status.json                          | 2 +-
 src/gallium/drivers/r600/sfn/sfn_debug.cpp | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/.pick_status.json b/.pick_status.json
index ea66f9767e9..12fcfdf1d33 100644
--- a/.pick_status.json
+++ b/.pick_status.json
@@ -984,7 +984,7 @@
         "description": "r600/sfn: Fix usage of std::string constructor",
         "nominated": true,
         "nomination_type": 1,
-        "resolution": 0,
+        "resolution": 1,
         "main_sha": null,
         "because_sha": "f718ac62688b555a933c7112f656944288d04edb",
         "notes": null
diff --git a/src/gallium/drivers/r600/sfn/sfn_debug.cpp 
b/src/gallium/drivers/r600/sfn/sfn_debug.cpp
index b41ebece948..4cca3af6704 100644
--- a/src/gallium/drivers/r600/sfn/sfn_debug.cpp
+++ b/src/gallium/drivers/r600/sfn/sfn_debug.cpp
@@ -125,12 +125,13 @@ SfnTrace::SfnTrace(SfnLog::LogFlag flag, const char *msg):
     m_flag(flag),
     m_msg(msg)
 {
-   sfn_log << m_flag << std::string(" ", 2 * m_indention++) << "BEGIN: " << 
m_msg << "\n";
+   sfn_log << m_flag << std::string( 2 * m_indention++, ' ') << "BEGIN: " << 
m_msg << "\n";
 }
 
 SfnTrace::~SfnTrace()
 {
-   sfn_log << m_flag << std::string(" ", 2 * m_indention--) << "END:   " << 
m_msg << "\n";
+   assert(m_indention > 0);
+   sfn_log << m_flag << std::string( 2 * m_indention--, ' ') << "END:   " << 
m_msg << "\n";
 }
 
 int SfnTrace::m_indention = 0;

Reply via email to