vkd3d: Set Vulkan object names for NULL CBV resources.

Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
This commit is contained in:
Józef Kucia
2019-03-04 13:15:18 +01:00
committed by Alexandre Julliard
parent f91422eb40
commit 085456005c
3 changed files with 29 additions and 8 deletions

View File

@@ -643,11 +643,26 @@ HRESULT vkd3d_set_private_data_interface(struct vkd3d_private_store *store,
return hr;
}
HRESULT vkd3d_set_vk_object_name(struct d3d12_device *device, uint64_t vk_object,
VkDebugReportObjectTypeEXT vk_object_type, const WCHAR *name)
VkResult vkd3d_set_vk_object_name_utf8(struct d3d12_device *device, uint64_t vk_object,
VkDebugReportObjectTypeEXT vk_object_type, const char *name)
{
const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs;
VkDebugMarkerObjectNameInfoEXT info;
if (!device->vk_info.EXT_debug_marker)
return VK_SUCCESS;
info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT;
info.pNext = NULL;
info.objectType = vk_object_type;
info.object = vk_object;
info.pObjectName = name;
return VK_CALL(vkDebugMarkerSetObjectNameEXT(device->vk_device, &info));
}
HRESULT vkd3d_set_vk_object_name(struct d3d12_device *device, uint64_t vk_object,
VkDebugReportObjectTypeEXT vk_object_type, const WCHAR *name)
{
char *name_utf8;
VkResult vr;
@@ -660,12 +675,7 @@ HRESULT vkd3d_set_vk_object_name(struct d3d12_device *device, uint64_t vk_object
if (!(name_utf8 = vkd3d_strdup_w_utf8(name, device->wchar_size)))
return E_OUTOFMEMORY;
info.sType = VK_STRUCTURE_TYPE_DEBUG_MARKER_OBJECT_NAME_INFO_EXT;
info.pNext = NULL;
info.objectType = vk_object_type;
info.object = vk_object;
info.pObjectName = name_utf8;
vr = VK_CALL(vkDebugMarkerSetObjectNameEXT(device->vk_device, &info));
vr = vkd3d_set_vk_object_name_utf8(device, vk_object, vk_object_type, name_utf8);
vkd3d_free(name_utf8);