diff options
author | Dave Houlton <daveh@lunarg.com> | 2017-04-25 15:56:45 -0600 |
---|---|---|
committer | Dave Houlton <daveh@lunarg.com> | 2017-04-26 09:57:23 -0600 |
commit | d4cecea1e58221dc409474a78d418ea93b742398 (patch) | |
tree | 34666c55fc81a45c7e472d50bf60d8c226e0ca7f | |
parent | 121224ba0ee0f72af3517b508b85e672d71ebff7 (diff) |
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
-rw-r--r-- | tests/layer_validation_tests.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
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; } |