diff --git a/src/xenia/ui/vulkan/vulkan_provider.cc b/src/xenia/ui/vulkan/vulkan_provider.cc index 54be29dc5..893b0ea7c 100644 --- a/src/xenia/ui/vulkan/vulkan_provider.cc +++ b/src/xenia/ui/vulkan/vulkan_provider.cc @@ -1082,20 +1082,6 @@ std::unique_ptr VulkanProvider::CreateImmediateDrawer() { return VulkanImmediateDrawer::Create(*this); } -void VulkanProvider::SetDeviceObjectName(VkObjectType type, uint64_t handle, - const char* name) const { - if (!debug_names_used_) { - return; - } - VkDebugUtilsObjectNameInfoEXT name_info; - name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; - name_info.pNext = nullptr; - name_info.objectType = type; - name_info.objectHandle = handle; - name_info.pObjectName = name; - ifn_.vkSetDebugUtilsObjectNameEXT(device_, &name_info); -} - void VulkanProvider::AccumulateInstanceExtensions( size_t properties_count, const VkExtensionProperties* properties, bool request_debug_utils, InstanceExtensions& instance_extensions, diff --git a/src/xenia/ui/vulkan/vulkan_provider.h b/src/xenia/ui/vulkan/vulkan_provider.h index ea13ce8b8..01cc69916 100644 --- a/src/xenia/ui/vulkan/vulkan_provider.h +++ b/src/xenia/ui/vulkan/vulkan_provider.h @@ -222,8 +222,20 @@ class VulkanProvider : public GraphicsProvider { }; const DeviceFunctions& dfn() const { return dfn_; } - void SetDeviceObjectName(VkObjectType type, uint64_t handle, - const char* name) const; + template + void SetDeviceObjectName(VkObjectType type, T handle, + const char* name) const { + if (!debug_names_used_) { + return; + } + VkDebugUtilsObjectNameInfoEXT name_info; + name_info.sType = VK_STRUCTURE_TYPE_DEBUG_UTILS_OBJECT_NAME_INFO_EXT; + name_info.pNext = nullptr; + name_info.objectType = type; + name_info.objectHandle = uint64_t(handle); + name_info.pObjectName = name; + ifn_.vkSetDebugUtilsObjectNameEXT(device_, &name_info); + } bool IsSparseBindingSupported() const { return queue_family_sparse_binding_ != UINT32_MAX;