1
0
mirror of https://github.com/doitsujin/dxvk.git synced 2024-12-01 16:24:12 +01:00
Commit Graph

1284 Commits

Author SHA1 Message Date
Philip Rebohle
f5d73842b2
[d3d11] Do not flush on every call to GetData
There are several scenarios when flushing can have
a significant negative impact on performance:
1. When the query result is already available
2. When the game scatters GetData calls when rendering

Frostpunk hits both issues at the same time, which led to
over 120 queue submissions per frame. This patch reduces
that to 3 submissions per frame when the game is GPU-bound.
2018-06-19 14:34:15 +02:00
Philip Rebohle
5dfe0d077d
[d3d11] Fix render target layouts for linar tiling
There currently doesn't seem to be a game which actually renders
to images with linear tiling, but we should handle this anyway.
Only the GENERAL layout is allowed if the tiling is not OPTIMAL.
2018-06-19 11:28:54 +02:00
Philip Rebohle
15aabcb878
[dxvk] Optimize barriers around vkCmdCopyImage
We don't need to force layout transitions and emit double pipeline
barriers in case the GENERAL layout is being used for both images.
This is somewhat common for images used by compute shaders, and
this optimization ensures that only required barriers are emitted.
2018-06-18 22:30:00 +02:00
Philip Rebohle
f7587014c7
[dxbc] Fix compiler warning 2018-06-18 15:33:35 +02:00
Philip Rebohle
79dc7d8947
[dxvk] Optimized barrier batching around compute shader execution
Reduces the number of unnecessary pipeline barriers after compute shader
dispatches. Yields a small performance improvement in Final Fantasy XV.
2018-06-18 14:35:11 +02:00
Philip Rebohle
f519a0f2e4
[d3d11] Fake streamout support for Final Fantasy XV
The game uses this feature only for Hairworks. This hides an error
message and allows the game to start.
2018-06-16 18:52:20 +02:00
Philip Rebohle
162c465e95
[dxvk] Optimize buffer memory barrier batching
Instead of inserting a barrier after every single buffer copy, update
or clear operation, we batch them up and execute the barrier when the
first dirty buffer is used by a command. This significantly reduces
the number of pipeline barriers in some games, e.g. Final Fantasy XV.
2018-06-16 11:53:06 +02:00
Philip Rebohle
8f8340c2d1
[dxvk] Rename DxvkResourceAccessType to DxvkAccess
We'll be using this enum a lot more in the future.
2018-06-16 10:40:30 +02:00
Philip Rebohle
a148233b13
[d3d11] Use clearBuffer to initialize UAV counters 2018-06-16 10:22:38 +02:00
Philip Rebohle
7fa26f1c87
[d3d11] Implement render pass spilling for UAV rendering
Spilling the render pass should make shader storage buffer/image writes
visible due to how external subpass dependencies are defined. For UAV
rendering, we need to do this when changing the UAVs, even if the render
targets themselves do not change.
2018-06-15 20:49:24 +02:00
Philip Rebohle
7a22fa22a7
[dxgi] FindClosestMatchingMode: Handle Width/Height = 0 case
When an applicationn calls this method with the width or height
set to 0, we are allowed to pick any resolution, so we'll try to
find one close to the *current* display mode which usually returns
the current display mode itself.
2018-06-14 11:34:17 +02:00
Philip Rebohle
c93f2b980e
[d3d11] Report correct timer frequency for TIMESTAMP_DISJOINT queries 2018-06-13 14:30:44 +02:00
Philip Rebohle
48e0b6d684
Revert "[dxvk] Require VK_EXT_shader_viewport_index_layer"
This reverts commit 8d0af0a8fc.

Breaks Renderdoc, which currently does not support this extension.
2018-06-12 23:18:41 +02:00
Philip Rebohle
fc3ff78083
[dxgi] Map typeless formats to their UNORM variants by default
Works around some annoyances with RenderDoc.
2018-06-12 22:35:02 +02:00
Philip Rebohle
a607fe107f
[dxbc] Remove workarounds for the old Nvidia shader compiler 2018-06-12 22:13:53 +02:00
Philip Rebohle
8d0af0a8fc
[dxvk] Require VK_EXT_shader_viewport_index_layer 2018-06-12 21:55:41 +02:00
Philip Rebohle
e6c786b39f
[dxvk] Sort extension names in alphabetical order
This is purely cosmetic.
2018-06-12 17:01:35 +02:00
Philip Rebohle
f8650c1c9f
[dxvk] Require VK_KHR_maintenance2 and VK_EXT_vertex_attribute_divisor
Wine 3.10 added support for these extensions, so we should use them.
2018-06-11 21:09:52 +02:00
Philip Rebohle
f5d55726b3
[dxbc] Fix index returned by ImmAtomicConsume instruction
Since the atomic operations always return the old value, we have to
subtract one for the consume instruction. The append instruction is
unaffected. Fixes an issue with vegetation in Final Fantasy XV.
2018-06-11 20:17:29 +02:00
Philip Rebohle
dce2f844c0
[d3d11] Add ID3DUserDefinedAnnotation stub
We can implement this properly in the future using VK_EXT_debug_utils.
2018-06-11 14:29:47 +02:00
Philip Rebohle
dcd6c2c0f3
[d3d11] Implement CheckCounterInfo and related stubs
DXVK does not support device-specific counters, which seem to
be useful only for GPU profiling during development, but we
should report this properly to the application.
2018-06-11 14:01:45 +02:00
Philip Rebohle
05f24c3c38
[d3d11] Reduce log spam about UAV rendering 2018-06-10 04:19:30 +02:00
Philip Rebohle
1e7a05c796
[d3d11] Remove GetData do-not-flush workaround for Fallout 4
Not needed anymore due to the implicit flush.
2018-06-08 13:13:42 +02:00
Philip Rebohle
d4cb5115e7
[d3d11] Flush implicitly when GetData returns S_FALSE
Keeps the GPU busy when spinning on a query and ensures that we're
flushing at some point. Replaces the Fallout 4 hang workaround.
2018-06-08 13:11:24 +02:00
Philip Rebohle
a2df1ea4c9
[d3d11] Added warning that UAV rendering might not work as expected
We still haven't implemented synchronization for UAV rendering properly.
2018-06-08 12:42:09 +02:00
Philip Rebohle
c716372941
[d3d11] Move GetData implementation to D3D11ImmediateContext
It is illegal to call this method on a deferred context, so we should
filter out those calls. This allows the implementation to make use of
features specific to the immediate context.
2018-06-08 12:29:24 +02:00
Philip Rebohle
e35cbf833c
[dxbc] Fixed issue with FtoD instruction picking an incorrect type 2018-06-07 16:02:59 +02:00
Philip Rebohle
68a7ad81e1
[d3d11] Enable 64-bit math feature
We still have DMovc to implement, but it doesn't look like this
instruction is required as of now.
2018-06-07 15:35:24 +02:00
Philip Rebohle
10170a89ab
[dxbc] Implemented 64-bit compare instructions 2018-06-07 15:21:30 +02:00
Philip Rebohle
a89eb15546
[dxbc] Implemented 64-bit Vector ALU instructions 2018-06-07 15:05:06 +02:00
Philip Rebohle
97af5ee6fe
[dxbc] Implement DtoF and FtoD instructions 2018-06-07 14:32:56 +02:00
Philip Rebohle
ff11fc2445
[spirv] Added OpFConvert instruction 2018-06-07 14:32:34 +02:00
Philip Rebohle
420b7218ae
Revert "[dxvk] Increase memory chunk size to 32 MiB"
This reverts commit 83ae39f727.

Does not show any considerable advantage over the 16 MiB chunk size
and reduces the effectiveness of the host-visible device-local memory
type on AMD cards.
2018-06-06 23:47:43 +02:00
Philip Rebohle
15b0327243
Merge branch 'master' of https://github.com/doitsujin/dxvk 2018-06-06 23:12:48 +02:00
Philip Rebohle
b8468fda43
[dxvk] Improve swap chain format fallback logic
When requesting an unsupported non-SRGB format, we shouldn't
fall back to an SRGB format since that will cause Gamma issues.
2018-06-06 23:10:38 +02:00
Philip Rebohle
79d3b203ef
[dxvk] Added format flag to mark SRGB color formats 2018-06-06 23:09:39 +02:00
Philip Rebohle
518c260ad6
[util] Add == and != operator to Flags 2018-06-06 23:09:23 +02:00
ZeroFault
b43060bec1 fix MSVC compile error with function pointer type declaration (#422) 2018-06-06 22:11:26 +02:00
Philip Rebohle
e8ac81fe8a
[dxvk] Removed support for depth bounds test
This feature is not used in D3D11, so we don't need backend support.
2018-06-06 13:11:09 +02:00
Philip Rebohle
8b4852be16
[dxvk] Make depth bias a dynamic state
Works around an issue with some games not setting the D3D11 depth
bias state correctly, which can result in an excessive number of
pipelines being compiled.
2018-06-06 12:45:45 +02:00
Philip Rebohle
6579b2ad99
Merge branch 'auto-flush-v2' 2018-06-05 18:46:46 +02:00
Philip Rebohle
83ae39f727
[dxvk] Increase memory chunk size to 32 MiB
Reduces the number of memory allocations considerably.
2018-06-05 18:45:11 +02:00
Philip Rebohle
1fdcbdfa40
[vr] Add missing license file 2018-06-05 11:39:46 +02:00
Philip Rebohle
39a7169e1a
[vr] Silence non-virtual destructor warnings on GCC 2018-06-05 01:03:59 +02:00
Philip Rebohle
2c9c7e1a36
Merge branch 'openvr-v2' 2018-06-05 00:16:37 +02:00
Philip Rebohle
4a0c81276f
[d3d11] Implement new auto-flush heuristic 2018-06-04 23:31:49 +02:00
Philip Rebohle
cfe99368fb
[dxvk] Make number of queued submissions available to DXVK 2018-06-04 23:24:42 +02:00
ZeroFault
d44cc7630b Allow FarCry 5 to use D3D11_MAP_FLAG_DO_NOT_WAIT (#416) 2018-06-03 22:33:08 +02:00
Philip Rebohle
217399926d
Revert "[dxbc] Bound-check dynamically indexed constant buffer reads"
This reverts commit 621aed5fdb.

Breaks Dishonored 2. Apparently, out-of-bounds access to constant buffers
is allowed as long as it doesn't exceed the range of bound constants.
2018-06-02 18:09:59 +02:00
Philip Rebohle
34477933ef
[dxvk] Fixed uninitialized value in meta-resolve 2018-06-02 12:20:46 +02:00