Zhiyi Zhang : vkd3d: Implement d3d12_command_queue_SetName().

Alexandre Julliard julliard at winehq.org
Tue Feb 5 15:58:13 CST 2019


Module: vkd3d
Branch: master
Commit: de88b33e4deb106af5296e21ac06e5b3f5343539
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=de88b33e4deb106af5296e21ac06e5b3f5343539

Author: Zhiyi Zhang <zzhang at codeweavers.com>
Date:   Fri Feb  1 11:37:58 2019 +0800

vkd3d: Implement d3d12_command_queue_SetName().

Signed-off-by: Zhiyi Zhang <zzhang at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 libs/vkd3d/command.c | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index dd0d564..f334f9e 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -4549,10 +4549,21 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_queue_SetPrivateDataInterface(ID3
 static HRESULT STDMETHODCALLTYPE d3d12_command_queue_SetName(ID3D12CommandQueue *iface, const WCHAR *name)
 {
     struct d3d12_command_queue *command_queue = impl_from_ID3D12CommandQueue(iface);
+    VkQueue vk_queue;
+    HRESULT hr;
 
-    FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name, command_queue->device->wchar_size));
+    TRACE("iface %p, name %s.\n", iface, debugstr_w(name, command_queue->device->wchar_size));
 
-    return E_NOTIMPL;
+    if (!(vk_queue = vkd3d_queue_acquire(command_queue->vkd3d_queue)))
+    {
+        ERR("Failed to acquire queue %p.\n", command_queue->vkd3d_queue);
+        return E_FAIL;
+    }
+
+    hr = vkd3d_set_vk_object_name(command_queue->device, (uint64_t)(uintptr_t)vk_queue,
+            VK_DEBUG_REPORT_OBJECT_TYPE_QUEUE_EXT, name);
+    vkd3d_queue_release(command_queue->vkd3d_queue);
+    return hr;
 }
 
 static HRESULT STDMETHODCALLTYPE d3d12_command_queue_GetDevice(ID3D12CommandQueue *iface,




More information about the wine-cvs mailing list