Rémi Bernon
5079d31e3a
dxgi: Implement IDXGISwapChain4 stub.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-07-17 23:16:51 +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
b80ec595e9
dxgi: Remove dxgi_swapchain_set_fullscreen_state().
...
dxgi_swapchain_set_fullscreen_state() is a mere wrapper of
wined3d_swapchain_state_set_fullscreen() 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:00 +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
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
5886f4dee5
dxgi: Search all adapters for the containing output of a swapchain.
...
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-11 21:24:58 +02:00
Philip Rebohle
5a1283a3e2
dxgi: Improve the d3d12_swapchain_SetColorSpace1() stub.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Philip Rebohle
d9c69cbc48
dxgi: Improve the d3d12_swapchain_CheckColorSpaceSupport() stub.
...
Monster Hunter World needs this function to succeed. This
behaves correctly under the assumption that the system has
no HDR support, and only reports standard sRGB as supported.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Philip Rebohle
85710526c2
dxgi: Implement d3d12_swapchain_GetMaximumFrameLatency().
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Philip Rebohle
440320ce39
dxgi: Implement d3d12_swapchain_SetMaximumFrameLatency().
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Philip Rebohle
dd3e9f304e
dxgi: Implement d3d12_swapchain_GetFrameLatencyWaitableObject().
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Philip Rebohle
154ce70b5c
dxgi: Signal the frame latency event on present.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Philip Rebohle
86c1ca8760
dxgi: Create frame latency events for d3d12 swapchains if requested.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-17 19:58:11 +02:00
Alexandre Julliard
0e91ced126
dxgi: Use standard dlopen() instead of the libwine wrappers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-04-06 21:21:41 +02: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
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
878211c36f
wined3d: Pass a struct wined3d_output pointer to wined3d_swapchain_state_set_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-03-05 19:49:44 +01:00
Conor McCarthy
58b482c9f4
dxgi: Implement IDXGISwapChain3::ResizeBuffers1().
...
Used by Hitman 2.
Multiple nodes and command queues are not supported.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 20:01:40 +01:00
Conor McCarthy
fabd07d520
dxgi: Add support for DXGI_SCALING_NONE.
...
In fullscreen mode, Shadow of the Tomb Raider uses an unscaled swapchain
that is oversized by 1x1 pixel. The pixel-wide lines on the right and
bottom should be clipped to fit the display. This eliminates the two
lines of uninitialized data.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:55:36 +02:00
Conor McCarthy
66548659d0
dxgi: Do not warn about ignoring a null refresh rate.
...
Both values will be zero if fullscreen_desc was NULL.
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-21 19:55:30 +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
712d3ca1e4
dxgi: Implement d3d12_swapchain_GetFullscreenState().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:45 +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
Józef Kucia
601b8d9fae
dxgi: Obey image count limits for Vulkan swapchains.
...
Mesa drivers require at least 3 images (see Mesa commit
4689e98fe884d9412b72fd6293b6d6a69e3ef68e).
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-07-31 09:38:18 +02:00
Zhiyi Zhang
e66f8e8c2d
dxgi: Fix possible null output from d3d11_swapchain_GetFullscreenState.
...
When swapchain is created in windowed mode, and then enter fullscreen
via Alt+Enter. Calling d3d11_swapchain_GetFullscreenState will return
a null output because swapchain->target wasn't initialized.
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-07-31 08:25:18 +02:00
Zhiyi Zhang
8113aca762
dxgi: Return DXGI_STATUS_OCCLUDED for minimised windows in d3d11_swapchain_present().
...
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-25 08:28:02 +02:00
Józef Kucia
dd202c1175
dxgi: Forbid creating D3D12 swapchains on desktop window.
...
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-06-24 13:01:58 +02:00
Andrew Eikum
45166d3313
dxgi: Return DXGI_ERROR_NOT_CURRENTLY_AVAILABLE if setting the fullscreen state failed.
...
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:29 +02:00
Zhiyi Zhang
2b2ea820a4
dxgi: Retrieve swapchains' 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>
2019-06-19 20:41:26 +02:00
Józef Kucia
086f263a9e
dxgi: Acquire Vulkan image just before present when we have user images.
...
The current DXGI back buffer index is independent of the current Vulkan
image index when we have user images. We can use this fact to delay
calling vkAcquireNextImageKHR().
This increases GPU utilization from 84% to 100% in the main menu of
Metro Exouds on Nvidia.
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-05-06 13:19:33 -05:00
Józef Kucia
711e68c9b8
dxgi: Add some asserts for Vulkan swapchains.
...
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-05-06 13:19:33 -05:00
Józef Kucia
3084ea8269
dxgi: Make Vulkan swapchain image count independent of DXGI buffer count.
...
Vulkan can create more swapchain images than requested.
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-05-06 13:19:33 -05:00
Józef Kucia
2002585000
dxgi: Factor out d3d12_swapchain_record_swapchain_blit().
...
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-05-06 13:19:33 -05:00
Andrey Gusev
29cd7dd072
dxgi: Add DECLSPEC_HOTPATCH to d3d11_swapchain_Present().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46953
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=46971
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-23 23:50:45 +02:00
Henri Verbeet
7d351e1168
dxgi: Slightly simplify d3d11_swapchain_init().
...
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-12 15:33:46 +02:00
Józef Kucia
6b05ef1f01
dxgi: Add support for building with Win32 Vulkan.
...
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-21 19:32:17 +01:00
Józef Kucia
0f86a47ece
dxgi: Do not forward d3d12_swapchain_Present() to d3d12_swapchain_Present1().
...
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-14 23:52:59 +01:00
Józef Kucia
e88084f650
dxgi: Do not forward d3d11_swapchain_Present() to d3d11_swapchain_Present1().
...
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-13 23:40:39 +01:00
Józef Kucia
e3ad02bd3e
dxgi: Factor out d3d11_swapchain_get_hwnd().
...
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-12 20:31:41 +01:00
Józef Kucia
f0f16e255e
dxgi: Implement d3d12_swapchain_GetContainingOutput().
...
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-11 19:15:05 +01:00
Józef Kucia
5a676c2ff5
dxgi: Improve d3d11_swapchain_GetContainingOutput() implementation.
...
Use MonitorFromWindow() to find the containing IDXGIOutput. This matches
our DXGI tests.
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-11 19:15:03 +01:00
Józef Kucia
9d023a5004
dxgi: Rename d3d12_swapchain_have_user_images() to d3d12_swapchain_has_user_images().
...
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-06 18:31:43 +01:00
Józef Kucia
42b22b0a77
dxgi: Reject DXGI_FORMAT_UNKNOWN for swapchains.
...
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-06 18:31:41 +01:00
Józef Kucia
715a52a61c
dxgi: Avoid recreating swapchain when we don't have user images.
...
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-06 18:31:27 +01:00
Józef Kucia
bfdc07e7d0
dxgi: Handle VK_ERROR_OUT_OF_DATE_KHR returned from vkAcquireNextImageKHR().
...
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-04 12:25:30 +01:00
Józef Kucia
09e7f1cba1
dxgi: Factor out d3d12_swapchain_recreate_vulkan_swapchain().
...
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-04 12:25:28 +01:00
Józef Kucia
17d5774152
dxgi: Introduce d3d12_swapchain_have_user_images().
...
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-04 12:25:25 +01:00