Signed-off-by: Henri Verbeet hverbeet@codeweavers.com --- dlls/wined3d/device.c | 22 +++++++++++++++++++++- 1 file changed, 21 insertions(+), 1 deletion(-)
diff --git a/dlls/wined3d/device.c b/dlls/wined3d/device.c index 3efae4bb56c..3697b8f0005 100644 --- a/dlls/wined3d/device.c +++ b/dlls/wined3d/device.c @@ -4752,6 +4752,16 @@ void CDECL wined3d_device_evict_managed_resources(struct wined3d_device *device) } }
+static void update_swapchain_flags(struct wined3d_texture *texture) +{ + unsigned int flags = texture->swapchain->desc.flags; + + if (flags & WINED3D_SWAPCHAIN_GDI_COMPATIBLE) + texture->flags |= WINED3D_TEXTURE_GET_DC; + else + texture->flags &= ~WINED3D_TEXTURE_GET_DC; +} + HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, const struct wined3d_swapchain_desc *swapchain_desc, const struct wined3d_display_mode *mode, wined3d_device_reset_cb callback, BOOL reset_state) @@ -4835,7 +4845,6 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, swapchain->desc.swap_effect = swapchain_desc->swap_effect; swapchain->desc.enable_auto_depth_stencil = swapchain_desc->enable_auto_depth_stencil; swapchain->desc.auto_depth_stencil_format = swapchain_desc->auto_depth_stencil_format; - swapchain->desc.flags = swapchain_desc->flags; swapchain->desc.refresh_rate = swapchain_desc->refresh_rate; swapchain->desc.auto_restore_display_mode = swapchain_desc->auto_restore_display_mode;
@@ -4881,6 +4890,17 @@ HRESULT CDECL wined3d_device_reset(struct wined3d_device *device, swapchain_desc->multisample_type, swapchain_desc->multisample_quality))) return hr;
+ if (swapchain_desc->flags != swapchain->desc.flags) + { + swapchain->desc.flags = swapchain_desc->flags; + + update_swapchain_flags(swapchain->front_buffer); + for (i = 0; i < swapchain->desc.backbuffer_count; ++i) + { + update_swapchain_flags(swapchain->back_buffers[i]); + } + } + if (device->auto_depth_stencil_view) { wined3d_rendertarget_view_decref(device->auto_depth_stencil_view);
Hi,
While running your changed tests on Windows, I think I found new failures. Being a bot and all I'm not very good at pattern recognition, so I might be wrong, but could you please double-check?
Full results can be found at: https://testbot.winehq.org/JobDetails.pl?Key=44025
Your paranoid android.
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)
=== debian9 (build log) ===
X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig) X Error of failed request: BadValue (integer parameter out of range for operation) Major opcode of failed request: 140 (RANDR) Minor opcode of failed request: 21 (RRSetCrtcConfig)