Henri Verbeet
a5ed207ab0
wined3d: Allow zero width/height for fullscreen swapchains as well in wined3d_swapchain_resize_buffers().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-27 21:25:31 +02:00
Henri Verbeet
3aa566610c
wined3d: Use the client area dimensions instead of the backbuffer dimensions for the Vulkan swapchain.
...
Often these are the same, and even when not, the minimum/maximum image extents
will often end up forcing the swapchain dimensions to be the same as the
client area. However, some implementations will allow the swapchain to be
created with dimensions different from the client area, but then return
VK_SUBOPTIMAL_KHR from vkQueuePresentKHR().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-04-09 20:37:14 +02:00
Zebediah Figura
86dcbadffb
wined3d: Pass a wined3d_device_context to wined3d_texture_blt().
...
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>
2021-04-07 15:48:35 +02:00
Jan Sikorski
99dc5b78a1
wined3d: Add resolve_format parameter to blitter_blit.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-31 22:16:25 +02:00
Henri Verbeet
bd9aca2cc8
wined3d: Implement wined3d_swapchain_set_gamma_ramp() on top of wined3d_output_set_gamma_ramp().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 17:56:52 +01:00
Henri Verbeet
46c50c03ce
wined3d: Trace wined3d_swapchain_vk_blit() failures.
...
These are expected failures in some circumstances, but we'd still like to know
about them when they happen.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-25 17:56:43 +01:00
Jan Sikorski
16a62fcd87
wined3d: Introduce struct wined3d_image_vk and its create/destroy helpers.
...
Signed-off-by: Jan Sikorski <jsikorski@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-23 20:53:31 +01:00
Matteo Bruni
cb45e91b24
wined3d: Handle blits to Vulkan swapchains not matching the D3D swapchain.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50119
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-18 22:04:01 +01:00
Henri Verbeet
521cafcfff
wined3d: Pass a resource range to wined3d_context_vk_image_barrier().
...
In particular, this allows different sub-resources of the same texture to have
different image layouts, as required when doing blits between them.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-03-11 21:52:17 +01:00
Henri Verbeet
2ff9a8f08a
wined3d: Do not fail swapchain creation in wined3d_swapchain_vk_init() if a Vulkan swapchain could not be created.
...
While far from ideal, we can still use swapchain_blit_gdi() to get
back-buffers to the screen.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:10:18 +01:00
Henri Verbeet
70418f69dd
wined3d: Introduce a backup path for swapchain presents using GDI.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-22 09:10:16 +01:00
Henri Verbeet
7ba0cc9085
wined3d: Add some TRACEs to command stream callbacks.
...
I.e., those used with wined3d_cs_init_object() and
wined3d_cs_destroy_object().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-02-11 18:31:23 +01:00
Henri Verbeet
82a9e80063
wined3d: Add some barriers between resource usage on different bind points.
...
A typical case would be between using a texture as render target and using it
as a shader resource.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-01-19 21:44:17 +01:00
Henri Verbeet
6f55c8d1c5
wined3d: Use an sRGB fallback format for sRGB formats in wined3d_swapchain_vk_select_vk_format().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=50121
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-12-09 16:29:28 +01:00
Henri Verbeet
a7c320d184
wined3d: Use command buffer IDs for synchronisation in wined3d_buffer_gl_sync_apple().
...
Analogous to the Vulkan adapter. This is slightly awkward in OpenGL
because it doesn't have explicit command buffers like Vulkan, but
calling wined3d_context_gl_submit_command_fence() on swapchain present
works well enough in practice. The main advantage of this approach is that it
avoids using a separate fence for each usage of each bo.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-30 21:36:12 +01:00
Zhiyi Zhang
b911e56045
wined3d: Restore display modes for all outputs when doing mode restoration.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-11-03 21:47:27 +01:00
Zhiyi Zhang
c9e2deac39
wined3d: Store a struct wined3d pointer in struct wined3d_swapchain_state.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-29 22:25:29 +01:00
Zhiyi Zhang
62fa286edf
wined3d: Clean up swapchain state on wined3d_swapchain_init() failure paths.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-12 18:43:52 +02:00
Zhiyi Zhang
9288f31015
dxgi: Update swapchain containing output after Alt+Enter was used to exit fullscreen.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Zhiyi Zhang
e62b6fa12d
dxgi: Support Alt+Enter for d3d12 swapchains.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-09 16:21:33 +02:00
Zhiyi Zhang
0e58bcea7f
dxgi: Retrieve d3d12 swapchain fullscreen state from wined3d.
...
Once Alt+Enter handling is implemented, the fullscreen state may change
without dxgi necessarily being aware of it.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-10-05 20:50:57 +02:00
Gabriel Ivăncescu
0f024390ca
wined3d: Restore the window visibility and z-order upon exiting fullscreen, if requested.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 21:18:14 +02:00
Gabriel Ivăncescu
e041ff1f91
wined3d: Don't show the window if no window changes were requested.
...
Based on a patch by Rémi Bernon.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 21:18:08 +02:00
Gabriel Ivăncescu
7c0e2a0ca6
wined3d: Don't change the swapchain window z-order if no window changes were requested.
...
Based on a patch by Rémi Bernon.
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-07 21:18:05 +02:00
Paul Gofman
cfeefc6b94
wined3d: Set user memory separately for texture sub resources.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=43232
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-17 18:35:07 +02:00
Henri Verbeet
26e961b39a
wined3d: Reference the back buffer in wined3d_swapchain_vk_blit().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-05 16:54:35 +02:00
Henri Verbeet
17a1391fb6
wined3d: Create WINED3D_NO3D swapchain surfaces without GPU access.
...
The main issue this addresses is that WINED3D_RESOURCE_ACCESS_GPU implies that
WINED3D_LOCATION_TEXTURE_RGB makes sense as a location for the texture.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-06-02 11:14:45 +02:00
Henri Verbeet
9aeef376e5
wined3d: Implement swapchains for the Vulkan adapter.
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:31 +02:00
Henri Verbeet
a8141ef080
wined3d: Move swapchain buffer discarding to wined3d_cs_exec_present().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-29 20:05:30 +02:00
Henri Verbeet
c1f09c2461
wined3d: Move the swapchain cursor texture blit to wined3d_cs_exec_present().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet
4bae47cf17
wined3d: Move the swapchain logo texture blit to wined3d_cs_exec_present().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-27 00:14:14 +02:00
Henri Verbeet
b65ca13305
wined3d: Move the swapchain fps counter to wined3d_cs_exec_present().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-21 22:29:40 +02:00
Zhiyi Zhang
c84b2f97c1
wined3d: Remove no longer needed output parameter in wined3d_swapchain_state_resize_target().
...
Current output is stored as part of the swapchain state now.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 19:35:07 +02:00
Zhiyi Zhang
6089130da4
wined3d: Remove no longer needed output parameter in wined3d_swapchain_state_set_fullscreen().
...
struct wined3d_swapchain_desc has already specified a output parameter now.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 19:34:57 +02:00
Zhiyi Zhang
b6495fa31d
wined3d: Restore display mode for the previous output before changing to another output.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 19:34:54 +02:00
Zhiyi Zhang
7962c3194e
wined3d: Move device window to the correct output when handling WM_ACTIVATEAPP with full screen swapchains.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-18 19:34:51 +02:00
Zhiyi Zhang
f6d2e03750
wined3d: Get output from swapchain state.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:07:32 +02:00
Zhiyi Zhang
d3e088cc00
wined3d: Specify a wined3d output for swapchain creation.
...
As tests showed, DirectDraw, Direct3D 8 and 9 always use the adapter
specified in the device creation parameters regardless of the device
window position when creating a swapchain. Whereas DXGI uses the device
window position to determine which DXGI output to use.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-13 22:07:32 +02:00
Zhiyi Zhang
e847b08229
wined3d: Move device window to the correct output when changing swapchain state to full screen.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-08 20:52:14 +02:00
Zhiyi Zhang
094c344f27
wined3d: Release wined3d mutex if wined3d_swapchain_state_init() failed in wined3d_swapchain_init().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-08 20:52:14 +02:00
Zhiyi Zhang
7ee8674ed2
wined3d: Move device window to the correct output in wined3d_swapchain_state_resize_target().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-05-05 20:53:03 +02:00
Zhiyi Zhang
f91dd56ccd
wined3d: Do not clip the cursor after changing display modes.
...
DirectDraw should clip the cursor to the primary monitor only when the
cooperative level is DDSCL_EXCLUSIVE. For Direct3D 8, 9 and DXGI,
changing display modes shouldn't clip the cursor as tests showed.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-09 21:04:04 +02:00
Matteo Bruni
e11ae91b9c
wined3d: Store the framebuffer inline in struct wined3d_state.
...
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-26 18:34:50 +01:00
Zhiyi Zhang
2e7db80bad
wined3d: Refactor wined3d_get_adapter_raster_status() to wined3d_output_get_raster_status().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Zhiyi Zhang
c51e97bc0d
wined3d: Refactor wined3d_find_closest_matching_adapter_mode() to wined3d_output_find_closest_matching_mode().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:54:09 +01:00
Zhiyi Zhang
aa177f6afc
wined3d: Refactor wined3d_get_adapter_display_mode() to wined3d_output_get_display_mode().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:54:06 +01:00
Zhiyi Zhang
7161e01ad8
wined3d: Refactor wined3d_set_adapter_display_mode() to wined3d_output_set_display_mode().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:54:02 +01:00
Zhiyi Zhang
3635e09dd5
wined3d: Pass a struct wined3d_output pointer to wined3d_swapchain_state_set_display_mode().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:53:59 +01:00
Zhiyi Zhang
be5be58769
wined3d: Pass a struct wined3d_output pointer to wined3d_swapchain_state_resize_target().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-06 17:53:57 +01:00
Zhiyi Zhang
ead3d068f9
wined3d: Introduce wined3d_swapchain_get_output().
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:49:47 +01:00