Philip Rebohle
86d4d31b7c
[dxgi] Ignore scaling and scanline order during fullscreen transitions
...
Games usually don't use these correctly anyway, so we might as well
ignore them, since DXVK's DXGI does not report scanline modes other
than UNSPECIFIED. Fixes #291 .
2018-12-06 16:38:45 +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
e4d3357e55
[dxgi] Query window size before creating presenter
...
Otherwise we may pass a size of zero to the presenter.
2018-11-16 15:03:09 +01:00
Philip Rebohle
c25483e856
[dxgi] Implement IDXGISwapChain3
...
- Stub IDXGISwapChain3::ResizeBuffers1
2018-11-15 18:02:27 +01:00
Philip Rebohle
23ac9b5277
[dxgi] Implement IDXGISwapChain2 stubs
...
Most of the additions are stubs for now, but we should be
able to implement most of the functionality at a later time.
None of the backends implement this yet, but this should be
relatively easy to do.
2018-11-15 17:08:35 +01:00
Philip Rebohle
1724d51079
[dxgi] Refactor presenter creation
...
This change is needed to support non-D3D11 presenters in our DXGI code.
2018-11-12 11:39:34 +01:00
Philip Rebohle
589229f4ca
[dxgi] Query device interface from the presenter
...
Removes the coupling between IDXGISwapChain and IDXGIDevice.
This is necessary because D3D12 devices don't support IDXGIDevice.
2018-10-24 15:54:56 +02:00
Philip Rebohle
7b9726fd93
[d3d11] D3D11Presenter -> D3D11PresentDevice
2018-10-23 15:10:01 +02:00
Philip Rebohle
b53f6661f8
[dxgi] Use new presenter for D3D11
2018-10-23 14:58:57 +02:00
Philip Rebohle
87f1cd2385
[dxgi] Fix undefined display mode format for display mode transitions
...
Fixes resolution change option in Dark Souls 3.
2018-10-06 08:01:48 +02:00
Philip Rebohle
2541aeb25c
[dxgi] Add option to override the sync interval
2018-09-09 19:14:30 +02:00
Philip Rebohle
d7b16dd90a
[dxgi] Add option to change the back buffer count
2018-09-09 19:12:07 +02:00
Philip Rebohle
b7d8be25f1
[dxgi] Use DXGI back buffer count for the Vulkan swap chain
2018-09-09 19:07:41 +02:00
Philip Rebohle
5f42950650
[dxgi] Don't use FIFO present mode if IMMEDIATE is not available
...
Might fix potential performance issues on Nvidia when VSYNC is disabled.
Based on RPCS3/rpcs3@25ec3789fe
2018-08-26 23:39:53 +02:00
Andrew Eikum
262797f9d5
[dxgi] SetFullscreenState succeeds if not changing state
...
This fixes an error dialog on exiting Unreal Engine 4 games.
2018-08-13 17:06:55 +02:00
Philip Rebohle
524ff9e233
[dxgi] Use global user config for DXGI options
2018-08-07 14:59:09 +02:00
Philip Rebohle
62e4c867ec
[dxgi] Relax IDXGISwapChain thread safety
...
Fixes a deadlock in Dragon Age: Inquisition.
2018-08-04 10:16:40 +02:00
Philip Rebohle
adcc7a4573
[dxgi] Synchronize presentation to enforce maximum frame latency
...
Some games may rely on the maximum number of frames in flight.
Might fix a related issue in Hard Reset (#503 ) and Okami HD (#283 ).
2018-07-20 11:40:37 +02:00
Philip Rebohle
9de3a619c2
[dxgi] Use back buffer size to determine fullscreen resolution
...
This is the correct behaviour on Windows and may fix some issues.
2018-07-12 16:00:33 +02:00
Philip Rebohle
e615fc19a9
[dxgi] Support SyncInterval values > 1
...
Required for Eve Online and the Unity Blacksmith demo.
2018-05-28 21:06:35 +02:00
Philip Rebohle
38c5e57025
[dxgi] Refactor Vulkan swap chain and surface creation
...
Creating the Vulkan surface at the latest possible moment fixes
an issue with Frostpunk, which renders to a D3D9 swap chain
before presenting to the GXGI swap chain.
2018-05-23 13:03:12 +02:00
Philip Rebohle
d1b705bf0d
[dxgi] Implemented IDXGISwapChain1
2018-05-23 01:06:34 +02:00
Philip Rebohle
5a61d81135
[dxgi] Stubbed out IDXGISwapChain1
2018-05-22 23:50:28 +02:00
Philip Rebohle
94b74667e9
[dxgi] Fix Fullscreen->Windowed transition (again)
...
We need to preserve the flags if the application changes them.
This is in line with what native DXGI does.
2018-05-04 21:55:38 +02:00
Philip Rebohle
6cbc133619
[dxgi] Use ShowWindow instead of redundant SetWindowPos call
2018-05-04 17:53:02 +02:00
Philip Rebohle
de803b3670
[dxgi] Report refresh rate as a multiple of 1000 Hz
...
More closely emulates what Windows dows.
2018-05-04 17:37:29 +02:00
Philip Rebohle
4c298d486d
[dxgi] Restore display mode even when the window got destroyed
2018-04-30 20:15:35 +02:00
Philip Rebohle
a32050374c
[dxgi] Implement display mode changes
...
Allows games to change the screen resolution in fullscreen
mode. This is currently in a rough shape and some games may
not work as expected when selecting fullscreen mode.
2018-04-29 23:03:27 +02:00
Philip Rebohle
a3c561f9dc
[dxgi] LeaveFullscreenMode: Correctly restore the window size
2018-04-29 17:26:00 +02:00
Philip Rebohle
adb0f5e16b
[dxgi] DxgiSwapchain: Check whether window is valid
...
Fixes a GPU hang when closing Dark Souls 3 as well as similar
undesired behaviour in other games that continue to use the
DXGI swap chain after the window has been destroyed.
2018-04-18 17:30:46 +02:00
Philip Rebohle
af19bba048
[dxgi] Remove support gamma-related ScaleAndOffsetSupported
...
Some games, including Heroes of the Storm (#287 ), do not set
the values correctly so it's better to ignore them altogether.
2018-04-15 20:12:41 +02:00
Philip Rebohle
8d3e60c2f1
[dxgi] Cosmetic changes
2018-04-14 12:02:55 +02:00
Philip Rebohle
ded6dec7eb
[dxgi] DxgiVkPresenter: use Microsoft-style API
2018-04-13 13:57:29 +02:00
Philip Rebohle
5d7c83855e
[dxgi] Use 1D texture to implement the gamma lookup table
...
This allows us to abuse hardware texture filters for linear
interpolation. Should fix an issue with the latest Nvidia
beta drivers.
2018-04-13 13:47:15 +02:00
Philip Rebohle
f5679211cd
[dxgi] Re-implement gamma control functions
2018-04-12 13:38:22 +02:00
Philip Rebohle
3c6eb91c63
[dxgi] Remove Output reference from DxgiSwapChain
2018-04-12 01:28:44 +02:00
Philip Rebohle
c88170966f
[dxgi] Remove gamma control methods from DxgiOutput
2018-04-12 01:15:40 +02:00
Philip Rebohle
015e67fc7c
[dxgi] Replaced ugly pointer cast by more reasonable code
2018-04-12 00:45:23 +02:00
Philip Rebohle
dd3f4c89ac
[dxgi] Implement gamma control methods for DxgiOutput
2018-04-10 22:07:25 +02:00
Philip Rebohle
f13011f487
[dxgi] Implement gamma ramp in presenter
...
Will be used to fake IDXGIOutput::SetGammaControl.
2018-04-10 20:44: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
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
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
Philip Rebohle
69dd05b269
[dxgi] Fix back buffer destruction
...
The back buffer needs to be deleted explicitly because on
the way it is created. Fixes reference counting issues in
applications which resize the back buffer at least once.
2018-03-18 20:39:14 +01: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
45a03b11be
[dxgi] Add stub implementation of DXGI_PRESENT_TEST
2018-02-18 23:49:00 +01:00
Philip Rebohle
17cdccd1ce
[dxgi] Use recursive locking and report fullscreen state changes early
...
Fixes lockups in fullscreen mode in a certain weeb game.
2018-02-14 13:11:59 +01:00