Commit Graph

452 Commits

Author SHA1 Message Date
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
Henri Verbeet 543605ca9d wined3d: Pass correct bind flags to swapchain creation functions.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet 7cba915710 wined3d: Pass correct bind flags to texture creation functions.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Henri Verbeet 5f9740762a wined3d: Move the OpenGL textures from struct wined3d_texture to struct wined3d_texture_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-30 10:53:55 +01:00
Henri Verbeet e12d97e50d wined3d: Move the multisample renderbuffers from struct wined3d_texture to struct wined3d_texture_gl.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-29 10:11:42 +01:00
Stefan Dösinger 7a36efc3bc wined3d: Avoid accessing the device after minimize in ddraw.
Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:51 +02:00
Stefan Dösinger 222d30754e wined3d: Deactivate the device before minimizing the window.
This fixes tabbing out of Deus Ex Game of the Year edition.

Signed-off-by: Stefan Dösinger <stefan@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-15 20:13:51 +02:00
Henri Verbeet a6d640e866 wined3d: Do not create DCs for all textures on WINED3D_NO3D adapters.
WINED3DFMT_D16_UNORM for example doesn't have a corresponding ddi_format.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-09-28 01:12:02 +02:00
Józef Kucia 9320424105 wined3d: Pass wined3d_adapter to wined3d_get_format().
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-08-23 20:12:29 +02:00
Józef Kucia 49da19e51b wined3d: Execute all CS commands before changing swapchain window.
Fixes a race condition.

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-06-11 18:12:44 +02:00
Józef Kucia 1cc74ea215 wined3d: Allow creating swapchains for windows with empty client rect.
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-05-18 01:43:48 +02:00
Nikolay Sivov 23ea779d8f wined3d: Add new functions to set and get maximum frame latency for the device.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-04-30 20:41:59 +02:00
Józef Kucia 82ffc5b78d wined3d: Avoid superfluous wglSwapIntervalEXT() calls.
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-03-23 16:23:21 +01:00
Józef Kucia 81459fb8a2 wined3d: Remove swap interval from swapchain description.
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-03-22 18:14:55 +01:00
Józef Kucia 6aeb444e4c wined3d: Implement updating swap interval through wined3d_swapchain_present().
Based on a patch by Michael Müller.

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-03-22 18:14:52 +01:00
Henri Verbeet 543a199dc3 wined3d: Only store dc_info for textures that require it.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-15 12:21:50 +01:00
Henri Verbeet 082abe4abe wined3d: Rename struct wined3d_surface to struct wined3d_dc_info.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-15 12:21:48 +01:00
Henri Verbeet b7ed6b9b8e wined3d: Get rid of the "container" field from struct wined3d_surface.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-14 15:27:59 +01:00
Henri Verbeet 70a68144c1 wined3d: Pass a texture and sub-resource index to wined3d_blitter_ops.blitter_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-03-13 13:28:23 +01:00
Józef Kucia e318f8c825 wined3d: Replace presentation interval flags with enum.
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-03-12 17:58:16 +01:00
Henri Verbeet d612495a72 dxgi: Translate swap effects in dxgi_factory_CreateSwapChainForHwnd().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 08:02:14 +01:00
Henri Verbeet 0cf21e85a5 wined3d: Print a fixme for unimplemented swap effects during swapchain (re)creation.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-15 08:02:07 +01:00
Henri Verbeet f08342f573 wined3d: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:06:58 +01:00
Henri Verbeet 16e54c80c8 wined3d: Get rid of the WINED3D_SWAP_EFFECT_FLIP fixme in swapchain_gl_present().
I think this works about as well as it's going to. There may be a theoretical
issue that GDI draws to the window should end up in the backbuffer after a
flip, but I don't think we have tests showing that to actually be the case,
and generally speaking I'm not all that worried about it.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-14 09:06:53 +01:00
Henri Verbeet 9275b06cc0 wined3d: Replace the pool in struct wined3d_resource_desc with resource access flags.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-02 18:36:45 +01:00