Commit Graph

114 Commits

Author SHA1 Message Date
Henri Verbeet 6f674ef6f1 dxgi: Implement d3d11_swapchain_GetLastPresentCount().
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-01 22:34:31 +02:00
Henri Verbeet 93077d4b4f dxgi: Pass an IWineDXGIFactory pointer to dxgi_get_output_from_window().
Since the factory and adapter interfaces may be wrapped, calling
IDXGIAdapter_EnumOutputs() on a wrapped adapter may in turn return a wrapped
output interface. Things would go poorly from there, so make sure we have a
unwrapped interface here. Alternatively, we could have allowed output
interfaces to be wrapped, but tests show that e.g.
IDXGISwapChain_SetFullscreenState() fails when passed a wrapped output
interface.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +02:00
Henri Verbeet 55f6cda90e dxgi: Store an IWineDXGIFactory pointer in struct d3d11_swapchain.
Like we already do in struct d3d12_swapchain.

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-05 21:52:22 +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
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 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 ca9b5f6748 wined3d: Introduce wined3d_adapter_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-03 20:01:25 +01:00
Zhiyi Zhang 2f9037c75d wined3d: Introduce wined3d_adapter_get_output_count().
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-03 20:01:21 +01: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
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
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
Józef Kucia 11dfed9f9e dxgi: Implement dxgi_output_FindClosestMatchingMode1().
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:38 +01:00
Henri Verbeet 8ba075a059 dxgi: Introduce the IWineDXGISwapChainFactory interface.
The basic idea is that a project like vkd3d could provide its own
implementation of the IWineDXGISwapChainFactory interface, and so wouldn't
need specific handling in dxgi_factory_CreateSwapChainForHwnd().

Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-12-04 16:13:41 +01:00
Henri Verbeet 543605ca9d wined3d: Pass correct bind flags to swapchain creation functions.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-10-31 16:17:36 +01:00
Józef Kucia 04887860ca dxgi: Merge dxgi_check_feature_level_support() into dxgi_adapter_CheckInterfaceSupport().
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>
2018-09-25 21:45:04 +02:00
Józef Kucia 23ad7f6a8b dxgi: Get rid of set_feature_level() from dxgi_device_layer.
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>
2018-09-24 22:41:30 +02:00
Józef Kucia 7b2ff90404 wined3d: Pass feature levels to wined3d_device_create().
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>
2018-09-24 22:41:30 +02:00
Józef Kucia e36af9284f dxgi: Factor out dxgi_validate_swapchain_desc().
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>
2018-09-18 20:59:38 +02:00
Michael Stefaniuc 962b31c80b include: Add a generic available ARRAY_SIZE().
Signed-off-by: Michael Stefaniuc <mstefani@winehq.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-07-04 10:39:15 +02:00
Matteo Bruni 0171c581ec dxgi: Get rid of DXGI_FRAME_LATENCY_DEFAULT.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-06-05 16:07:18 +02:00
Józef Kucia c377644ca7 dxgi: Introduce ARRAY_SIZE() macro.
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>
2018-05-30 22:26:49 +02:00
Józef Kucia 7d99d74572 dxgi: Add IDXGISwapChain3 interface stub for D3D12.
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>
2018-05-28 22:08:23 +02:00
Józef Kucia 02c49ea3c0 dxgi: Factor out d3d11_swapchain_create() function.
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>
2018-05-28 22:08:23 +02:00
Józef Kucia eae33d5595 dxgi: Rename dxgi_swapchain to d3d11_swapchain.
We will have more than one implementation of IDXGISwapChain.

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>
2018-05-28 22:08:23 +02:00
Józef Kucia cd29ee158a dxgi: Implement IDXGIFactory5.
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>
2018-02-14 20:37:55 +01:00
Henri Verbeet c1cf16189f dxgi: Use the global memory allocation helpers.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2018-02-06 12:58:58 +01:00
Józef Kucia 5443a48909 dxgi: Implement IDXGIOutput4.
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>
2018-01-30 20:42:07 +01:00
Józef Kucia 7f593aa725 dxgi: Implement IDXGIAdapter3.
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>
2018-01-30 20:42:07 +01:00
Józef Kucia f46b3adc09 dxgi: Stop ignoring buffer usage.
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>
2018-01-25 16:27:13 +01:00
Józef Kucia 547db30201 dxguid: Add more Direct3D IIDs.
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>
2018-01-24 21:31:21 +01:00
Józef Kucia f2d8491ed9 dxgi: Update to IDXGIFactory4.
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>
2018-01-19 19:45:14 +01:00
Józef Kucia 9e961e1fae dxgi: Update to IDXGISwapChain1.
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>
2018-01-19 19:45:10 +01:00
Józef Kucia f99a548148 dxgi: Update to IDXGIFactory2.
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>
2018-01-19 19:45:07 +01:00
Francois Gouget 0ed0e6785d dxgi: Make wined3d_scanline_ordering_from_dxgi() static.
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2017-01-09 20:49:10 +01:00
Nikolay Sivov 4cffa0e263 dxgi: Added partial implementation of GetDC()/ReleaseDC().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-08 20:56:46 +09:00
Nikolay Sivov 16a2095556 dxgi: Use texture pointer instead of resource pointer for DXGI surface.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-09-01 21:21:35 +09:00
Józef Kucia 9381ad89fb dxgi: Introduce helper functions for converting wined3d_display_mode.
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:33 +09:00
Józef Kucia 537bd43ea8 dxgi: Implement IDXGISwapChain_ResizeTarget().
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:56 -05:00
Józef Kucia f586cc98a0 dxgi: Implement dxgi_swapchain_GetFullscreenState().
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 7402e8116c dxgi: Trace requested feature levels.
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-04-22 21:19:36 +09:00
Józef Kucia cbf0a1b59a dxgi: Implement dxgi_swapchain_GetParent().
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-04-15 01:14:24 +09:00
Józef Kucia 5cd719b867 dxgi: Do not store IDXGIFactory in IDXGIDevice.
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-04-15 01:14:24 +09:00
Józef Kucia eb039240e5 dxgi: Do not store IDXGIAdapters in IDXGIFactory.
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-04-15 01:14:24 +09:00
Józef Kucia 25ad11cef7 dxgi: Store IDXGIAdapter in IDXGIDevice.
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-04-15 01:14:24 +09:00
Józef Kucia b835a35881 dxgi: Do not store IDXGIOutputs in IDXGIAdapter.
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-04-15 01:14:23 +09:00
Józef Kucia 282afc4450 dxgi: Implement dxgi_swapchain_GetDevice().
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-04-12 22:22:58 +09:00
Nikolay Sivov b537beb60f dxgi: Update to IDXGISurface1.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2016-03-29 19:32:22 +09:00