Commit Graph

401 Commits

Author SHA1 Message Date
Stefan Dösinger 04d4584dea wined3d: Show the device window when changing fullscreen resolutions.
World of Warplanes calls SetWindowLong(window, GWL_STYLE, WS_POPUP)
before calling reset, effectively hiding the window. It does not call
SetWindowPos(SWP_FRAMECHANGED), so the effect isn't visible and the
game displays fine after the reset. However, after the next mouse
click WINPOS_WindowFromPoint skips the window because it doesn't have
WS_VISIBLE and returns the desktop window. This in turn triggers a
focus loss and d3d9 minimizes the game.

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>
2017-12-01 15:56:54 +01:00
Henri Verbeet 22bdde479f wined3d: Introduce a separate CS queue for resource maps.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-22 13:45:08 +02:00
Henri Verbeet 73170152dc wined3d: Allow the command stream thread to run asynchronously.
For a modest performance improvement in CPU-limited scenarios, especially ones
where a significant amount of time is spent in the graphics driver. There's
certainly still more room for improvement, resource maps in particular will
currently cause stalls.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-05-02 15:38:48 +02:00
Henri Verbeet c70486c53f wined3d: Avoid updating the swapchain swap interval from outside the command stream.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-12 09:46:34 +02:00
Henri Verbeet cad4badbcf wined3d: Get rid of wined3d_select_blitter().
Instead, chain the blitters themselves. This also fixes the issue that
currently only a single blitter can store extra data in the "blit_priv" field
of struct wined3d_device.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-04-04 09:42:21 +02:00
Henri Verbeet a80f9a867f wined3d: Use the blitter interface in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 08:51:31 +02:00
Henri Verbeet 4b4091fa62 wined3d: Make the FBO blitter a proper blitter.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-31 08:51:29 +02:00
Henri Verbeet 0a1a6533b5 wined3d: Use WINED3D_BLT_SRC_CKEY to present the logo texture.
WINED3D_BLT_ALPHA_TEST makes no sense, since the texture doesn't have an alpha
channel.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-27 10:58:03 +02:00
Henri Verbeet 34d43fcbdd wined3d: Get rid of the redundant context_acquire() call in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-27 10:57:57 +02:00
Henri Verbeet 928110e512 wined3d: Use blit_shader.blit_surface() in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-27 10:57:55 +02:00
Henri Verbeet 012f9b03f8 wined3d: Use draw_textured_quad() in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-23 17:08:00 +01:00
Henri Verbeet 3b0e37a0f4 wined3d: Send swapchain context creation through the command stream.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-03-01 10:29:16 +01:00
Henri Verbeet cf4de1c498 wined3d: Send swapchain context destruction through the command stream.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-28 09:39:29 +01:00
Henri Verbeet df0f07bfc5 wined3d: Get rid of an unneeded context_release() in swapchain_init().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-28 09:39:27 +01:00
Henri Verbeet b7f0d3312e wined3d: Use the command stream state in swapchain_gl_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-28 09:39:25 +01:00
Henri Verbeet 2641c5c28f wined3d: Pass a texture and sub-resource index to context_acquire().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-15 16:16:20 +01:00
Henri Verbeet 274b091c87 wined3d: Free the swapchain context array in swapchain_destroy_contexts().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-15 16:16:16 +01:00
Henri Verbeet 1401f91307 wined3d: Disable sRGB decode in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-10 21:29:43 +01:00
Nikolay Sivov 1a7ddf8dd9 dxgi: Added support for DXGI_SWAP_CHAIN_FLAG_GDI_COMPATIBLE.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-02-09 13:16:57 +01:00
Henri Verbeet 7c5fd62efc wined3d: Get rid of the "onscreen_depth_stencil" field from struct wined3d_device.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:56:03 +01:00
Henri Verbeet 41738baea2 wined3d: Get rid of surface_modify_ds_location().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:56:00 +01:00
Henri Verbeet 35e651caf1 wined3d: Get rid of the "ds_current_size" field from struct wined3d_surface.
This should be unused now that surface_load_ds_location() is gone.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-26 16:55:57 +01:00
Henri Verbeet ff85cd5f4a wined3d: Get rid of the "AlwaysOffscreen" setting.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-25 11:25:42 +01:00
Józef Kucia e2e0c747a8 wined3d: Filter messages for fullscreen mode changes.
This fixes a regression introduced by commit
d9f8cba50f.

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>
2016-12-14 10:32:44 +01:00
Józef Kucia a02fd72965 wined3d: Use depth/stencil formats for typeless resources only when WINED3DUSAGE_DEPTHSTENCIL is set.
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>
2016-12-12 19:40:33 +01:00
Józef Kucia 5ee3f54438 wined3d: Use single structure for view 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>
2016-12-06 15:02:34 +01:00
Józef Kucia bd10362667 wined3d: Optionally use closest matching mode 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>
2016-08-26 23:23:36 +09:00
Józef Kucia 92a6c5839d wined3d: Optionally use closest matching mode in wined3d_swapchain_set_fullscreen().
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>
2016-08-26 23:23:35 +09:00
Józef Kucia 28f24b9ddf wined3d: Introduce 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>
2016-08-05 09:07:53 -05:00
Henri Verbeet f80ba28a15 wined3d: Use wined3d_texture_load_location() in swapchain_gl_frontbuffer_updated().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:04 -05:00
Henri Verbeet 398f0d024f wined3d: Use wined3d_texture_load_location() in swapchain_gl_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:03 -05:00
Henri Verbeet 42b90efdfd wined3d: Use wined3d_texture_load_location() in wined3d_swapchain_rotate().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:03 -05:00
Henri Verbeet 3e6494321e wined3d: Use wined3d_texture_load_location() in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-08-04 09:09:03 -05:00
Józef Kucia 2f5850c56a wined3d: Add WINED3D_SWAPCHAIN_RESTORE_WINDOW_RECT flag.
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>
2016-08-03 09:56:17 -05:00
Józef Kucia 8d032351f2 wined3d: Add WINED3D_SWAPCHAIN_ALLOW_MODE_SWITCH flag.
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>
2016-08-03 09:56:17 -05:00
Józef Kucia cad279449c wined3d: Extract wined3d_swapchain_set_fullscreen() from wined3d_device_reset().
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>
2016-08-02 06:08:50 -05:00
Michael Stefaniuc bb82e915d1 wined3d: Use SetRect() instead of open coding it.
Signed-off-by: Michael Stefaniuc <mstefani@redhat.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-07-03 10:17:57 +09:00
Henri Verbeet 8ae3a9b624 wined3d: Introduce a helper function to allocate arrays.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-24 16:19:01 +09:00
Stefan Dösinger aa475ce23f wined3d: Discard the backbuffer in swapchain_gl_present() with the "discard" swap effect.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-05-18 01:06:17 +09:00
Henri Verbeet 3b96ac290d wined3d: Allocate system memory for complete textures.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-21 14:09:39 +09:00
Henri Verbeet 62a766f75c wined3d: Use the texture dimensions in swapchain_blit().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-20 14:02:38 +09:00
Henri Verbeet feb86895b4 wined3d: Store renderbuffer IDs in struct wined3d_texture.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-19 14:56:02 +09:00
Henri Verbeet 4896cda6c5 wined3d: Track SFLAG_DISCARD per-texture.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:32 +09:00
Henri Verbeet 82a7f1ebf2 wined3d: Implement texture DC creation on top of D3DKMTCreateDCFromMemory().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-15 12:32:25 +09:00
Henri Verbeet 64767de277 wined3d: Use the texture dimensions in swapchain_gdi_frontbuffer_updated().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-14 13:13:39 +09:00
Henri Verbeet 2a2554ee59 wined3d: Store sub-resource map counts in the sub-resource structure.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-11 11:36:04 +09:00
Henri Verbeet e6e89dbc65 wined3d: Avoid surface_from_resource() in swapchain_gdi_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 12:52:24 +09:00
Henri Verbeet 6b8fb1c22e wined3d: Also update the swap interval when not recreating the context in wined3d_device_reset().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-05 12:52:19 +09:00
Henri Verbeet e50ff74808 wined3d: Avoid surface_from_resource() in swapchain_gdi_frontbuffer_updated().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-01 12:48:39 +09:00
Henri Verbeet c633ffb95c wined3d: Avoid surface_from_resource() in swapchain_gl_present().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-04-01 12:48:37 +09:00