Split error macro into two versions (format vs non-formating) to allow format checking at compile-time
This commit is contained in:
@@ -177,7 +177,7 @@ namespace Nz::Vk
|
||||
m_lastErrorCode = m_instance.vkGetPhysicalDeviceSurfaceCapabilitiesKHR(physicalDevice, m_surface, surfaceCapabilities);
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("failed to query surface capabilities: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
NazaraErrorFmt("failed to query surface capabilities: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -191,7 +191,7 @@ namespace Nz::Vk
|
||||
m_lastErrorCode = m_instance.vkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, m_surface, &surfaceCount, nullptr);
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS || surfaceCount == 0)
|
||||
{
|
||||
NazaraError("failed to query format count: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
NazaraErrorFmt("failed to query format count: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -200,7 +200,7 @@ namespace Nz::Vk
|
||||
m_lastErrorCode = m_instance.vkGetPhysicalDeviceSurfaceFormatsKHR(physicalDevice, m_surface, &surfaceCount, surfaceFormats->data());
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("failed to query formats: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
NazaraErrorFmt("failed to query formats: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -214,7 +214,7 @@ namespace Nz::Vk
|
||||
m_lastErrorCode = m_instance.vkGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, m_surface, &presentModeCount, nullptr);
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS || presentModeCount == 0)
|
||||
{
|
||||
NazaraError("Failed to query present mode count");
|
||||
NazaraError("failed to query present mode count");
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -223,7 +223,7 @@ namespace Nz::Vk
|
||||
m_lastErrorCode = m_instance.vkGetPhysicalDeviceSurfacePresentModesKHR(physicalDevice, m_surface, &presentModeCount, presentModes->data());
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("failed to query present modes: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
NazaraErrorFmt("failed to query present modes: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -236,7 +236,7 @@ namespace Nz::Vk
|
||||
m_lastErrorCode = m_instance.vkGetPhysicalDeviceSurfaceSupportKHR(physicalDevice, queueFamilyIndex, m_surface, &presentationSupported);
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("failed to query surface capabilities: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
NazaraErrorFmt("failed to query surface capabilities: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
@@ -291,7 +291,7 @@ namespace Nz::Vk
|
||||
{
|
||||
if (m_lastErrorCode != VkResult::VK_SUCCESS)
|
||||
{
|
||||
NazaraError("failed to create Vulkan surface: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
NazaraErrorFmt("failed to create Vulkan surface: {0}", TranslateVulkanError(m_lastErrorCode));
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user