More changes for VK 1.4.304
This commit is contained in:
@@ -52,12 +52,28 @@ namespace OpenVulkano::Vulkan
|
||||
return layers;
|
||||
}
|
||||
|
||||
VkBool32 ValidationLayerCallback(
|
||||
#if VK_HEADER_VERSION > 303
|
||||
vk::Flags<vk::DebugReportFlagBitsEXT> flags, vk::DebugReportObjectTypeEXT objType,
|
||||
VkBool32 ValidationLayerCallback(vk::DebugReportFlagsEXT flags, vk::DebugReportObjectTypeEXT objType,
|
||||
uint64_t srcObject, size_t location, int32_t msgCode, const char* layerPrefix,
|
||||
const char* msg, void* pUserData)
|
||||
{
|
||||
std::string prefix = "VK_DEBUG:";
|
||||
spdlog::level::level_enum level = spdlog::level::info;
|
||||
if (flags & vk::DebugReportFlagBitsEXT::eError) level = spdlog::level::err;
|
||||
else if (flags & vk::DebugReportFlagBitsEXT::eWarning) level = spdlog::level::warn;
|
||||
else if (flags & vk::DebugReportFlagBitsEXT::ePerformanceWarning)
|
||||
{
|
||||
level = spdlog::level::warn;
|
||||
prefix = "[PERF] " + prefix;
|
||||
}
|
||||
else if (flags & vk::DebugReportFlagBitsEXT::eDebug) level = spdlog::level::debug;
|
||||
|
||||
Logger::RENDER->log(level, "{0} [{1}] Code {2}: {3}", prefix, layerPrefix, msgCode, msg);
|
||||
|
||||
return false;
|
||||
}
|
||||
#else
|
||||
VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType,
|
||||
#endif
|
||||
VkBool32 ValidationLayerCallback(VkDebugReportFlagsEXT flags, VkDebugReportObjectTypeEXT objType,
|
||||
uint64_t srcObject, size_t location, int32_t msgCode, const char* layerPrefix,
|
||||
const char* msg, void* pUserData)
|
||||
{
|
||||
@@ -76,6 +92,7 @@ namespace OpenVulkano::Vulkan
|
||||
|
||||
return false;
|
||||
}
|
||||
#endif
|
||||
|
||||
namespace
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user