vkd3d: Avoid freeing the input signature twice on error paths in d3d12_pipeline_state_init_graphics().

This used to be safe enough before commit
b5ac6ac636, although that was never guaranteed
by the API.
This commit is contained in:
Henri Verbeet
2025-02-11 14:44:29 +01:00
parent 1b7340a6ed
commit 940c67f521
Notes: Henri Verbeet 2025-02-12 20:09:42 +01:00
Approved-by: Giovanni Mascellani (@giomasce)
Approved-by: Henri Verbeet (@hverbeet)
Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/1373

View File

@ -3595,7 +3595,6 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
mask |= 1u << e->InputSlot;
}
graphics->attribute_count = j;
vkd3d_shader_free_shader_signature(&input_signature);
switch (desc->strip_cut_value)
{
@ -3661,6 +3660,7 @@ static HRESULT d3d12_pipeline_state_init_graphics(struct d3d12_pipeline_state *s
if (FAILED(hr = vkd3d_private_store_init(&state->private_store)))
goto fail;
vkd3d_shader_free_shader_signature(&input_signature);
state->vk_bind_point = VK_PIPELINE_BIND_POINT_GRAPHICS;
state->implicit_root_signature = NULL;
d3d12_device_add_ref(state->device = device);