From: Józef Kucia jkucia@codeweavers.com
d3d12_command_list_begin_command_buffer() was using the previous initial pipeline state when called from d3d12_command_list_Reset().
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/command.c | 8 ++++---- libs/vkd3d/vkd3d_private.h | 1 - 2 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c index f338707391bc..d5bbee966ecd 100644 --- a/libs/vkd3d/command.c +++ b/libs/vkd3d/command.c @@ -634,8 +634,6 @@ static HRESULT d3d12_command_list_begin_command_buffer(struct d3d12_command_list list->is_recording = true; list->is_valid = true;
- ID3D12GraphicsCommandList_SetPipelineState(&list->ID3D12GraphicsCommandList_iface, list->pipeline_state); - return S_OK; }
@@ -1740,7 +1738,8 @@ static HRESULT STDMETHODCALLTYPE d3d12_command_list_Reset(ID3D12GraphicsCommandL if (SUCCEEDED(hr = d3d12_command_allocator_allocate_command_buffer(allocator_impl, list))) { list->allocator = allocator_impl; - list->pipeline_state = initial_state; + + ID3D12GraphicsCommandList_SetPipelineState(&list->ID3D12GraphicsCommandList_iface, initial_state); }
memset(list->pipeline_bindings, 0, sizeof(list->pipeline_bindings)); @@ -4239,7 +4238,6 @@ 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;
memset(list->strides, 0, sizeof(list->strides)); list->primitive_topology = VK_PRIMITIVE_TOPOLOGY_POINT_LIST; @@ -4262,6 +4260,8 @@ static HRESULT d3d12_command_list_init(struct d3d12_command_list *list, struct d return hr; }
+ ID3D12GraphicsCommandList_SetPipelineState(&list->ID3D12GraphicsCommandList_iface, initial_pipeline_state); + return S_OK; }
diff --git a/libs/vkd3d/vkd3d_private.h b/libs/vkd3d/vkd3d_private.h index cb11866de66e..37ad13c132cd 100644 --- a/libs/vkd3d/vkd3d_private.h +++ b/libs/vkd3d/vkd3d_private.h @@ -614,7 +614,6 @@ struct d3d12_command_list LONG refcount;
D3D12_COMMAND_LIST_TYPE type; - ID3D12PipelineState *pipeline_state;
VkCommandBuffer vk_command_buffer; bool is_recording;