=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Fix initial pipeline state.

Alexandre Julliard julliard at winehq.org
Wed Sep 12 16:37:56 CDT 2018


Module: vkd3d
Branch: master
Commit: 9fe06825f8dbe1e8fa9fb303334e4b06a2a98096
URL:    https://source.winehq.org/git/vkd3d.git/?a=commit;h=9fe06825f8dbe1e8fa9fb303334e4b06a2a98096

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Sep 12 15:19:59 2018 +0200

vkd3d: Fix initial pipeline state.

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 at codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet at codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard at winehq.org>

---

 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 f338707..d5bbee9 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 cb11866..37ad13c 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;




More information about the wine-cvs mailing list