zink: lock screen queue on context_destroy and CreateSwapchain
Cc: mesa-stable
Signed-off-by: Karol Herbst <kherbst@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/25985>
(cherry picked from commit 208875516c
)
This commit is contained in:

committed by
Eric Engestrom

parent
6fa1ab1ad0
commit
f4e231dddd
@@ -584,7 +584,7 @@
|
||||
"description": "zink: lock screen queue on context_destroy and CreateSwapchain",
|
||||
"nominated": true,
|
||||
"nomination_type": 0,
|
||||
"resolution": 0,
|
||||
"resolution": 1,
|
||||
"main_sha": null,
|
||||
"because_sha": null,
|
||||
"notes": null
|
||||
|
@@ -124,7 +124,9 @@ zink_context_destroy(struct pipe_context *pctx)
|
||||
if (util_queue_is_initialized(&screen->flush_queue))
|
||||
util_queue_finish(&screen->flush_queue);
|
||||
if (ctx->batch.state && !screen->device_lost) {
|
||||
simple_mtx_lock(&screen->queue_lock);
|
||||
VkResult result = VKSCR(QueueWaitIdle)(screen->queue);
|
||||
simple_mtx_unlock(&screen->queue_lock);
|
||||
|
||||
if (result != VK_SUCCESS)
|
||||
mesa_loge("ZINK: vkQueueWaitIdle failed (%s)", vk_Result_to_str(result));
|
||||
|
@@ -318,7 +318,9 @@ kopper_CreateSwapchain(struct zink_screen *screen, struct kopper_displaytarget *
|
||||
if (error == VK_ERROR_NATIVE_WINDOW_IN_USE_KHR) {
|
||||
if (util_queue_is_initialized(&screen->flush_queue))
|
||||
util_queue_finish(&screen->flush_queue);
|
||||
simple_mtx_lock(&screen->queue_lock);
|
||||
VkResult result = VKSCR(QueueWaitIdle)(screen->queue);
|
||||
simple_mtx_unlock(&screen->queue_lock);
|
||||
if (result != VK_SUCCESS)
|
||||
mesa_loge("ZINK: vkQueueWaitIdle failed (%s)", vk_Result_to_str(result));
|
||||
error = VKSCR(CreateSwapchainKHR)(screen->dev, &cswap->scci, NULL,
|
||||
|
Reference in New Issue
Block a user