Philip Rebohle
5fe4c4f610
[dxvk] Use VkImageViewUsageCreateInfoKHR when creating image views
...
Must be used when view formats are used that do not support all
usage bits of the underlying image. Refs #504 .
2018-07-21 10:58:06 +02:00
Philip Rebohle
8ffe545b38
Revert "[dxvk] Bump maximum number of command buffers in flight to 16"
...
This reverts commit d744a3cd69403c3d3b292c65ba423f0f0f6e15ba.
Reportely has an unexpected negative impact on frame times in
The Witcher 3 and potentially other games on some setups.
2018-07-20 15:56:07 +02:00
Philip Rebohle
de920458d7
[dxvk] Make DxvkEvent lock-free
...
Reduces locking overhead and potential stuttering
issues when an app is spinning on the event.
2018-07-20 15:48:09 +02:00
Philip Rebohle
d744a3cd69
[dxvk] Bump maximum number of command buffers in flight to 16
2018-07-20 11:42:42 +02:00
Philip Rebohle
0fd8019a70
[dxvk] Add DxvkEvent::wait method
2018-07-20 11:39:24 +02:00
Philip Rebohle
336b3858c9
[dxvk] Relax VK_EXT_vertex_attribute_divisor requirement
...
Nvidia 396.45 still does not support this. Nvidia, please, we need it.
2018-07-19 23:10:12 +02:00
Philip Rebohle
19f74a89cd
[dxvk] Optimize buffer renaming
...
Small reduction in CPU overhead by using spinlocks instead of
a full mutex for the two buffer free lists.
2018-07-19 09:44:58 +02:00
Jacek Caban
6d16bb4c87
Don't use std::thread.
...
Wine needs to setup each thread that has an access to Windows APIs. It means that in winelib builds, we can't let standard C++ library create threads and need to use Wine for that instead. I wrote a thin wrapper around Windows thread functions so that the rest of code just has to use new dxvk::thread class instead of std::thread.
2018-07-19 08:55:34 +02:00
Philip Rebohle
0ee375ffb0
Revert "[dxvk] Disable image format list"
...
This reverts commit 04d7f2896a965ecf6a1fc84a4893aec84d838c87.
False alarm, although we should correct the format classes
at some point.
2018-07-11 23:36:00 +02:00
Philip Rebohle
65ffa4122d
[hud] Add option to show DXVK version
...
General idea based on PR #490 . Closes #488 .
2018-07-11 17:40:07 +02:00
Philip Rebohle
2fce0a7685
[build] Extract version number from git if available
...
Logs the version number and game executable name as well.
2018-07-11 17:39:00 +02:00
Philip Rebohle
cc4b53db43
[dxvk] Require VK_KHR_get_physical_device_properties2
...
We have to enable this extension in order to be able to use
VK_EXT_vertex_attribute_divisor without validation errors.
2018-07-11 15:51:43 +02:00
Philip Rebohle
22bb4391ba
[vr] Load OpenVR API DLL if necessary
...
Some games initialize the DXGI factory and D3D11 device even before
loading the OpenVR DLL, so we have to be even more invasive.
2018-07-11 15:31:35 +02:00
Philip Rebohle
67fe452580
[dxvk] Track lifetime of framebuffer attachments
...
We should mark images that are being used for rendering as
in-use by the GPU when binding the corresponding framebuffer.
2018-07-10 04:47:50 +02:00
Philip Rebohle
43cbe42ea8
[dxvk] Pick memory chunk size dynamically
...
Reduces the number of Vulkan memory allocations, and
can lead to lower CPU overhead in certain situations.
Improves Shadow Warrior 2 by ~2% on RADV.
2018-07-09 19:18:39 +02:00
Philip Rebohle
2caf346fbb
[dxvk] Add access flags to external subpass dependencies again
...
Apparently we need those to make sure that the initial layout
transition itself is valid. We don't need to add shader access
though, since we cannot access attachments inside shaders.
2018-07-09 11:23:28 +02:00
Philip Rebohle
b789187df5
[dxvk] Fixed external subpass dependencies
...
Fixes validation errors and some unnecessary cruft. We don't need
visibility operations in the external-to-renderpass dependency
because that part is handled by regular barriers, an execution
dependency is enough (but still required to handle write-after-read.
2018-07-09 10:08:12 +02:00
Philip Rebohle
4d1a70bd89
[dxvk] Fix deferred depth-stencil clears
...
If a game clears the depth and stencil aspects of a depth-stencil
buffer separately, we must not override the load op and clear value
of the previously set aspect. Fixes a rendering issue in Hitman
Absolution.
2018-07-06 15:23:59 +02:00
Philip Rebohle
974db9712b
[dxvk] Remove clear rect parameter from clearRenderTarget
...
With deferred clears and render target-based clears, this was
not properly supported anyway.
2018-07-06 15:01:37 +02:00
Philip Rebohle
04d7f2896a
[dxvk] Disable image format list
...
Causes rendering issues in Far Cry 4.
2018-07-05 22:49:30 +02:00
Philip Rebohle
9b78738d2c
[dxvk] Pass image format list to the driver
...
Allows drivers to enable DCC in some situations.
2018-07-03 12:44:01 +02:00
Philip Rebohle
c1334e7601
[dxvk] Require VK_KHR_image_format_list
...
All supported drivers support this extension, so we don't make it optional.
2018-07-03 12:43:32 +02:00
Philip Rebohle
3bb94f1afb
Merge branch 'vr-init'
2018-07-02 20:12:57 +02:00
Philip Rebohle
092331232b
[vr] Initialize and shut down OpenVR if necessary
2018-06-30 18:49:29 +02:00
Philip Rebohle
cf6e3c1fbf
[vr] Refactor compositor initialization
2018-06-30 16:51:20 +02:00
N00byKing
26d7059579
[dxvk] Remove unnecessary Parameter ( #465 )
2018-06-29 21:37:25 +02:00
Philip Rebohle
db2b6e1219
[dxvk] Optimize image layout transitions
...
This should reduce unnecessary execution dependencies when
transitioning image layouts before executing image copies.
2018-06-28 13:52:54 +02:00
Philip Rebohle
8c65203ac2
[dxvk] Fix potential layout transition issues with depth-stencil images
...
Some operations can operate on only one of the two aspects
of a depth-stencil image. This fixes two possible issues:
- Image memory barriers must be applied to all image aspects
- VK_IMAGE_LAYOUT_UNDEFINED is no longer used as a source layout
if the operation requiring the transition only uses one aspect
2018-06-28 12:44:57 +02:00
Philip Rebohle
04bc13929f
[hud] Added some missing documentation
2018-06-28 01:18:16 +02:00
Philip Rebohle
832b3a9dba
[hud] Render HUD directly to swap chain image
...
Saves a fullscreen render target, render pass, and a queue submission.
2018-06-28 01:00:07 +02:00
Philip Rebohle
0e6e985210
[vr] Maintain global extension sets
...
Preserves the per-instance and per-adapter extension sets across
multiple Vulkan instances. Works around initialization order issues
with Unity-based VR apps.
2018-06-26 15:56:13 +02:00
Philip Rebohle
eb39cf4b11
[dxvk] Lock queue around acquireNextImage
2018-06-26 15:33:43 +02:00
Philip Rebohle
9cae049b53
[dxvk] Move adapter list to the DXVK instance
2018-06-26 12:33:26 +02:00
Philip Rebohle
4f28d57352
[dxvk] Remove unused rasterizer discard state flag
2018-06-25 16:56:52 +02:00
ZeroFault
b62ccfe7a3
[dxvk] Implement dedicated allocation ( #448 )
...
Yields significant performance improvements on some Nvidia GPUs.
2018-06-24 10:55:42 +02:00
Philip Rebohle
5d1f00be34
[dxvk] Implement shader-based meta-resolve operation
...
This should work around a variety of potential driver issues
when games resolve typeless images with a different format.
2018-06-23 13:17:01 +02:00
Philip Rebohle
654c947368
[dxvk] Added separate flags for signed and unsigned integer formats
2018-06-23 13:06:42 +02:00
Philip Rebohle
c5f45d9153
[dxvk] Add shaders for new meta-resolve operation
2018-06-23 09:48:03 +02:00
Philip Rebohle
db7a7fa4bc
[dxvk] Use dynamic offsets for both graphics and compute pipelines
2018-06-22 00:33:47 +02:00
Philip Rebohle
4b5ec1be3e
[dxvk] Implement support for dynamic buffer binding offsets
2018-06-22 00:33:06 +02:00
Philip Rebohle
826b1245a1
[dxvk] Add context state flags for descriptor set and offset updates
2018-06-22 00:31:56 +02:00
Philip Rebohle
c3470f6cbf
[dxvk] Allocate descriptor sets with dynamic descriptor support
2018-06-22 00:31:11 +02:00
Philip Rebohle
aa3e718fcd
[dxvk] Add DxvkOptions struct for quick lookup of features/limits
2018-06-22 00:29:44 +02:00
Philip Rebohle
d35ff6ca13
[dxvk] Implement pipeline layout support for dynamic descriptors
2018-06-22 00:29:04 +02:00
Philip Rebohle
32cd85dc11
[dxvk] Discard slices from old physical buffers
...
Improves effectiveness of an optimization that allows
using dynamic buffer offsets for descriptor sets.
2018-06-22 00:27:52 +02:00
Philip Rebohle
79a1703aea
[util] Set thread names for DXVK's own threads
...
Makes it easier to identify the command stream thread and the
queue processing thread easier when using a wine build that
supports SetThreadDescription.
2018-06-21 15:12:04 +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
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
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