Vulkan: Check for vkSetDebugUtilsObjectNameEXT before using it

Fixes a crash that has been present on Android (and probably also
macOS) since f6883a0.
This commit is contained in:
JosJuice
2022-01-03 20:17:57 +01:00
parent a026ef30d2
commit 2ab66390f8
2 changed files with 3 additions and 3 deletions

View File

@ -29,7 +29,7 @@ VKTexture::VKTexture(const TextureConfig& tex_config, VkDeviceMemory device_memo
: AbstractTexture(tex_config), m_device_memory(device_memory), m_image(image), m_layout(layout),
m_compute_layout(compute_layout), m_name(name)
{
if (!m_name.empty())
if (!m_name.empty() && vkSetDebugUtilsObjectNameEXT)
{
VkDebugUtilsObjectNameInfoEXT name_info = {};
name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;