From d4cecea1e58221dc409474a78d418ea93b742398 Mon Sep 17 00:00:00 2001 From: Dave Houlton Date: Tue, 25 Apr 2017 15:56:45 -0600 Subject: tests: Add VU code to error string (DEBUG only) With thousands of VUs and many with similar text strings, it can be difficult to identify a particular error message at a glance. This adds the VU code to the end of the message string (in DEBUG builds). Change-Id: I8ff2dfbac4973613193b6410bda885c187cf5920 --- tests/layer_validation_tests.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/layer_validation_tests.cpp b/tests/layer_validation_tests.cpp index 0a1b189e..d37919e7 100644 --- a/tests/layer_validation_tests.cpp +++ b/tests/layer_validation_tests.cpp @@ -338,7 +338,13 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL myDbgFunc(VkFlags msgFlags, VkDebugReportO void *pUserData) { ErrorMonitor *errMonitor = (ErrorMonitor *)pUserData; if (msgFlags & errMonitor->GetMessageFlags()) { +#ifdef _DEBUG + char embedded_code_string[2048]; + snprintf(embedded_code_string, 2048, "%s [%05d]", pMsg, msgCode); + return errMonitor->CheckForDesiredMsg(msgCode, embedded_code_string); +#else return errMonitor->CheckForDesiredMsg(msgCode, pMsg); +#endif } return false; } -- cgit v1.2.3