libs/vkd3d: Set the initial pipeline state on command list creation/reset.

This commit is contained in:
Henri Verbeet 2016-09-28 12:00:54 +02:00
parent 4c517454b6
commit 3fe56457f9
2 changed files with 8 additions and 6 deletions

View File

@ -331,6 +331,10 @@ static HRESULT vkd3d_begin_command_buffer(struct d3d12_command_list *list)
}
list->is_recording = TRUE;
if (list->pipeline_state)
ID3D12GraphicsCommandList_SetPipelineState(&list->ID3D12GraphicsCommandList_iface, list->pipeline_state);
return S_OK;
}
@ -851,12 +855,10 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandL
vkd3d_command_allocator_free_command_list(list->allocator, list);
list->allocator = allocator_impl;
list->pipeline_state = initial_state;
if (FAILED(hr = vkd3d_command_allocator_allocate_command_list(allocator_impl, list)))
return hr;
if (initial_state)
FIXME("Ignoring initial pipeline state %p.\n", initial_state);
return S_OK;
}
@ -1455,6 +1457,8 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
ID3D12Device_AddRef(&device->ID3D12Device_iface);
list->allocator = allocator;
list->pipeline_state = initial_pipeline_state;
if (FAILED(hr = vkd3d_command_allocator_allocate_command_list(allocator, list)))
return hr;
@ -1466,9 +1470,6 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d
list->framebuffers_size = 0;
list->framebuffer_count = 0;
if (initial_pipeline_state)
FIXME("Ignoring initial pipeline state %p.\n", initial_pipeline_state);
return S_OK;
}

View File

@ -202,6 +202,7 @@ struct d3d12_command_list
ULONG refcount;
D3D12_COMMAND_LIST_TYPE type;
ID3D12PipelineState *pipeline_state;
VkCommandBuffer vk_command_buffer;
BOOL is_recording;