summaryrefslogtreecommitdiff
path: root/src/gallium/winsys
diff options
context:
space:
mode:
authorJesse Natalie <jenatali@microsoft.com>2021-03-31 14:12:29 -0700
committerMarge Bot <eric+marge@anholt.net>2021-04-01 16:19:41 +0000
commit51df136c8b5e332163802349d96dff422d566c29 (patch)
treee95c2b293be1204ee79a4edfa594afc4340e58e8 /src/gallium/winsys
parentf3db2963ce8f84a12cebb6057d4ac593080da24a (diff)
wgl: Add a context to framebuffer destruction
If the window is destroyed on a thread that has a currently-bound context, use that context for destroying the framebuffer. This ensures that the winsys can wait for in-flight work before destroying any resources. If the window did have a context bound beforehand but it was unbound, we should've already done a glFinish. If the window is destroyed from an unrelated thread... well, we're screwed, but that's the best we can do. Reviewed-By: Bill Kristiansen <billkris@microsoft.com> Reviewed-by: Jose Fonseca <jfonseca@vmware.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/9959>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r--src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp
index 9409beb9ee6..50248b3e49b 100644
--- a/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp
+++ b/src/gallium/winsys/d3d12/wgl/d3d12_wgl_framebuffer.cpp
@@ -60,7 +60,8 @@ d3d12_wgl_framebuffer(struct stw_winsys_framebuffer *fb)
}
static void
-d3d12_wgl_framebuffer_destroy(struct stw_winsys_framebuffer *fb)
+d3d12_wgl_framebuffer_destroy(struct stw_winsys_framebuffer *fb,
+ pipe_context *ctx)
{
FREE(fb);
}