[PATCH 5/5] d3d9: Set WINED3D_SWAPCHAIN_GDI_COMPATIBLE on the swapchain when required.
Instead of injecting WINED3D_TEXTURE_CREATE_GET_DC during device_parent_create_swapchain_texture(). Signed-off-by: Henri Verbeet <hverbeet(a)codeweavers.com> --- dlls/d3d9/device.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/dlls/d3d9/device.c b/dlls/d3d9/device.c index 840a786cce4..eaf162c7da3 100644 --- a/dlls/d3d9/device.c +++ b/dlls/d3d9/device.c @@ -346,6 +346,11 @@ static BOOL wined3d_swapchain_desc_from_present_parameters(struct wined3d_swapch = wined3dformat_from_d3dformat(present_parameters->AutoDepthStencilFormat); swapchain_desc->flags = (present_parameters->Flags & D3DPRESENTFLAGS_MASK) | WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH; + if (is_gdi_compat_wined3dformat(swapchain_desc->backbuffer_format) + /* WINED3DFMT_UNKNOWN creates the swapchain with the current + * display format, which is always GDI-compatible. */ + || swapchain_desc->backbuffer_format == WINED3DFMT_UNKNOWN) + swapchain_desc->flags |= WINED3D_SWAPCHAIN_GDI_COMPATIBLE; swapchain_desc->refresh_rate = present_parameters->FullScreen_RefreshRateInHz; swapchain_desc->auto_restore_display_mode = TRUE; @@ -4177,9 +4182,6 @@ static HRESULT CDECL device_parent_create_swapchain_texture(struct wined3d_devic if (container_parent == device_parent) container_parent = &device->IDirect3DDevice9Ex_iface; - if (is_gdi_compat_wined3dformat(desc->format)) - texture_flags |= WINED3D_TEXTURE_CREATE_GET_DC; - if (FAILED(hr = wined3d_texture_create(device->wined3d_device, desc, 1, 1, texture_flags | WINED3D_TEXTURE_CREATE_MAPPABLE, NULL, container_parent, &d3d9_null_wined3d_parent_ops, texture))) -- 2.11.0
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=44026 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)
participants (2)
-
Henri Verbeet -
Marvin