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

1299 Commits

Author SHA1 Message Date
Philip Rebohle
87b5161b2a
[d3d11] Reset implicit flush timer only when actually flushing
In some situations, calling Flush without any commands that
could be flushed would unnecessarily prevent the implicit
flush heuristic from kicking in properly.
2018-07-09 20:31:54 +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
2aa6b04fd9
[dxvk] Fix tzcnt return value when source value is 0 2018-07-09 13:32:43 +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
c8c6f24b63
[d3d11] Fix log spam when an application uses DiscardView
We don't support this method, but we should only issue the warning
once to prevent poor performance.
2018-07-08 15:53:30 +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
63af141383
[d3d11] Set proper view format list for typed UAVs
Typed UAVs are mutable, but we only need them to be compatible to
their typed format and the bit-compatible integer format used for
clears.
2018-07-03 13:31:22 +02:00
Philip Rebohle
cbf4772973
[d3d11] Pass image format family to the backend 2018-07-03 12:44:56 +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
9f00e14ca6
[dxgi] Add method to query the family of a given format 2018-07-03 12:42:17 +02:00
Philip Rebohle
4d267a57a7
[dxgi] Added format family list
Render target views and shader resource views can only be created
with a format that is within the same format family as the image
format. For UAVs, the restrictions are relaxed.
2018-07-03 12:41:10 +02:00
Philip Rebohle
3bb94f1afb
Merge branch 'vr-init' 2018-07-02 20:12:57 +02:00
Philip Rebohle
4052cad3ff
[dxgi] Fix 'auto' declaration in FindClosestMatchingMode
Hopefully fixes an incorrect GCC warning for some people.
2018-07-02 09:19:27 +02:00
Philip Rebohle
a196451400
[dxbc] Respect number of input/output components
Fixes issues with geometry shaders exceeding output component limits.
2018-07-01 17:45:50 +02:00
Philip Rebohle
2bce1491c6
WIP: Typed shader interfaces 2018-07-01 12:44:37 +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
bc1384b7b4
[d3d11] Issue warning when using a command list more than once
The way buffers are invalidated can cause issues when the same command
list is submitted multiple times. Games don't seem to need this right
now.
2018-06-29 12:44:52 +02:00
Philip Rebohle
4520b1ca8f
[d3d11] Fix usage and access flags for multisampled images
Meta-resolve operations will use the image in a fragment shader.
2018-06-28 16:47:54 +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
c370eea948
[dxbc] Decorate untyped write-only UAVs as NonReadable 2018-06-28 03:42:11 +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
42a676bbdb
[d3d11] Tweak implicit flush limits
We're going to flush more often in CPU-limited scenarios, but these
new values are reasonable especially in games which submit large
amounts of GPU work at once, and should help reduce rendering latency.
Improves GPU utilization and frame rates in Hellblade by up to 10%.
2018-06-27 20:25:33 +02:00
Philip Rebohle
9fee253d09
[d3d11] Add more implicit flush points
All these methods will implicitly spill the active render pass and
are typically not called very often, so we can try to keep the GPU
busy.
2018-06-27 18:34:17 +02:00
Philip Rebohle
6cc303c5ef
[dxbc] Implement SV_ViewportID as pixel shader input 2018-06-27 12:02:54 +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
Philip Rebohle
060cd1d87c
[d3d11] Do not use MUTABLE_FORMAT_BIT for strictly typed formats
This used to cause issues in the past, but apparently we can safely
enable this optimization now. Improves performance slightly on RADV.
2018-06-24 17:01:05 +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
845c78fd20
[dxbc] Consider stream index in signature entry lookup 2018-06-23 20:13:00 +02:00
Philip Rebohle
dd51437584
[dxbc] Implement EmitThenCut / EmitThenCutStream 2018-06-23 17:34:50 +02:00
Philip Rebohle
07ef25fec5
[dxbc] Parse OSG5 chunk for Shader Model 5 geometry shaders 2018-06-23 17:25:03 +02:00
Philip Rebohle
102591369e
[dxbc] Add DxbcModuleInfo struct
This will be required in the future to pass data from the
application to the shader compiler.
2018-06-23 17:14:35 +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
432708c15f
[d3d11] Fix image aspect mask for typeless resolve
The DXGI format info only stores the aspect mask for views created
with that format, but we're dealing with a raw resource here so we
have to query the aspect mask from the Vulkan format in question.
Fixes validation errors with typeless resolve if the formats of
the two involved images are identical.
2018-06-21 10:17:59 +02:00
Philip Rebohle
60bf471f06
[d3d11] Fix issue with back buffer creation
In case the window size is 0 in either dimension, we ended up
creating an image with an invalid size. Fixes Vulkan validation
errors in Hearthstone.
2018-06-21 10:12:38 +02:00
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
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
Philip Rebohle
9ff17b03f2
[dxbc] Support RenderTargetId and ViewportId in Vertex/Domain shaders
Fixes shader compilation errors in Pillars of Eternity II (#408)
and Lost Sphear (#406). Currently unsupported by RADV.
2018-06-01 13:57:26 +02:00
Philip Rebohle
3a520dfe4a
[dxvk] Enable VK_EXT_shader_viewport_index_layer if available
Required to support SV_RenderTargetArrayIndex in vertex shaders.
2018-06-01 13:56:09 +02:00
Philip Rebohle
b7dff330f8
[spirv] Update SPIR-V headers 2018-06-01 13:43:19 +02:00
Philip Rebohle
aa76bae32a
[dxbc] Fix incorrect OpSelectionMerge instruction
Fixes a regression introduced in v0.53 that would cause
Witcher 3 to crash when enabling Nvidia Hairworks on RADV.
2018-05-31 14:20:12 +02:00
Philip Rebohle
621aed5fdb
[dxbc] Bound-check dynamically indexed constant buffer reads
Emulates D3D11 behaviour more closely on Nvidia hardware.
Fixes an issue in Dark Souls Remastered caused by constant
buffer access with an undefined index value (#405).
2018-05-31 10:13:32 +02:00
Philip Rebohle
7fe4a70342 Version 0.53
-----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEJz0EC1ETuIbRoJDUyMxhNCejHJkFAlsLDL4ACgkQyMxhNCej
 HJmIPwgArq3gx2qLKKLokrCyVbwf5UfYtMbnyEQCs7nSBbb0JiaeQXJClAdIwFP6
 VncCpCDOjvssHAiXMF1hfbHDMvVpMa3nwz+O2bOKFxg9OCt69T0wqbOvNVuJzEq4
 7zXWNBXegPJaY5KQXiJORetU/xNcb8/ikWEAT57vkRu2RvvT2ct/oaynWZtgh+X5
 /OMHW1nMP9Bvwm5ZCWw2fCdT9evqIrXL3IreoJKX+dW/10oIaUnh+Q5Fcm7L0s7i
 dYkmm1KM6WiHpO/duK0SpbOl9ASzorwtcRjgM2syzM0QljcUpdnRCDXsuVWYOpRL
 7GbtyzdVC/SJknJoWMdTcpIX6fjYPA==
 =nkRK
 -----END PGP SIGNATURE-----
gpgsig -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEJz0EC1ETuIbRoJDUyMxhNCejHJkFAlsOvCkACgkQyMxhNCej
 HJlusQgAkfcCUgFLMLGoUeOJaHkpDnv5/s13AMG3a+m9SLUavQ87izysrp6cEaF6
 1O1Rxf/NHqhOh8jGwHILVmDWeYzDGkNKUW0/g0A0hcLMDyh5f5zMVqYoX9ITsjmG
 w5Woc4I7JPqsPdqJ0FOk/dQKIrnVXr/SZXrna55ZvXPI9q1wz0QCbE4E/q47tJUA
 3F5yw+eNaRWEHe7T9wSXdtuVo7R1NFqewt5kTvgiYg6HCWSCNAvgTVHnEg2tpaNC
 rzipvxXKSNbDB30JpC8+R6aP4b7z6P9p1KjyoSKT7Jb5kvOw3p6eY5WQq69KUhhq
 EjTMwUrFaP1K6IJwgWfxLxIufp5pqw==
 =JJRk
 -----END PGP SIGNATURE-----

Merge tag 'v0.53' into openvr-v2

Version 0.53
2018-05-30 16:58:46 +02:00
Philip Rebohle
fc8573891e
[d3d11] Fix vertex attribute offset with D3D11_APPEND_ALIGNED_ELEMENT
Computes the correct offset even if some vertex attributes are not used
by the vertex shader. Fixes a crash in Sleeping Dogs: Definitive Edition
(#407).
2018-05-30 13:33:48 +02:00
Philip Rebohle
3b70e23e2c
[dxvk] Allow overcommitting non-device local memory
If allocations on host-local memory types fail, we can rely on
Vulkan's error reporting. May fix issues on systems with small amounts of VRAM.
2018-05-29 14:56:41 +02:00
Philip Rebohle
c600b43d73
[d3d11] Allocate DYNAMIC buffers on device-local host-visible memory
Improves performance on AMD cards when GPU-bound.
~5% FPS increase in The Witcher 3.
2018-05-29 14:50:08 +02:00
Philip Rebohle
a9eff13b92
[dxvk] Refactor memory allocator
In addition to some much needed code cleanips, the allocator will no
longer try to over-commit memory heaps.
2018-05-29 14:48:27 +02:00
Philip Rebohle
f77392a264
[dxvk] Apply dynamic state at draw time
Changes to the viewport, stencil reference and blend constants are often
coupled with a pipeline state update, so it makes sense to update it later.
2018-05-29 05:03:27 +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
f68bf1a187
[dxvk] Added correct element size to depth-only and stencil-only formats
Fixes depth-to-color image copies in Elex and Neptunia VII.
2018-05-28 20:33:49 +02:00
Philip Rebohle
8cd97959f2
[d3d11] Chjeck whether input layouts are identical
Prevents redundant state changes when a game switches between
identical input layouts. Reduces the the number of Vulkan
calls in Grim Dawn by ~30%.
2018-05-27 01:10:49 +02:00
Philip Rebohle
de9ffdcfa3
Merge branch 'dxbc-correct-derivs' 2018-05-26 21:13:28 +02:00
Philip Rebohle
48037a8b87
[d3d11] Enable shaderStorageImageMultisample if the device supports it 2018-05-26 20:34:40 +02:00
Philip Rebohle
97e3b89bc7
[dxvk] Emit dynamic state only if a pipeline is bound
Fixes validation errors in Dirt 4.
2018-05-26 20:09:31 +02:00
Philip Rebohle
001794a094
[dxbc] Implement deferred kill operation
Fixes visual issues during LOD transitions in The Witcher 3,
Rise of the Tomb Raider and other games with a similar LOD
system. UAV stores and atomics are conditionalized as well.
2018-05-26 19:25:20 +02:00
Philip Rebohle
0619842dd9
[dxbc] Make UAV stores and atomics conditional
We should only perform stores when the corresponding
UAV is bound. This may be extended with range checks
at a later time.
2018-05-26 19:01:44 +02:00
Philip Rebohle
9278221416
[dxbc] Run analyzer before creating compiler object
We may need the analysis results when initializing the compiler object.
2018-05-26 17:46:49 +02:00
Philip Rebohle
af62d423b2
[dxbc] Add per-device option for deferred kills 2018-05-26 17:08:39 +02:00
Philip Rebohle
ec5572aa69
[dxbc] Scan for discard and derivative instructions 2018-05-26 17:08:08 +02:00
Philip Rebohle
667616bc39
[dxvk] Remove unnecessary include 2018-05-26 14:56:36 +02:00
Philip Rebohle
a2d9874b26
[dxvk] Use new spec constant structure for pipeline compilation 2018-05-26 14:54:29 +02:00
Philip Rebohle
d79f39b963
[dxbc] Implement sampleinfo instruction for rasterizer 2018-05-26 14:54:05 +02:00
Philip Rebohle
4ae15f3edf
[dxvk] Add global specialization constant data structures
Implements a unified way of defining specialization constants
for graphics and compute pipelines which can be easily extended
in the future.
2018-05-26 14:50:00 +02:00
Philip Rebohle
27816b470a
[spirv] Add support for 32-bit specialization constants 2018-05-26 13:52:33 +02:00
Philip Rebohle
b78130defd
[d3d11] Overwatch: Fake success in CreateGeometryShaderWithStreamOutput 2018-05-25 23:53:34 +02:00
Philip Rebohle
a0e0ba1cc8
[dxvk] Align length when clearing entire buffer
Buffer slices in DXVK are always aligned to at least
256 bytes, so this is safe. Fixes a regression leading
to GPU hangs on RADV.
2018-05-25 21:02:15 +02:00
Philip Rebohle
b30e53fa0d
[dxvk] Track image (rather than the view) when generating mip maps 2018-05-25 19:15:14 +02:00
Philip Rebohle
84a62f795f
Merge branch 'meta-mipgen' 2018-05-25 17:46:41 +02:00
Philip Rebohle
4b37590e14
[dxvk] Use new mip map generator 2018-05-25 17:45:41 +02:00
Philip Rebohle
19b6a16173
[dxvk] Add new mip map generator
The current approach uses Vulkan blits, which does not
work if the image view in question has a different format
than the image itself.
2018-05-25 17:44:50 +02:00
Philip Rebohle
7ec93debf1
[dxvk] Add shaders for mip map generation 2018-05-25 17:44:34 +02:00
Philip Rebohle
49bda46a37
[d3d11] Validate and correct scissor rects
Fixes Vulkan validation errors in Frostpunk and more closely
emulates Windows behaviour.
2018-05-25 00:08:28 +02:00
Philip Rebohle
254676049a
[dxvk] Added convenience equal checker for unordered maps 2018-05-24 20:18:37 +02:00
Philip Rebohle
d844ddfdfa
[dxgi] Add option for deferred surface creation
Deferred surface creation is required for Frostpunk due to conflicts
with the D3D9 swap chain created by the game before it presents the
first frame to the DXGI swap chain, but breaks NieR:Automata due to
threading issues.
2018-05-24 13:04:29 +02:00
Philip Rebohle
f087016e77
[dxgi] Add app-specific DXGI options 2018-05-24 13:04:21 +02:00
Philip Rebohle
a43025294a
[dxbc] Remove DxbcImageInfo::layered property 2018-05-24 12:07:03 +02:00
Philip Rebohle
12d79257be
[dxbc] Remove TexCube -> TexCubeArray workaround 2018-05-24 12:00:31 +02:00
Philip Rebohle
58e9280891
[dxbc] Remove Tex2D -> Tex2DArray workaround 2018-05-24 11:49:12 +02:00
Philip Rebohle
d9772b0ffd
[dxvk] Create image views for all supported view types
Rather than creating just one image view per DxvkImageView, we create
views for all compatible types in an attempt to work around game bugs
in Diablo 3, Far Cry 5, Nier Automata, Dishonored 2, Trackmania etc.,
which bind incompatible resource views to some resource slots.
2018-05-24 11:44:04 +02:00
Philip Rebohle
61049c33fb
[dxgi] Reduce reported VRAM on 32-bit platforms
This is closer to what Windows does, and some applications may have
trouble with more than 3GB VRAM.
2018-05-24 10:48:06 +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
531732fe91
[dxgi] Add IDXGIFactory2 to supported interfaces 2018-05-23 01:32:52 +02:00
Philip Rebohle
d1b705bf0d
[dxgi] Implemented IDXGISwapChain1 2018-05-23 01:06:34 +02:00