From 97cc7ea5a591ed7afaddd00370de3ca62d55cbb4 Mon Sep 17 00:00:00 2001 From: Sil Vilerino Date: Wed, 3 Jan 2024 09:22:52 -0500 Subject: [PATCH] Revert "d3d12: Only destroy the winsys during screen destruction, not reset" This reverts commit 325fb6e26b62326c86514d263ffedd241fd36865. Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/10371 Fixes: 325fb6e26b6 ("d3d12: Only destroy the winsys during screen destruction, not reset") Cc: mesa-stable Part-of: --- src/gallium/drivers/d3d12/d3d12_screen.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/gallium/drivers/d3d12/d3d12_screen.cpp b/src/gallium/drivers/d3d12/d3d12_screen.cpp index f17b3fdc4e7..bb3e3a2e3cb 100644 --- a/src/gallium/drivers/d3d12/d3d12_screen.cpp +++ b/src/gallium/drivers/d3d12/d3d12_screen.cpp @@ -766,15 +766,15 @@ d3d12_deinit_screen(struct d3d12_screen *screen) screen->dev->Release(); screen->dev = nullptr; } + if (screen->winsys) { + screen->winsys->destroy(screen->winsys); + screen->winsys = nullptr; + } } void d3d12_destroy_screen(struct d3d12_screen *screen) { - if (screen->winsys) { - screen->winsys->destroy(screen->winsys); - screen->winsys = nullptr; - } slab_destroy_parent(&screen->transfer_pool); mtx_destroy(&screen->submit_mutex); mtx_destroy(&screen->descriptor_pool_mutex);