vkd3d: Initialize all fields before calling d3d12_command_allocator_allocate_command_buffer().

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 2018-08-15 13:57:57 +02:00 committed by Alexandre Julliard
parent 8b846b07e7
commit b500207b79

View File

@ -4001,12 +4001,6 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
list->allocator = allocator;
list->pipeline_state = initial_pipeline_state;
if (FAILED(hr = d3d12_command_allocator_allocate_command_buffer(allocator, list)))
{
ID3D12Device_Release(&device->ID3D12Device_iface);
return hr;
}
memset(list->strides, 0, sizeof(list->strides));
list->ia_desc.sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO;
list->ia_desc.pNext = NULL;
@ -4025,6 +4019,12 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
list->state = NULL;
if (FAILED(hr = d3d12_command_allocator_allocate_command_buffer(allocator, list)))
{
ID3D12Device_Release(&device->ID3D12Device_iface);
return hr;
}
return S_OK;
}