=?UTF-8?Q?J=C3=B3zef=20Kucia=20?=: vkd3d: Initialize all fields before calling d3d12_command_allocator_allocate_command_buffer ().

Alexandre Julliard julliard at winehq.org
Thu Aug 16 13:42:21 CDT 2018


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

Author: Józef Kucia <jkucia at codeweavers.com>
Date:   Wed Aug 15 13:57:57 2018 +0200

vkd3d: Initialize all fields before calling d3d12_command_allocator_allocate_command_buffer().

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 | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/libs/vkd3d/command.c b/libs/vkd3d/command.c
index 501a067..9455898 100644
--- a/libs/vkd3d/command.c
+++ b/libs/vkd3d/command.c
@@ -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;
 }
 




More information about the wine-cvs mailing list