Commit Graph

451 Commits

Author SHA1 Message Date
Andrey Gusev 4fbdfc604b dxgi/tests: Fix a typo in ok() message.
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-12-02 22:02:56 +01:00
Conor McCarthy a7cd70a8c8 dxgi/tests: Add tests for IDXGISwapChain3::ResizeBuffers1().
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 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
Zhiyi Zhang c173a650e1 dxgi: Implement dxgi_output_TakeOwnership().
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-10-31 00:33:46 +01:00
Zhiyi Zhang 4f3d66e2c6 dxgi: Implement dxgi_output_ReleaseOwnership().
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-10-31 00:33:46 +01:00
Andrew Eikum eb2028fa90 dxgi: Sort reported output modes.
Sekiro: Shadows Die Twice depends on this for its mode switching.

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-10-28 19:19:33 +01:00
Zhiyi Zhang 644d00d540 winex11.drv: Implement X11DRV_D3DKMTCheckVidPnExclusiveOwnership.
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-10-22 23:04:27 +02: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 890428abdc dxgi/tests: Mark as todo the containing output test if a secondary monitor will cause failure.
Prevents test failure and crash until multi-monitor support is improved.

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:25 +02:00
Andrey Gusev eb0a01f750 dxgi: Add IDXGIDevice3 stub.
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-09-09 16:25:55 +02:00
Henri Verbeet d9835f4d0c dxgi/tests: Introduce create_window().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-14 14:30:59 +02:00
Michael Stefaniuc ce9909863b dxgi/tests: Remove useless casts to self.
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-12 09:32:06 +02:00
Conor McCarthy 5a593f43f3 dxgi/tests: Run test_set_fullscreen() on d3d12 as well.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:53 +02:00
Conor McCarthy e9c5dda48a dxgi/tests: Run test_resize_target() on d3d12 as well.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-08-01 08:04:51 +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 facd7cce6d dxgi/tests: Test output after using Alt+Enter to switch 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>
2019-07-31 08:25:12 +02:00
Zhiyi Zhang da6afd5cfd dxgi/tests: Add IDXGIOutput ownership tests.
Mostly to show that IDXGIOutput_TakeOwnership() and
IDXGIOutput_ReleaseOwnership() are based on VidPN ownership.

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:05 +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
Zhiyi Zhang 9b668792a9 dxgi/tests: Add more IDXGISwapChain_Present() 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>
2019-06-25 08:28:00 +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 628d60a159 wined3d: Validate that we got a valid window in wined3d_device_setup_fullscreen_window().
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:36 +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
Andrew Eikum 67110d37e9 dxgi/tests: Add tests for setting the fullscreen state of swapchains with destroyed windows.
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:26 +02:00
Zhiyi Zhang a600760fa1 dxgi: Implement Alt+Enter handling.
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
Henri Verbeet b94a6b1efd wined3d: Do not acquire/release the focus window in wined3d_swapchain_set_fullscreen().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-06-19 20:41:26 +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
Zhiyi Zhang 6c3c5b23c7 dxgi: Implement dxgi_factory_GetWindowAssociation().
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
Zhiyi Zhang 434b6fe019 dxgi/tests: Add window association 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>
2019-06-19 20:41:26 +02:00
Józef Kucia 937891cc65 dxgi: Improve tracing in dxgi_adapter_QueryVideoMemoryInfo().
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-10 19:51:00 +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
Józef Kucia c03184001e dxgi: Avoid magic constants.
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-04-30 20:08:33 +02: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
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
Francois Gouget 1684b01118 Disable multithreaded DirectX tests if WINETEST_NO_MT_D3D is set.
The nouveau graphics driver's support for multithreaded OpenGL is
buggy at least up to (18.2.8) so that any Wine test that performs
multithreaded OpenGL accesses freezes, crashes the Mesa stack and
eventually freezes the whole computer. Typically the first such test
is d2d1:d2d1.
The relevant tests have a --single option but WineTest neither knows
which tests accept this option, nor whether it is needed for the
current host.
The WINETEST_NO_MT_D3D environnement variable can be set on hosts
that need it (such as the cw2-gtx560 box) and is automatically
inherited by the relevant tests thus working around this issue.

Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-04-03 20:35:44 +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 cbb9f8539a dxgi/tests: Use void pointer for get_refcount() parameter.
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 642ef33df0 dxgi: Introduce IWineDXGIAdapter::get_adapter_info().
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:36 +01:00