mirror of
https://github.com/azahar-emu/azahar.git
synced 2025-03-04 09:45:23 +01:00
vk_platform.cpp: Update to become Vulkan v1.4.304+ compliant
This commit is contained in:
parent
03a81092fc
commit
6e7e6728ff
@ -29,8 +29,8 @@ namespace Vulkan {
|
|||||||
|
|
||||||
namespace {
|
namespace {
|
||||||
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugUtilsCallback(
|
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugUtilsCallback(
|
||||||
VkDebugUtilsMessageSeverityFlagBitsEXT severity, VkDebugUtilsMessageTypeFlagsEXT type,
|
vk::DebugUtilsMessageSeverityFlagBitsEXT severity, vk::DebugUtilsMessageTypeFlagsEXT type,
|
||||||
const VkDebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) {
|
const vk::DebugUtilsMessengerCallbackDataEXT* callback_data, void* user_data) {
|
||||||
|
|
||||||
switch (static_cast<u32>(callback_data->messageIdNumber)) {
|
switch (static_cast<u32>(callback_data->messageIdNumber)) {
|
||||||
case 0x609a13b: // Vertex attribute at location not consumed by shader
|
case 0x609a13b: // Vertex attribute at location not consumed by shader
|
||||||
@ -42,14 +42,14 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL DebugUtilsCallback(
|
|||||||
|
|
||||||
Common::Log::Level level{};
|
Common::Log::Level level{};
|
||||||
switch (severity) {
|
switch (severity) {
|
||||||
case VK_DEBUG_UTILS_MESSAGE_SEVERITY_ERROR_BIT_EXT:
|
case vk::DebugUtilsMessageSeverityFlagBitsEXT::eError:
|
||||||
level = Common::Log::Level::Error;
|
level = Common::Log::Level::Error;
|
||||||
break;
|
break;
|
||||||
case VK_DEBUG_UTILS_MESSAGE_SEVERITY_WARNING_BIT_EXT:
|
case vk::DebugUtilsMessageSeverityFlagBitsEXT::eWarning:
|
||||||
level = Common::Log::Level::Info;
|
level = Common::Log::Level::Info;
|
||||||
break;
|
break;
|
||||||
case VK_DEBUG_UTILS_MESSAGE_SEVERITY_INFO_BIT_EXT:
|
case vk::DebugUtilsMessageSeverityFlagBitsEXT::eInfo:
|
||||||
case VK_DEBUG_UTILS_MESSAGE_SEVERITY_VERBOSE_BIT_EXT:
|
case vk::DebugUtilsMessageSeverityFlagBitsEXT::eVerbose:
|
||||||
level = Common::Log::Level::Debug;
|
level = Common::Log::Level::Debug;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
@ -63,35 +63,34 @@ static VKAPI_ATTR VkBool32 VKAPI_CALL DebugUtilsCallback(
|
|||||||
return VK_FALSE;
|
return VK_FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(VkDebugReportFlagsEXT flags,
|
static VKAPI_ATTR VkBool32 VKAPI_CALL DebugReportCallback(vk::DebugReportFlagsEXT flags,
|
||||||
VkDebugReportObjectTypeEXT objectType,
|
vk::DebugReportObjectTypeEXT objectType,
|
||||||
uint64_t object, std::size_t location,
|
uint64_t object, std::size_t location,
|
||||||
int32_t messageCode,
|
int32_t messageCode,
|
||||||
const char* pLayerPrefix,
|
const char* pLayerPrefix,
|
||||||
const char* pMessage, void* pUserData) {
|
const char* pMessage, void* pUserData) {
|
||||||
|
|
||||||
const VkDebugReportFlagBitsEXT severity = static_cast<VkDebugReportFlagBitsEXT>(flags);
|
const auto severity = static_cast<vk::DebugReportFlagBitsEXT>(flags.operator VkFlags());
|
||||||
Common::Log::Level level{};
|
Common::Log::Level level{};
|
||||||
switch (severity) {
|
switch (severity) {
|
||||||
case VK_DEBUG_REPORT_ERROR_BIT_EXT:
|
case vk::DebugReportFlagBitsEXT::eError:
|
||||||
level = Common::Log::Level::Error;
|
level = Common::Log::Level::Error;
|
||||||
break;
|
break;
|
||||||
case VK_DEBUG_REPORT_INFORMATION_BIT_EXT:
|
case vk::DebugReportFlagBitsEXT::eInformation:
|
||||||
level = Common::Log::Level::Warning;
|
level = Common::Log::Level::Warning;
|
||||||
break;
|
break;
|
||||||
case VK_DEBUG_REPORT_DEBUG_BIT_EXT:
|
case vk::DebugReportFlagBitsEXT::eDebug:
|
||||||
case VK_DEBUG_REPORT_WARNING_BIT_EXT:
|
case vk::DebugReportFlagBitsEXT::eWarning:
|
||||||
case VK_DEBUG_REPORT_PERFORMANCE_WARNING_BIT_EXT:
|
case vk::DebugReportFlagBitsEXT::ePerformanceWarning:
|
||||||
level = Common::Log::Level::Debug;
|
level = Common::Log::Level::Debug;
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
level = Common::Log::Level::Info;
|
level = Common::Log::Level::Info;
|
||||||
}
|
}
|
||||||
|
|
||||||
const vk::DebugReportObjectTypeEXT type = static_cast<vk::DebugReportObjectTypeEXT>(objectType);
|
|
||||||
LOG_GENERIC(Common::Log::Class::Render_Vulkan, level,
|
LOG_GENERIC(Common::Log::Class::Render_Vulkan, level,
|
||||||
"type = {}, object = {} | MessageCode = {:#x}, LayerPrefix = {} | {}",
|
"type = {}, object = {} | MessageCode = {:#x}, LayerPrefix = {} | {}",
|
||||||
vk::to_string(type), object, messageCode, pLayerPrefix, pMessage);
|
vk::to_string(objectType), object, messageCode, pLayerPrefix, pMessage);
|
||||||
|
|
||||||
return VK_FALSE;
|
return VK_FALSE;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user