Commit Graph

512 Commits

Author SHA1 Message Date
Zhiyi Zhang f92f363bbd dxgi/tests: Fix output ownership test failures on Win10 1909.
All DXGI output ownership calls on Win10 1909 return S_OK. It doesn't
grab VidPN output exclusive ownership for full screen 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-09-09 20:31:41 +02:00
Zhiyi Zhang e0b0ed3d00 dxgi/tests: Fix swapchain parameter test failures on Win10 1909.
Some of the invalid swapchain parameter tests crash on Win10 1909.
And DXGI_USAGE_DISCARD_ON_PRESENT is a DXGI internal flag. It doesn't
always get added if swap effect is DXGI_SWAP_EFFECT_DISCARD.

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-09-09 20:31:39 +02:00
Zhiyi Zhang 8776111bc4 dxgi/tests: Relax closest matching mode comparison.
On Windows, a DXGI output may support 1920x1440 and 2560x1080
display modes, both of which have the same pixel count. And when
finding a mode closest to 2559x1079 or 2561x1081, 1920x1440 is returned.

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-09-09 20:31:36 +02:00
Zebediah Figura 26da9b4297 dxgi: Add DXGI_FORMAT_NV12 and DXGI_FORMAT_YUY2.
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>
2020-09-03 18:19:24 +02:00
Biswapriyo Nath 249697c76d dxgi: Fix order of functions in IDXGIFactory2 interface.
Swap between RegisterStereoStatusWindow and RegisterOcclusionStatusWindow methods.

Signed-off-by: Biswapriyo Nath <nathbappai@gmail.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-08-20 21:20:22 +02:00
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
Rémi Bernon d806203850 dxgi: Implement IDXGIOutput5 and IDXGIOutput6 stubs.
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 122a28a313 wined3d: Use valid adapter LUIDs if they are available.
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-07-08 16:06:06 +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
Rémi Bernon f3bb21e80d dxgi/tests: Add more complete window style checks.
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:17:37 +02:00
Rémi Bernon abced34e67 dxgi/tests: Fix signed integral cast warning.
First cast to LONG, then to DWORD.

Reported by MinGW GCC 10 with -Woverflow.

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-06-03 21:47:52 +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
Philip Rebohle 6cd1139691 dxgi: Add stubs for IDXGIFactory7.
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-05-13 22:07:32 +02:00
Philip Rebohle d788ab4c29 dxgi: Implement IDXGIFactory6.
Required by the d3d12 game "Delores: A Thimbleweed Park Mini-Adventure".

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-05-13 22:07:32 +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 f904e9af1b dxgi/tests: Test IDXGISwapChain_GetContainingOutput() after Alt+Enter.
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
Gijs Vermeulen a637370de6 dxgi: Introduce helper to convert between dxgi and wined3d scanline ordering types.
Signed-off-by: Gijs Vermeulen <gijsvrm@gmail.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
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
Nikolay Sivov 0bfc64b0f1 dxgi: Translate DXGI_USAGE_UNORDERED_ACCESS to corresponding wined3d bind flag.
Signed-off-by: Nikolay Sivov <nsivov@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
Zhiyi Zhang c84c7a553d dxgi/tests: Add more get swapchain containing output tests.
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 3a93767da7 dxgi/tests: Add more default full screen swapchain target output tests.
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 9c7635c4dd dxgi/tests: Test IDXGISwapChain_ResizeTarget() with all outputs.
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 a304bfa97d dxgi/tests: Do not run test_multi_adapter() in parallel with other tests.
test_multi_adapter() tests detaching non-primary outputs, interferencing
other tests when non-primary outputs are enumerated.

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:02 +02:00
Zhiyi Zhang 58486350eb dxgi/tests: Fix a possible test failure on D3D12.
Calling d3d12_swapchain_Present() right after switching to full screen
mode may fail because the swapchain window may be in the animation of
becoming full screen and vkQueuePresentKHR() returns VK_ERROR_OUT_OF_DATE_KHR,
even after d3d12_swapchain_present() tried to recreate the 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-05 20:53:02 +02:00
Philip Rebohle 2c748dea40 dxgi/tests: Add test for colour space support APIs.
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 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 03b8fa7337 dxgi/tests: Add a test for frame latency events using d3d12.
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
Hans-Kristian Arntzen bbf2836a85 dxgi: Implement dxgi_factory_CheckFeatureSupport().
Some d3d12 games gate their use of sync interval 0 on support for
DXGI_FEATURE_PRESENT_ALLOW_TEARING.

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-10 19:09:43 +02:00
Zhiyi Zhang 5928da917d dxgi/tests: Add a test for IDXGIFactory5 feature support queries.
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-10 19:09:40 +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
Zhiyi Zhang f47f7c66cc dxgi/tests: Test cursor clipping.
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-08 21:01:18 +02:00
Zhiyi Zhang ab59ed1a4c dxgi/tests: Fix some test failures in test_find_closest_matching_mode().
DXGI_MODE_SCALING_CENTERED and DXGI_MODE_SCALING_STRETCHED modes may be
supported by drivers. When these flags are specified, IDXGIOutput_FindClosestMatchingMode()
will try to find a mode matching the scaling field first, which may not
be the same as the original mode. So make sure such a mode exists before
finding them.

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-08 21:01:18 +02:00
Zhiyi Zhang 03885ef4a1 dxgi/tests: Fix uninitialized variable warnings.
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-07 20:55:48 +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 b07e8b3edb wined3d: Remove device_name and device_name_size from struct wined3d_adapter_identifier.
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-25 20:33:56 +01:00
Zhiyi Zhang 47a069f964 dxgi/tests: Test detaching outputs.
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-24 20:42:59 +01:00
Zhiyi Zhang 5dae33dc3c wined3d: Refactor wined3d_get_output_desc() to wined3d_output_get_desc().
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-19 20:24:56 +01:00
Zhiyi Zhang e6368b9c10 wined3d: Pass a struct wined3d_adapter pointer to wined3d_get_device_caps().
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-16 21:30:58 +01:00
Zhiyi Zhang 591068cec0 wined3d: Refactor wined3d_get_adapter_identifier() to wined3d_adapter_get_identifier().
wined3d_adapter_get_identifier() uses a struct wined3d_adapter pointer
as parameter.

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-11 15:55:05 +01:00
Zhiyi Zhang a8072e0841 wined3d: Pass a struct wined3d_adapter pointer to wined3d_device_create().
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-11 15:55:00 +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