Module: wine
Branch: stable
Commit: dbfed2e2f67453160e37874d74eccfddb519c474
URL: https://source.winehq.org/git/wine.git/?a=commit;h=dbfed2e2f67453160e37874d…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Tue Jan 12 21:15:57 2021 +0330
wined3d: Use glFinish() for synchronisation when cleaning up a destroyed context in wined3d_context_gl_cleanup().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50485
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
(cherry picked from commit 3cc8147594de868884d3e57babff8eef058c63a3)
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/wined3d/context_gl.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)
diff --git a/dlls/wined3d/context_gl.c b/dlls/wined3d/context_gl.c
index 467f5b64d6c..a51e5ec9095 100644
--- a/dlls/wined3d/context_gl.c
+++ b/dlls/wined3d/context_gl.c
@@ -1374,9 +1374,20 @@ static void wined3d_context_gl_cleanup(struct wined3d_context_gl *context_gl)
if (context_gl->valid)
{
- wined3d_context_gl_submit_command_fence(context_gl);
- wined3d_context_gl_wait_command_fence(context_gl,
- wined3d_device_gl(context_gl->c.device)->current_fence_id - 1);
+ /* If we're here because we're switching away from a previously
+ * destroyed context, acquiring a context in order to submit a fence
+ * is problematic. (In particular, we'd end up back here again in the
+ * process of switching to the newly acquired context.) */
+ if (context_gl->c.destroyed)
+ {
+ gl_info->gl_ops.gl.p_glFinish();
+ }
+ else
+ {
+ wined3d_context_gl_submit_command_fence(context_gl);
+ wined3d_context_gl_wait_command_fence(context_gl,
+ wined3d_device_gl(context_gl->c.device)->current_fence_id - 1);
+ }
if (context_gl->dummy_arbfp_prog)
GL_EXTCALL(glDeleteProgramsARB(1, &context_gl->dummy_arbfp_prog));
Module: wine
Branch: stable
Commit: 129baec9baecb259a43f9b34170183bce98b1d00
URL: https://source.winehq.org/git/wine.git/?a=commit;h=129baec9baecb259a43f9b34…
Author: Henri Verbeet <hverbeet(a)codeweavers.com>
Date: Tue Jan 19 14:34:57 2021 +0100
wined3d: Add some barriers between resource usage on different bind points.
A typical case would be between using a texture as render target and using it
as a shader resource.
Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
(cherry picked from commit 82a9e8006321f5957963c4accc2f08887f724dd9)
Signed-off-by: Michael Stefaniuc <mstefani(a)winehq.org>
---
dlls/wined3d/buffer.c | 31 +++++++++++++++++++++++++++++++
dlls/wined3d/context_vk.c | 34 ++++++++++++++++++++++++++--------
dlls/wined3d/resource.c | 24 +++++++++++++++++++++++-
dlls/wined3d/swapchain.c | 1 +
dlls/wined3d/texture.c | 37 ++++++++++++++++++++++---------------
dlls/wined3d/wined3d_private.h | 34 ++++++++++++++++++++++++++++++++++
6 files changed, 137 insertions(+), 24 deletions(-)
Diff: https://source.winehq.org/git/wine.git/?a=commitdiff;h=129baec9baecb259a43f…