Joshua Ashton
38f945bf0b
[util] Add platform-specific clock implementation
...
MinGW calls to GetSystemTimeAsFileTime via gettimeofday for std::chrono::high_resolution_clock::now,
This is horribly slow and inaccurate.
There are also issues if MinGW is not built with libstdc++ at the same time that can cause the precision to be bad enough to cause massive hangs.
This effectively works around that as well.
Relevant: ValveSoftware/Proton#3198
2019-11-26 01:52:58 +01:00
Philip Rebohle
25a1e0d355
[d3d11] Actually fix subresources discarded by DiscardView1
2019-11-24 00:34:15 +01:00
Philip Rebohle
53fca5143f
[d3d11] Ignore D3D11_COPY_DISCARD
...
Various truck simulations are broken and set this on every
CopySubresourceRegion call, which, if we were to implement
DiscardBuffer for non-mappable resources again, would break
them. This flag seemingly has no effect on native D3D11.
2019-11-24 00:08:06 +01:00
Philip Rebohle
a7c21a617c
[d3d11] Overhaul DiscardResource and DiscardView implementations
...
For host-visible resources, these behave like MAP_DISCARD.
Euro Truck Simulator 2 and friends relies on this (see #1250 ).
2019-11-23 23:57:07 +01:00
Philip Rebohle
1211bb5e5f
[dxvk] Sort buffer slices before returning them to the buffer
...
Buffer slices often get shuffled over time due to timing and thread
synchronization, which makes it less and less likely for the dynamic
uniform buffer binding optimization to be effective. Sorting the
slices beforehand addresses the issue and may help CPU performance.
2019-11-23 00:42:54 +01:00
Philip Rebohle
596001c37e
[dxvk] Enable shader-based depth-stencil copies for AMDVLK
...
Turns out to be slightly faster in practice.
2019-11-22 02:12:02 +01:00
Philip Rebohle
9e965546fc
[meta] Release 1.4.5
2019-11-19 23:36:01 +01:00
Philip Rebohle
6b3d60ab25
[dxvk] Enable asynchronous presentation on all hardware
...
...and remove the dxvk.asyncPresent option.
2019-11-19 23:34:24 +01:00
Philip Rebohle
ceddbaf7c4
[dxvk] Fix synchronization around vkDeviceWaitIdle
...
From the spec:
"Host access to all VkQueue objects created
from device must be externally synchronized"
We were not doing that, which could cause hangs and
all sorts of issues when recreating the swap chain
on Nvidia GPUs.
2019-11-19 23:34:14 +01:00
Philip Rebohle
4fff2343c1
[dxvk] Fix handling of undefined shader inputs
...
If the previous stage or the input layout does not define an input,
D3D11 will read zeroes wheras the result is undefined in Vulkan.
Fixes performance degradation and rendering issue in Final Fantasy XV
with the "Geomapping" (terrain tessellation) option enabled.
2019-11-19 15:34:29 +01:00
Philip Rebohle
a1f55330ee
[dxvk] Implement pass to eliminate undefined shader input variables
2019-11-19 15:26:32 +01:00
Philip Rebohle
5a2fd7c71b
[spirv] Add method to retrieve literal string from instruction
2019-11-19 12:49:07 +01:00
Philip Rebohle
8252d1ccd5
[spirv] Add method to erase data from code buffer
2019-11-19 12:17:11 +01:00
Philip Rebohle
9f88249b91
[spirv] Add method to allocate new ID from code buffer.
2019-11-19 12:12:05 +01:00
Philip Rebohle
014798161c
[dxvk] Avoid some unnecessary barriers around render target clears
2019-11-18 19:36:19 +01:00
Philip Rebohle
c7718e5952
[d3d11] Zero-initialize UAV counters
...
Fixes a hang in Dirt Rally on RADV.
2019-11-18 18:40:39 +01:00
Philip Rebohle
cee7db1c57
[dxvk] Always align texel buffers to at least 16 bytes
...
Since we don't know the view format in advance, and some
drivers require single-texel alignment.
2019-11-18 13:45:35 +01:00
Philip Rebohle
73a5b33375
[d3d11] Also fix reset counter memory order for deferred context queries
2019-11-15 19:48:41 +01:00
Philip Rebohle
e787077554
[util] Remove traces of the allowMapFlagNoWait option
2019-11-15 19:45:40 +01:00
Philip Rebohle
c24dad75dc
[d3d11] Remove allowMapFlagNoWait option
2019-11-15 11:09:11 +01:00
Philip Rebohle
dbc14fe65c
[d3d11] Fix memory order for query reset counter
...
Probably doesn't change anything, but let's fix it anyway.
2019-11-14 23:43:58 +01:00
Philip Rebohle
a6483e02fe
[d3d11] Submit stalling event queries before flushing
...
Otherwise, instead of preventing syncs, this would actually
have the opposite effect.
2019-11-14 22:57:30 +01:00
Philip Rebohle
3457e312b0
[dxvk] Always align index buffer slices to 256 Bytes
...
To be on the safe side.
2019-11-14 14:32:01 +01:00
Philip Rebohle
420d95e396
[dxvk] Store shader capability information in separate set of flags
2019-11-12 18:05:03 +01:00
Philip Rebohle
1ca235d186
[util] Disable strict DC mode for MGSV again
...
Not necessary since the resubmitted contexts don't contain mapped buffers.
2019-11-12 00:59:33 +01:00
Philip Rebohle
4f7e7979e3
[util] Add app profile for Metal Gear Solid 5
2019-11-11 23:31:14 +01:00
Philip Rebohle
cc18730967
[dxvk] Enable option to disable OpenVR integration
2019-11-11 23:30:35 +01:00
Philip Rebohle
9f66351b82
[dxvk] Move extension provider list to DxvkInstance
2019-11-11 23:30:07 +01:00
Philip Rebohle
6948d18f5f
[dxvk] Always align vertex buffer slices to 256 bytes
...
Works around an unknown geometry rendering isssue in Warhammer Chaosbane.
Should probably be investigated at some point.
2019-11-10 22:37:11 +01:00
Philip Rebohle
31baf3529a
[d3d11] Fix uninitialized DSV flags
...
Fixes #1242 .
2019-11-10 15:02:21 +01:00
Philip Rebohle
4b199ef60d
[dxvk] Remove option to disable transfer queue
2019-11-08 11:29:22 +01:00
Philip Rebohle
a74449c367
[dxvk] Remove ability to query instance from adapter
...
Adapters don't hold a reference to the instance.
2019-11-08 11:28:08 +01:00
Philip Rebohle
77574d9970
[d3d11] Don't query DXVK instance from adapter
2019-11-08 11:25:58 +01:00
Philip Rebohle
b2317cad4d
[dxvk] Pass DXVK instance to DXVK device directly, not through the adapter
2019-11-08 11:17:02 +01:00
Philip Rebohle
212f5ba1f3
[dxgi] Query DXVK instance from DXGI factory, not the adapter
2019-11-08 11:06:15 +01:00
Philip Rebohle
ed8af3ccc4
[dxvk] Document wonky DxvkAdapter ref count behaviour
2019-11-07 21:08:20 +01:00
Philip Rebohle
a0dba6bbf9
[d3d11] Hold reference to DxvkInstance
...
Hack to keep the instance alive which owns the adapters. Should
fix #1240 for now, but we should fix this properly later on.
2019-11-07 20:21:27 +01:00
Philip Rebohle
b18c50d5ab
[dxvk] Use static variables for extension provider instances
...
Also, remove redundant interface documentation.
2019-11-07 01:35:10 +01:00
Joshua Ashton
dbf2407fd3
[dxvk] Implement extension provider system
...
This change introduces a new system for providing extra instance/device extensions.
This consolidates platform-specific and vr-related to its' own thing for potential future cross-platform/native Linux work.
2019-11-07 01:24:52 +01:00
Joshua Ashton
27898ebbfc
[build] Simplify and correct errors in options handling
...
Fix some typos...
D3D10 is dependent on D3D11 therefore DXGI is always dependent on D3D11
2019-11-07 01:24:52 +01:00
Joshua Ashton
4ad99feb73
[build] Demote no frontends/tests to a warning
2019-11-07 01:24:52 +01:00
Philip Rebohle
1d961b7dc3
[d3d11] 'a' is not a very good name for a variable
2019-11-04 13:46:18 +01:00
Philip Rebohle
77a0cb2b19
[d3d11] Don't synchronize with CS thread on present
...
Instead, submit from the CS thread in order to prevent out-of-order
submissions. Improves minimum FPS in Final Fantasy XIV by 5-10%.
2019-11-02 17:53:17 +01:00
Philip Rebohle
e6c3f0479d
[dxvk] Let device know that async presentation is enabled
2019-11-02 17:53:17 +01:00
Philip Rebohle
d96c22be05
[d3d11] Do not synchronize with CS thread in GetData
...
Instead, use a counter to determine whether there are any
pending operation for the query on the CS thread.
2019-11-02 17:53:17 +01:00
Philip Rebohle
0924bb469c
[d3d11] Move query state tracking to immediate context implementation
2019-11-02 17:53:17 +01:00
Philip Rebohle
be5dc234c1
[d3d11] Move common Begin/End implementation to immediate context
2019-11-02 13:48:03 +01:00
Philip Rebohle
63dbca82e7
[d3d11] Track used queries in deferred contexts and command lists
2019-11-02 13:48:03 +01:00
Philip Rebohle
0671007437
[d3d11] Only execute Begin for scoped queries
2019-11-02 13:48:03 +01:00
Philip Rebohle
1459f0e852
[util] Fix != and == operator for private/public COM pointers
2019-11-02 13:48:00 +01:00