VulkanRenderer: Fix VK_EXT_debug_utils with MoltenVK

This commit is contained in:
Jérôme Leclercq
2022-03-20 14:54:38 +01:00
parent 48b87cc99b
commit d86f61cd82
6 changed files with 42 additions and 33 deletions

View File

@@ -57,6 +57,20 @@ namespace Nz::Vk
return *m_physicalDevice;
}
inline PFN_vkVoidFunction Device::GetProcAddr(const char* name, bool allowInstanceFallback)
{
PFN_vkVoidFunction func = m_instance.GetDeviceProcAddr(m_device, name);
if (!func)
{
if (allowInstanceFallback)
return m_instance.GetProcAddr(name);
NazaraError("Failed to get " + std::string(name) + " address");
}
return func;
}
inline bool Device::IsExtensionLoaded(const std::string& extensionName)
{
return m_loadedExtensions.count(extensionName) > 0;
@@ -83,15 +97,6 @@ namespace Nz::Vk
{
return m_device;
}
inline PFN_vkVoidFunction Device::GetProcAddr(const char* name)
{
PFN_vkVoidFunction func = m_instance.GetDeviceProcAddr(m_device, name);
if (!func)
NazaraError("Failed to get " + std::string(name) + " address");
return func;
}
}
#include <Nazara/VulkanRenderer/DebugOff.hpp>