Skip to content

Commit f421f90

Browse files
author
devsh
committed
improve error logging from ISPIRVOptimizer
1 parent 02b4f20 commit f421f90

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/nbl/asset/utils/ISPIRVOptimizer.cpp

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,13 +59,15 @@ nbl::core::smart_refctd_ptr<ICPUBuffer> ISPIRVOptimizer::optimize(const uint32_t
5959
system::ILogger::ELL_DEBUG
6060
};
6161
const auto lvl = lvl2lvl[level];
62-
std::string location;
62+
std::string ccat;
6363
if (src)
64-
location = src + ":"s + std::to_string(pos.line) + ":" + std::to_string(pos.column);
64+
ccat = src + ":"s + std::to_string(pos.line) + ":" + std::to_string(pos.column);
6565
else
66-
location = "";
66+
ccat = "";
67+
if (msg)
68+
ccat += msg;
6769

68-
logger.log(location, lvl, msg);
70+
logger.log("%s", lvl, ccat.c_str());
6971
};
7072

7173
spvtools::Optimizer opt(SPIRV_VERSION);

0 commit comments

Comments
 (0)