Resolved 1 Validation failure due to GPU, now allows testing with fatal errors on for validation errors.
This commit is contained in:
parent
6d2a991c36
commit
98aee1a086
@ -36,7 +36,7 @@
|
||||
#include <string_view>
|
||||
#include <set>
|
||||
|
||||
static constexpr bool fatal_errors = true;
|
||||
static constexpr bool fatal_errors = true; // keep this true for tests
|
||||
|
||||
#define ENABLE_VULKAN_VALIDATION true
|
||||
static constexpr bool vulkan_enable_validation_layers =
|
||||
@ -773,6 +773,13 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL VulkanDebugCallback(
|
||||
void* user_data) {
|
||||
|
||||
std::cerr << "[debug log] validation layer: " << callback_data->pMessage << std::endl;
|
||||
if (message_severity >= VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT) {
|
||||
if constexpr (fatal_errors) {
|
||||
const std::string_view msg = callback_data->pMessage;
|
||||
if (!msg.starts_with("loader_scanned_icd_add: Could not get 'vkCreateInstance' via 'vk_icdGetInstanceProcAddr'"))
|
||||
throw std::logic_error(std::string("Received Vulkan-ValidationLayer Error: ") + callback_data->pMessage);
|
||||
}
|
||||
}
|
||||
return vk::False;
|
||||
}
|
||||
/*static VKAPI_ATTR VkBool32 VKAPI_CALL VulkanReportCallback(
|
||||
|
Loading…
x
Reference in New Issue
Block a user