[Vulkan] Blacklist some validation layer errors we don't care about.

This commit is contained in:
gibbed 2018-06-04 23:37:58 -05:00
parent 486172770d
commit 4caa2a2145
1 changed files with 14 additions and 0 deletions

View File

@ -300,6 +300,19 @@ VkBool32 VKAPI_PTR DebugMessageCallback(VkDebugReportFlagsEXT flags,
int32_t messageCode,
const char* pLayerPrefix,
const char* pMessage, void* pUserData) {
if (strcmp(pLayerPrefix, "Validation") == 0) {
const char* blacklist[] = {
"bound but it was never updated. You may want to either update it or "
"not bind it.",
"is being used in draw but has not been updated.",
};
for (uint32_t i = 0; i < xe::countof(blacklist); ++i) {
if (strstr(pMessage, blacklist[i]) != nullptr) {
return false;
}
}
}
auto instance = reinterpret_cast<VulkanInstance*>(pUserData);
const char* message_type = "UNKNOWN";
if (flags & VK_DEBUG_REPORT_ERROR_BIT_EXT) {
@ -313,6 +326,7 @@ VkBool32 VKAPI_PTR DebugMessageCallback(VkDebugReportFlagsEXT flags,
} else if (flags & VK_DEBUG_REPORT_DEBUG_BIT_EXT) {
message_type = "DEBUG";
}
XELOGVK("[%s/%s:%d] %s", pLayerPrefix, message_type, messageCode, pMessage);
return false;
}