Module: wine
Branch: master
Commit: 72597b170e814599ef2be4b19dc4b9de0932a30f
URL: https://gitlab.winehq.org/wine/wine/-/commit/72597b170e814599ef2be4b19dc4b9…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Wed Aug 5 20:09:38 2020 +0200
wined3d: Don't use separate GL contexts for different swapchains.
This avoids triggering a Mesa slowpath introduced
by Mesa commit e7f3a8d6959c74f63c877dd8776fe519d54f946f.
Additionally, it helps applications using multiple swapchains and
queries (e.g. the one in bug 43773) by not requiring extra context
switches when polling queries. For the records, the actual issue from
bug 43773 was probably fixed a long time ago, maybe already by
7b62a970e9ad3b4179394cf54f0232475fe2388a or thereabouts.
The downside of this change is that we'll now end up calling
glFinish() when there are multiple threads using the same device when
CSMT is disabled. That's a non-default setting and one that should
only be used for troubleshooting purposes at this point, so it
shouldn't be too bad of an issue. It might also make sense to just get
rid of that glFinish() entirely, it's never going to be a complete
fix.
---
dlls/wined3d/adapter_gl.c | 2 +-
dlls/wined3d/context_gl.c | 10 ++++++
dlls/wined3d/device.c | 14 +++-----
dlls/wined3d/swapchain.c | 81 ++++++------------------------------------
dlls/wined3d/wined3d_private.h | 7 ----
5 files changed, 26 insertions(+), 88 deletions(-)
Module: wine
Branch: master
Commit: b12cae8c99e8d7d606a4569d86ba63579d0087bd
URL: https://gitlab.winehq.org/wine/wine/-/commit/b12cae8c99e8d7d606a4569d86ba63…
Author: Matteo Bruni <mbruni(a)codeweavers.com>
Date: Wed Sep 21 10:25:00 2022 +0200
wined3d: Get rid of a redundant branch.
---
dlls/wined3d/device.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c
index 7a37a27b0cd..b7d0b1adebc 100644
--- a/dlls/wined3d/device.c
+++ b/dlls/wined3d/device.c
@@ -5848,6 +5848,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
device_init_swapchain_state(device, swapchain);
if (wined3d_settings.logo)
device_load_logo(device, wined3d_settings.logo);
+
+ hr = device->adapter->adapter_ops->adapter_init_3d(device);
}
else
{
@@ -5857,12 +5859,8 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device,
wined3d_device_context_set_depth_stencil_view(context, view);
}
- if (reset_state)
- hr = device->adapter->adapter_ops->adapter_init_3d(device);
-
- /* All done. There is no need to reload resources or shaders, this will happen automatically on the
- * first use
- */
+ /* All done. There is no need to reload resources or shaders, this will
+ * happen automatically on the first use. */
return hr;
}