From: Józef Kucia jkucia@codeweavers.com
Signed-off-by: Józef Kucia jkucia@codeweavers.com --- libs/vkd3d/device.c | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/libs/vkd3d/device.c b/libs/vkd3d/device.c index c1db7d30a9e8..b57e3ceb99e5 100644 --- a/libs/vkd3d/device.c +++ b/libs/vkd3d/device.c @@ -1280,6 +1280,14 @@ static HRESULT d3d12_device_init_pipeline_cache(struct d3d12_device *device) VkResult vr; int rc;
+ if ((rc = pthread_mutex_init(&device->pipeline_cache_mutex, NULL))) + { + ERR("Failed to initialize mutex, error %d.\n", rc); + return E_FAIL; + } + + rb_init(&device->pipeline_cache, compare_pipeline_cache_entry); + cache_info.sType = VK_STRUCTURE_TYPE_PIPELINE_CACHE_CREATE_INFO; cache_info.pNext = NULL; cache_info.flags = 0; @@ -1292,14 +1300,6 @@ static HRESULT d3d12_device_init_pipeline_cache(struct d3d12_device *device) device->vk_pipeline_cache = VK_NULL_HANDLE; }
- rb_init(&device->pipeline_cache, compare_pipeline_cache_entry); - - if ((rc = pthread_mutex_init(&device->pipeline_cache_mutex, NULL))) - { - ERR("Failed to initialize mutex, error %d.\n", rc); - return E_FAIL; - } - return S_OK; }