VKTexture: Only set texture name if supported

This commit is contained in:
OatmealDome 2022-01-30 21:57:43 -05:00
parent a8ce71fcd4
commit 28f3cb3d97

View File

@ -21,6 +21,8 @@
#include "VideoBackends/Vulkan/VKStreamBuffer.h"
#include "VideoBackends/Vulkan/VulkanContext.h"
#include "VideoCommon/VideoConfig.h"
namespace Vulkan
{
VKTexture::VKTexture(const TextureConfig& tex_config, VkDeviceMemory device_memory, VkImage image,
@ -29,7 +31,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() && g_ActiveConfig.backend_info.bSupportsSettingObjectNames)
{
VkDebugUtilsObjectNameInfoEXT name_info = {};
name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT;