Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- libs/vkd3d/resource.c | 6 ++++-- libs/vkd3d/vkd3d_private.h | 1 + 2 files changed, 5 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/resource.c b/libs/vkd3d/resource.c index 4ebfe30..7afcaea 100644 --- a/libs/vkd3d/resource.c +++ b/libs/vkd3d/resource.c @@ -2416,6 +2416,7 @@ static ULONG STDMETHODCALLTYPE d3d12_descriptor_heap_Release(ID3D12DescriptorHea struct d3d12_device *device = heap->device; unsigned int i;
+ if (heap->name) vkd3d_free(heap->name); vkd3d_private_store_destroy(&heap->private_store);
switch (heap->desc.Type) @@ -2500,9 +2501,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_SetName(ID3D12DescriptorH { struct d3d12_descriptor_heap *heap = impl_from_ID3D12DescriptorHeap(iface);
- FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name, heap->device->wchar_size)); + TRACE("iface %p, name %s.\n", iface, debugstr_w(name, heap->device->wchar_size));
- return E_NOTIMPL; + return vkd3d_set_name(&heap->name, name, heap->device->wchar_size); }
static HRESULT STDMETHODCALLTYPE d3d12_descriptor_heap_GetDevice(ID3D12DescriptorHeap *iface, @@ -2576,6 +2577,7 @@ static HRESULT d3d12_descriptor_heap_init(struct d3d12_descriptor_heap *descript
descriptor_heap->ID3D12DescriptorHeap_iface.lpVtbl = &d3d12_descriptor_heap_vtbl; descriptor_heap->refcount = 1; + descriptor_heap->name = NULL;
descriptor_heap->desc = *desc;
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 80e909d..eb4d794 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -465,6 +465,7 @@ struct d3d12_descriptor_heap { ID3D12DescriptorHeap ID3D12DescriptorHeap_iface; LONG refcount; + WCHAR *name;
D3D12_DESCRIPTOR_HEAP_DESC desc;