Commit Graph

48 Commits

Author SHA1 Message Date
Blisto91 28c7c09bf5 [dxgi] Remove useMonitorFallback option
QueryDisplayConfig optimization is now in Proton 9 Wine
2024-03-21 17:23:38 +01:00
Philip Rebohle a427d22cde [dxvk] Add Vulkan instance flag for D3D9 apps 2023-10-31 16:05:58 +01:00
Paul Gofman 552d2f0a6d [dxgi] Add useMonitorFallback option
And enable it for CP2077.
It is supposed to be dropped once QueryDisplayConfig optimization
is in Proton Wine.
2023-10-10 12:01:51 +02:00
Joshua Ashton 1130512db5 [dxgi] Add global HDR interop interface for NVAPI/AGS 2023-08-18 22:57:06 +01:00
Etaash Mathamsetty 429555a540 [dxgi] Fix behavior of GetWindowAssociation 2023-08-09 12:18:24 +02:00
Philip Rebohle 14eb469005 [dxgi] Be more robust against monitor enumeration issues.
If there are monitors on the system that are not associated with
any adapter, enumerate all monitors for all adatpers. May solve
some issues if device filter options are used on multi-GPU systems.
2023-05-11 16:38:45 +02:00
Philip Rebohle 55e7cb1d54 [dxgi] Only log QueryInterface errors once 2023-03-01 13:25:56 +01:00
Philip Rebohle 61d72eebc1 [dxgi,d3d9] Use global singleton for DXVK instances
No reason to have multiple of these around, and instance creation
is fairly expensive.
2023-01-23 17:17:56 +01:00
Philip Rebohle 3128f4ea8e [dxgi] Implement IDXGIVkInteropFactory for DXGI factory 2023-01-22 20:04:39 +01:00
Joshua Ashton 9010f11adf [dxgi, d3d11] Remove support for legacy IWineDXGISwapChainFactory interface
vkd3d-proton 2.8 released last year with support for the new swapchain
interface.

No need to keep support for this legacy interface hanging around when
it complicates adding DxgiOptions support to the swapchain.
2023-01-16 13:45:03 +01:00
Joshua Ashton c10b53ed3e [dxgi] Add dxgi.enableHDR option 2023-01-06 17:27:38 +01:00
Joshua Ashton 3375cdf1fa [dxgi] Initialize DxgiOptions before DxgiMonitorInfo
Needed to we can access DxgiOptions inside of DxgiMonitorInfo for the dxgi.enableHDR property coming up in a future commit.
2023-01-06 17:27:38 +01:00
Philip Rebohle 76e6b2764b [dxgi] Change CreateSwapChain to take a surface factory 2022-11-07 14:14:05 +01:00
Paul Gofman e311f25287 [dxgi] Store device pointer in DxgiSwapChainDispatcher 2022-10-20 19:05:19 +02:00
Philip Rebohle d7ac21b6c7 [dxgi] Use new DXVK swap chain factory if available 2022-10-16 16:38:29 +02:00
Joshua Ashton a690210eae [dxgi] Implement swapchain dispatcher
Some overlays and hooks check if the vtable funcs reside in the dxgi.dll module.

Fixes: #1996
2021-03-30 17:48:10 +02:00
Philip Rebohle 13052d4949
[dxgi] Actually expose new DXGI interfaces
Derp.
2020-10-24 17:41:55 +02:00
Philip Rebohle 54a4e91dad
[dxgi] Implment IDXGIFactory7 2020-10-23 12:21:02 +02:00
Philip Rebohle a7de355646
[dxgi] Implement IDXGIFactory6 2020-10-23 12:15:48 +02:00
Philip Rebohle fc91fe1d34
[dxgi] Add fake implementation of DxgiFactory::EnumWarpAdapter
Apparently FIFA 19 needs this.
2019-12-09 23:27:56 +01:00
Philip Rebohle 1366fce0f8
[dxgi] Generate adapter LUIDs if Vulkan does not provide them
Needed because winevulkan does not provide adapter LUIDs.
Fixes various wine test failures, and will be required to
get D3D12 (vkd3d) to work on top of our DXGI implementation.
2019-10-02 01:07:18 +02:00
Philip Rebohle 3e8a6ec463
[dxgi] Implement IDXGIFactory5 2019-09-20 18:06:34 +02:00
Philip Rebohle 7d5b5f288c
[dxgi] Implement IDXGIVkMonitorInfo for DxgiFactory 2019-03-14 18:26:39 +01:00
Philip Rebohle 7ed91872b6
[dxgi] Use IWineDXGISwapChainFactory to create DXGI swap chains 2019-02-11 20:06:11 +01:00
Joshua Ashton 5ea8648cd9 [d3d11, d3d10, dxgi] Handle null ppvObject in QueryInterface. (#909)
When a null ppvObject is passed into a QueryInterface on any IUnknown, a E_POINTER should be returned as the result (and it should not crash.)

This matches native d3d11/d3d10/dxgi behaviour and the documentation found here https://docs.microsoft.com/en-us/windows/desktop/api/unknwn/nf-unknwn-iunknown-queryinterface(q_) for IUnknown.
2019-02-10 08:01:01 +01:00
Philip Rebohle 4e22e4bc3a [dxgi] Refactor swap chain creation
Cleans up constructor and moves a bunch of common code
to the new CreateDxvkSwapChainForHwnd function, which
can be called from both d3d11 and dxgi.

Also fixes potential issues with the current implementation
of the IWineDXGISwapChainFactory interface.
2018-12-21 15:53:29 +01:00
Philip Rebohle 171251bc83
[dxgi] Implement IDXGIFactory4
Do not support WARP adapters for the moment.
2018-11-15 17:08:36 +01:00
Philip Rebohle 9af842801c
[dxgi] Implement IDXGIFactory3 2018-11-15 17:08:35 +01:00
Philip Rebohle fde67b9773
[dxgi] IsCurrent is not actually a stub 2018-09-16 10:20:24 +02:00
Philip Rebohle 524ff9e233
[dxgi] Use global user config for DXGI options 2018-08-07 14:59:09 +02:00
Philip Rebohle 9cae049b53
[dxvk] Move adapter list to the DXVK instance 2018-06-26 12:33:26 +02:00
Philip Rebohle d1b705bf0d
[dxgi] Implemented IDXGISwapChain1 2018-05-23 01:06:34 +02:00
Philip Rebohle 56e7389495
[dxgi] Stubbed out IDXGIFactory2 2018-05-22 23:52:03 +02:00
Philip Rebohle 8d3e60c2f1
[dxgi] Cosmetic changes 2018-04-14 12:02:55 +02:00
Philip Rebohle 2973c18055 [dxgi/d3d11] Remove COM_QUERY_INTERFACE macro, reset pointers
May fix some crashes in applications that rely on the returned
pointer being set to nullptr before returning.
2018-04-02 12:52:02 +02:00
Philip Rebohle 77010d96e4 [dxgi/d3d11] Set returned pointers to nullptr before returning
May solve issues with applications which check whether the returned
pointer is null rather than checking a function's return value.
2018-04-02 12:04:20 +02:00
Philip Rebohle 6babc22ec0
[dxgi] Reset pointers before returning an error
Also fixes a refcount issue and minor code formatting issues.
2018-03-28 11:56:58 +02:00
notaz 5411689789 [dxgi] More argument handling improvements (#211)
Fixes 11 tests + a crash.
2018-03-27 01:58:33 +02:00
notaz f02b44f440 [dxgi] Fix some argument checks (#205)
Changed according to wine's tests.
2018-03-26 07:38:37 +02:00
Mikhail Paulyshka b17568deba [dxgi,d3d11] log unknown interfaces GUID (#154)
* [d3d11] log unknown interfaces GUID in QueryInterface()

* [dxgi] log unknown interfaces GUID in QueryInterface()
2018-03-12 12:05:43 +01:00
Philip Rebohle 6e981b91b6
[dxvk] Add adapter logging 2018-03-07 00:23:06 +01:00
Philip Rebohle 2a266eaad4 [general] Added 32-bit support 2017-12-12 12:50:52 +01:00
Philip Rebohle f5dd030074 [dxgi] Implemented IDXGIFactory1 and IDXGIAdapter1 extensions 2017-11-26 16:12:11 +01:00
Philip Rebohle f924931d2d [general] Removed TRACE calls for now 2017-11-26 14:01:41 +01:00
Philip Rebohle c095fab1c9 [dxvk] Fixed interface queries 2017-10-15 21:50:45 +02:00
Philip Rebohle 89a70b132d [dxgi] Added DxgiSwapChain stub 2017-10-11 16:22:13 +02:00
Philip Rebohle 5d99a37d69 [dxgi] Implemented DxgiDevice 2017-10-11 15:31:36 +02:00
Philip Rebohle bed6d23e7f [dxgi] Implemented some DXGI classes 2017-10-11 03:09:04 +02:00