Signed-off-by: Zhiyi Zhang zzhang@codeweavers.com --- libs/vkd3d/state.c | 7 +++++-- libs/vkd3d/vkd3d_private.h | 1 + 2 files changed, 6 insertions(+), 2 deletions(-)
diff --git a/libs/vkd3d/state.c b/libs/vkd3d/state.c index 08f2f3c..09f7989 100644 --- a/libs/vkd3d/state.c +++ b/libs/vkd3d/state.c @@ -1139,6 +1139,7 @@ static ULONG STDMETHODCALLTYPE d3d12_pipeline_state_Release(ID3D12PipelineState struct d3d12_device *device = state->device; const struct vkd3d_vk_device_procs *vk_procs = &device->vk_procs;
+ if (state->name) vkd3d_free(state->name); vkd3d_private_store_destroy(&state->private_store);
if (d3d12_pipeline_state_is_graphics(state)) @@ -1195,9 +1196,9 @@ static HRESULT STDMETHODCALLTYPE d3d12_pipeline_state_SetName(ID3D12PipelineStat { struct d3d12_pipeline_state *state = impl_from_ID3D12PipelineState(iface);
- FIXME("iface %p, name %s stub!\n", iface, debugstr_w(name, state->device->wchar_size)); + TRACE("iface %p, name %s.\n", iface, debugstr_w(name, state->device->wchar_size));
- return E_NOTIMPL; + return vkd3d_set_name(&state->name, name, state->device->wchar_size); }
static HRESULT STDMETHODCALLTYPE d3d12_pipeline_state_GetDevice(ID3D12PipelineState *iface, @@ -1446,6 +1447,7 @@ static HRESULT d3d12_pipeline_state_init_compute(struct d3d12_pipeline_state *st
state->ID3D12PipelineState_iface.lpVtbl = &d3d12_pipeline_state_vtbl; state->refcount = 1; + state->name = NULL;
state->vk_pipeline_layout = VK_NULL_HANDLE; state->vk_set_layout = VK_NULL_HANDLE; @@ -1993,6 +1995,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
state->ID3D12PipelineState_iface.lpVtbl = &d3d12_pipeline_state_vtbl; state->refcount = 1; + state->name = NULL;
state->vk_pipeline_layout = VK_NULL_HANDLE; state->vk_set_layout = VK_NULL_HANDLE; diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index 6607634..f913f49 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -644,6 +644,7 @@ struct d3d12_pipeline_state { ID3D12PipelineState ID3D12PipelineState_iface; LONG refcount; + WCHAR *name;
union {