mirror of
https://gitlab.winehq.org/wine/vkd3d.git
synced 2025-09-12 18:50:22 -07:00
vkd3d: Rename the device mutex to pipeline_cache_mutex.
It is used only for pipeline and render pass caching, and renaming it helps prevent inappropriate or erroneous use.
This commit is contained in:
committed by
Alexandre Julliard
parent
37e76618ca
commit
a2741babd9
Notes:
Alexandre Julliard
2023-12-14 23:31:17 +01:00
Approved-by: Giovanni Mascellani (@giomasce) Approved-by: Henri Verbeet (@hverbeet) Approved-by: Alexandre Julliard (@julliard) Merge-Request: https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/292
@@ -1691,7 +1691,7 @@ HRESULT vkd3d_render_pass_cache_find(struct vkd3d_render_pass_cache *cache,
|
||||
HRESULT hr = S_OK;
|
||||
unsigned int i;
|
||||
|
||||
vkd3d_mutex_lock(&device->mutex);
|
||||
vkd3d_mutex_lock(&device->pipeline_cache_mutex);
|
||||
|
||||
for (i = 0; i < cache->render_pass_count; ++i)
|
||||
{
|
||||
@@ -1708,7 +1708,7 @@ HRESULT vkd3d_render_pass_cache_find(struct vkd3d_render_pass_cache *cache,
|
||||
if (!found)
|
||||
hr = vkd3d_render_pass_cache_create_pass_locked(cache, device, key, vk_render_pass);
|
||||
|
||||
vkd3d_mutex_unlock(&device->mutex);
|
||||
vkd3d_mutex_unlock(&device->pipeline_cache_mutex);
|
||||
|
||||
return hr;
|
||||
}
|
||||
@@ -3615,7 +3615,7 @@ static VkPipeline d3d12_pipeline_state_find_compiled_pipeline(const struct d3d12
|
||||
|
||||
*vk_render_pass = VK_NULL_HANDLE;
|
||||
|
||||
vkd3d_mutex_lock(&device->mutex);
|
||||
vkd3d_mutex_lock(&device->pipeline_cache_mutex);
|
||||
|
||||
LIST_FOR_EACH_ENTRY(current, &graphics->compiled_pipelines, struct vkd3d_compiled_pipeline, entry)
|
||||
{
|
||||
@@ -3627,7 +3627,7 @@ static VkPipeline d3d12_pipeline_state_find_compiled_pipeline(const struct d3d12
|
||||
}
|
||||
}
|
||||
|
||||
vkd3d_mutex_unlock(&device->mutex);
|
||||
vkd3d_mutex_unlock(&device->pipeline_cache_mutex);
|
||||
|
||||
return vk_pipeline;
|
||||
}
|
||||
@@ -3646,7 +3646,7 @@ static bool d3d12_pipeline_state_put_pipeline_to_cache(struct d3d12_pipeline_sta
|
||||
compiled_pipeline->vk_pipeline = vk_pipeline;
|
||||
compiled_pipeline->vk_render_pass = vk_render_pass;
|
||||
|
||||
vkd3d_mutex_lock(&device->mutex);
|
||||
vkd3d_mutex_lock(&device->pipeline_cache_mutex);
|
||||
|
||||
LIST_FOR_EACH_ENTRY(current, &graphics->compiled_pipelines, struct vkd3d_compiled_pipeline, entry)
|
||||
{
|
||||
@@ -3661,7 +3661,7 @@ static bool d3d12_pipeline_state_put_pipeline_to_cache(struct d3d12_pipeline_sta
|
||||
if (compiled_pipeline)
|
||||
list_add_tail(&graphics->compiled_pipelines, &compiled_pipeline->entry);
|
||||
|
||||
vkd3d_mutex_unlock(&device->mutex);
|
||||
vkd3d_mutex_unlock(&device->pipeline_cache_mutex);
|
||||
return compiled_pipeline;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user