Commit Graph

28 Commits

Author SHA1 Message Date
Philip Rebohle 8cae607db0
[d3d11] Add static method implementing D3D11CreateDeviceAndSwapChain
ReShade requires this as it hooks both D3D11CreateDevice and *AndSwapChain,
which means that we can't call D3D11CreateDevice without entering infinite
recursion. Fixes #1057.

Suggested-by: Riesi <riesi@opentrash.com>
2019-05-15 16:46:48 +02:00
Joshua Ashton d01110259c [d3d11, d3d10] Init returnptrs for CreateDevice funcs. 2019-02-27 23:17:08 +01:00
Philip Rebohle 746562de5a
[dxgi,d3d11] Remove IDXGIVkPresentDevice 2019-02-11 20:06:12 +01:00
Andrew Eikum 9ad24a2216 [d3d11] In D3D11CreateDevice, create DXGI factory with IDXGIFactory1 support (#878) 2019-01-22 10:57:05 +01:00
Philip Rebohle 033ea0c31b
[d3d11] Find Vulkan device if DXGI adapter was not created by DXVK
Tests the LUID, then the PCI device IDs, and finally falls back
to the first Vulkan device available on the system. This allows
DXVK's d3d11.dll to be used without its own dxgi.dll, as long
as presentation support is implemented in some way.

With the previous changes, based on zzhiyi/dxvk@0fc3a24d96

Co-authored-by: Zhiyi Zhang <zzhang@codeweavers.com>
2018-12-04 19:38:52 +01:00
Philip Rebohle 1cc0455c8a
[dxgi] Remove old DXGIDevice implementation and IDXGIVkDevice
Both have been moved to the D3D11 module and are no longer needed.
2018-12-04 19:38:52 +01:00
Philip Rebohle c5deedef2d
[d3d11] Move IDXGIDevice implementation to D3D11 module
Helps decouple the D3D11 module from the DXGI implementation. This
also allows us to clean up D3D11 device creation, which is much needed.

Based on zzhiyi/dxvk@fa441937f1

Co-authored-by: Zhiyi Zhang <zzhang@codeweavers.com>
2018-12-04 19:38:38 +01:00
Philip Rebohle e4b91057ac [d3d11] D3D11CreateDeviceAndSwapChain: Ignore swap chain if null
Fixes some issue with ReShade.
2018-12-02 13:43:55 +01:00
Philip Rebohle 7b9726fd93
[d3d11] D3D11Presenter -> D3D11PresentDevice 2018-10-23 15:10:01 +02:00
Philip Rebohle 0ba00b3f59
[dxvk] Add extended device feature structure
This allows the client API to query and enable extended
features in the future, should it become necessary, much
like the extende feature queries.
2018-07-31 16:58:25 +02:00
Philip Rebohle 3e111086b2
[d3d11] Implement D3D11CoreCreateDevice
Some applications need this function to be present and it's better to
fail for them with an error code rather than crash because the entry
point does not exist in our DLLs.
2018-05-07 14:06:52 +02:00
Philip Rebohle c2c8d8be8a
[d3d11] Minor formatting fix 2018-05-04 21:52:34 +02:00
Philip Rebohle 62b0e34a73
[d3d11] Implement IDXGIVkInteropDevice for D3D11Device 2018-04-20 00:19:03 +02:00
Philip Rebohle ae88f83b86
[d3d11] Introduce D3D11DeviceContainer
Refactored DxgiVkDevice, D3D11Device and D3D11Presenter
to behave more like aggregable objects, where the new
D3D11DeviceContainer class is the COM aggregate object.
Fixes the reference counting issue outlined in #210.
2018-03-28 21:24:52 +02:00
Philip Rebohle 8d3dcba8d5
[dxgi] Renamed private DXGI interfaces 2018-03-28 19:06:00 +02:00
Philip Rebohle 410cde3f17
[dxgi] Move device creation to DxgiAdapter
This is better than exporting new functions.
2018-03-28 18:58:53 +02:00
Philip Rebohle 52f6ba1756
[dxvk] Fixed D3D11CreateDeviceAndSwapChain bug
Some applications may want to create a swap chain
without specifying a device or context pointer.
2018-03-03 23:15:15 +01:00
Philip Rebohle 3ac25d5e2a
[d3d11] Updated D3D11CreateDevice
Since D3D11Device and D3D11DeviceContext share the same reference
counter, we can actually create a device if the device pointer is
missing. Fixes Homefront.
2018-01-18 01:18:22 +01:00
Philip Rebohle 2a266eaad4 [general] Added 32-bit support 2017-12-12 12:50:52 +01:00
Philip Rebohle d539c3e384 [d3d11] Allow the creation of fake D3D11 WARP and REF devices 2017-12-09 13:43:14 +01:00
Philip Rebohle 69b938118d [general] Fixed write conflicts in logger 2017-12-06 23:36:11 +01:00
Philip Rebohle 7ec8e727d2 [d3d11] Device creation now logs requested feature levels 2017-12-02 19:07:48 +01:00
Philip Rebohle ac2d16599c [d3d11] Implemented proper feature tests 2017-12-02 16:47:06 +01:00
Philip Rebohle a956c1b8ac [dxgi] Added DxgiResource for image and buffer creation 2017-11-29 15:16:07 +01:00
Philip Rebohle 0cdc13d785 [dxgi] Renamed private DXGI interfaces 2017-11-27 15:51:53 +01:00
Philip Rebohle f924931d2d [general] Removed TRACE calls for now 2017-11-26 14:01:41 +01:00
Philip Rebohle 024d69784d [d3d11] Implemented basic device creation 2017-10-11 15:32:24 +02:00
Philip Rebohle c7680dea2a [d3d11] Added D3D11 stubs 2017-10-11 09:51:48 +02:00