Commit Graph

476 Commits

Author SHA1 Message Date
Henri Verbeet b27f961eeb wined3d: Move the context array from struct wined3d_swapchain to struct wined3d_swapchain_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 11:02:50 +02:00
Henri Verbeet 17ce100766 wined3d: Move the backup window from struct wined3d_swapchain to struct wined3d_swapchain_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 11:02:47 +02:00
Henri Verbeet eef96e89ac wined3d: Introduce a separate structure for OpenGL swapchain information.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-13 11:02:44 +02:00
Henri Verbeet 7170f67456 wined3d: Make the adapter responsible for swapchain creation and destruction.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-08 09:01:55 +02:00
Henri Verbeet 74b9ef2c1d wined3d: Move the "gl_info" field from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-07 19:56:16 +02:00
Zebediah Figura 236f590fd6 wined3d: Inhibit the screensaver while a full-screen application has focus.
This matches Windows behaviour at least as of Windows 7.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-05 18:44:39 +02:00
Józef Kucia 14dee7bd0d wined3d: Fix memory leak in wined3d_swapchain_state_create() (Coverity).
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-05 18:44:37 +02:00
Henri Verbeet df5357cda0 wined3d: Pass a wined3d_context_gl structure to swapchain_gl_set_swap_interval().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-02 08:58:51 +02:00
Conor McCarthy 9b493d42c4 dxgi: Implement d3d12_swapchain_SetFullscreenState().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:48 +02:00
Conor McCarthy 6d64bfc28b dxgi: Implement d3d12_swapchain_ResizeTarget().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:42 +02:00
Henri Verbeet 71e8a32479 wined3d: Replace wined3d_swapchain_resize_target() with wined3d_swapchain_state_resize_target().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:39 +02:00
Henri Verbeet d51e825443 wined3d: Rename wined3d_window_state_restore_from_fullscreen() to wined3d_swapchain_state_restore_from_fullscreen().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:36 +02:00
Henri Verbeet bed677e343 wined3d: Move the "desc" field from struct wined3d_swapchain to struct wined3d_swapchain_state.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:30:11 +02:00
Conor McCarthy 3fc96a5d35 wined3d: Track windows styles per-swapchain.
Instead of per-device.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:30:09 +02:00
Henri Verbeet 0521cc0b8b wined3d: Filter messages per-window instead of per-device.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:30:07 +02:00
Henri Verbeet 5f96c5e264 wined3d: Setup/restore fullscreen window state inside wined3d.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:30:05 +02:00
Henri Verbeet 57d158622f wined3d: Acquire a context for the front buffer in swapchain_gl_present().
Since context_acquire() doesn't take the resource location into account, it
may consider the back-buffer to be offscreen, and return an already active
context for a different swapchain. This fixes a regression introduced by
commit 64d41b3dec.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-31 08:29:27 +02:00
Henri Verbeet 64d41b3dec wined3d: Try harder to reuse the current context.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-04 21:14:54 +02:00
Henri Verbeet 4ed190e8ac wined3d: Also try to create a depth/stencil buffer for WINED3D_NO3D devices in swapchain_init().
If requested. It will fail as it should, but the client library should never
request it. I.e., the additional check is redundant.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-03 15:24:52 +02:00
Henri Verbeet 1ba7247a4f wined3d: Unhook swapchains in swapchain_cleanup().
So that the hook is properly removed on failure in wined3d_swapchain_create().
This is a somewhat theoretical though, since in practice
WINED3D_SWAPCHAIN_HOOK and WINED3D_SWAPCHAIN_IMPLICIT are never used together.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-07-02 08:00:03 +02:00
Zebediah Figura d601fd9234 wined3d: Store the cursor texture in a local variable in swapchain_gl_present().
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47392
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-25 19:21:28 +02:00
Andrew Eikum 628d60a159 wined3d: Validate that we got a valid window in wined3d_device_setup_fullscreen_window().
Signed-off-by: Andrew Eikum <aeikum@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-20 08:48:36 +02:00
Zhiyi Zhang a600760fa1 dxgi: Implement Alt+Enter handling.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 20:41:26 +02:00
Henri Verbeet b94a6b1efd wined3d: Do not acquire/release the focus window in wined3d_swapchain_set_fullscreen().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 20:41:26 +02:00
Henri Verbeet 0781596cb6 wined3d: Move the "tid" field from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-10 12:16:46 +02:00
Henri Verbeet e0d9bc3a87 wined3d: Move the "valid" field from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-06 15:30:33 +02:00
Henri Verbeet 6937b98700 wined3d: Make the adapter responsible for acquiring and releasing contexts.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-05 16:44:45 +02:00
Henri Verbeet d88c403e54 wined3d: Properly check whether a context was created in swapchain_init().
This fixes commit db20107265, but the underlying
issue was of course present before that commit.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 22:33:30 +02:00
Henri Verbeet de035b71ab wined3d: Move the WGL fields from struct wined3d_context to struct wined3d_context_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-03 22:33:30 +02:00
Henri Verbeet db20107265 wined3d: Use context_acquire() in wined3d_swapchain_cs_init().
Instead of calling context_create() directly.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-16 20:54:23 +02:00
Henri Verbeet 1859ca857f wined3d: Determine the ORM_BACKBUFFER depth/stencil format in wined3d_adapter_gl_create_context().
Instead of in wined3d_swapchain_cs_init().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-07 08:46:00 -05:00
Henri Verbeet 186ae1ad78 wined3d: Get rid of the "target" parameter to context_create().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-06 13:19:33 -05:00
Henri Verbeet bad9cd29a8 wined3d: Get rid of the redundant "device" parameter to context_destroy().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-05-02 17:10:37 +02:00
Henri Verbeet b15685355c wined3d: Explicitly create the implicit swapchain.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:44 +02:00
Józef Kucia 6d45ce4e5a wined3d: Pass swap interval to swapchain ops.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-18 16:52:14 +01:00
Matteo Bruni 9fc282d682 wined3d: Set display mode to a suitable adapter format.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46792
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-03-14 23:52:59 +01:00
Józef Kucia cd2dee0f4b wined3d: Execute all CS commands before changing swapchain palette.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=44796
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-01-14 17:25:49 +01:00
Józef Kucia 9042fbe1e4 wined3d: Lock wined3d mutex in wined3d_swapchain_present().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-03 22:27:05 +01:00
Józef Kucia f44e09b182 wined3d: Use wined3d_cs_finish() in swapchain_cleanup().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-30 19:36:51 +01:00
Józef Kucia 57110d5bc2 wined3d: Introduce wined3d_cs_finish() helper.
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:34 +01:00
Józef Kucia 662e645257 wined3d: Lock wined3d mutex in wined3d_swapchain_create().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:34 +01:00
Józef Kucia 56d2db81b3 wined3d: Lock wined3d mutex in wined3d_swapchain_decref().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:34 +01:00
Józef Kucia 0896decb18 wined3d: Lock wined3d mutex in wined3d_swapchain_resize_target().
Fixes a deadlock. It can also be seen as a small step towards more
fine-grained locking in wined3d.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45431
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-29 17:48:34 +01:00
Józef Kucia 74351205ac wined3d: Propagate HRESULTs in wined3d_swapchain_resize_target().
Signed-off-by: Józef Kucia <jkucia@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-23 20:17:44 +01:00
Henri Verbeet cdfdfc382b wined3d: Respect WINED3D_SWAPCHAIN_LOCKABLE_BACKBUFFER.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-08 19:03:26 +01:00
Henri Verbeet ca87bd95c2 wined3d: Do not set WINED3D_TEXTURE_CREATE_GET_DC on the implicit depth/stencil texture.
It doesn't make a lot of sense for depth formats.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-07 16:54:53 +01:00
Henri Verbeet 03c1422a71 wined3d: Get rid of WINED3DUSAGE_TEXTURE.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 11:14:36 +01:00
Henri Verbeet a0d6ef5bb4 wined3d: Get rid of WINED3DUSAGE_DEPTHSTENCIL.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-06 11:14:34 +01:00
Henri Verbeet 3adf4b8415 wined3d: Get rid of WINED3DUSAGE_RENDERTARGET.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-11-05 19:12:12 +01:00
Henri Verbeet 7d83ebeed2 wined3d: Pass bind flags to wined3d_get_format().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00