[Vulkan] Don't require an explicit uint64_t cast for SetDeviceObjectName
This commit is contained in:
parent
67ff108f53
commit
3b4845511d
|
@ -1082,20 +1082,6 @@ std::unique_ptr<ImmediateDrawer> VulkanProvider::CreateImmediateDrawer() {
|
||||||
return VulkanImmediateDrawer::Create(*this);
|
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(
|
void VulkanProvider::AccumulateInstanceExtensions(
|
||||||
size_t properties_count, const VkExtensionProperties* properties,
|
size_t properties_count, const VkExtensionProperties* properties,
|
||||||
bool request_debug_utils, InstanceExtensions& instance_extensions,
|
bool request_debug_utils, InstanceExtensions& instance_extensions,
|
||||||
|
|
|
@ -222,8 +222,20 @@ class VulkanProvider : public GraphicsProvider {
|
||||||
};
|
};
|
||||||
const DeviceFunctions& dfn() const { return dfn_; }
|
const DeviceFunctions& dfn() const { return dfn_; }
|
||||||
|
|
||||||
void SetDeviceObjectName(VkObjectType type, uint64_t handle,
|
template <typename T>
|
||||||
const char* name) const;
|
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 {
|
bool IsSparseBindingSupported() const {
|
||||||
return queue_family_sparse_binding_ != UINT32_MAX;
|
return queue_family_sparse_binding_ != UINT32_MAX;
|
||||||
|
|
Loading…
Reference in New Issue