mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-01-03 15:50:17 +01:00
zink: create a copy context for the screen on init
Reviewed-by: Dave Airlie <airlied@redhat.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16252>
This commit is contained in:
parent
94d400d5af
commit
b978761385
2 changed files with 9 additions and 0 deletions
|
|
@ -1193,6 +1193,9 @@ zink_destroy_screen(struct pipe_screen *pscreen)
|
|||
zink_kopper_deinit_displaytarget(screen, entry->data);
|
||||
simple_mtx_destroy(&screen->dt_lock);
|
||||
|
||||
if (screen->copy_context)
|
||||
screen->copy_context->base.destroy(&screen->copy_context->base);
|
||||
|
||||
if (VK_NULL_HANDLE != screen->debugUtilsCallbackHandle) {
|
||||
VKSCR(DestroyDebugUtilsMessengerEXT)(screen->instance, screen->debugUtilsCallbackHandle, NULL);
|
||||
}
|
||||
|
|
@ -2225,6 +2228,11 @@ zink_internal_create_screen(const struct pipe_screen_config *config)
|
|||
glsl_type_singleton_init_or_ref();
|
||||
|
||||
init_driver_workarounds(screen);
|
||||
screen->copy_context = zink_context(screen->base.context_create(&screen->base, NULL, ZINK_CONTEXT_COPY_ONLY));
|
||||
if (!screen->copy_context) {
|
||||
mesa_loge("zink: failed to create copy context");
|
||||
goto fail;
|
||||
}
|
||||
|
||||
return screen;
|
||||
|
||||
|
|
|
|||
|
|
@ -87,6 +87,7 @@ struct zink_screen {
|
|||
VkSemaphore sem;
|
||||
VkSemaphore prev_sem;
|
||||
struct util_queue flush_queue;
|
||||
struct zink_context *copy_context;
|
||||
|
||||
unsigned buffer_rebind_counter;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue