Philip Rebohle
eff81c7edf
[dxvk] Implement getShader method for graphics pipelines
2018-10-10 10:28:12 +02:00
Philip Rebohle
781ee00f5c
[dxvk] Refactor indirect draw/dispatch commands
...
Introduces an OpenGL-style bind point for the argument buffer, which
means we can avoid a lot of unnecessary reference tracking in games
that do a lot of indirect draw calls.
Reduces CPU overhead in Assassin's Creed Odyssey.
2018-10-08 10:23:18 +02:00
Philip Rebohle
eb55325640
[dxvk] Fix missing buffer tracking for indirect draw calls
...
This is optimized to allow a large number of indirect draws to be
submitted if they all access the same argument buffer, as is the
case in Assassin's Creed Syndicate and Odyssey.
2018-10-07 17:51:44 +02:00
Philip Rebohle
af16461858
[dxvk] Fix missing indirect dispatch barriers and tracking
2018-10-07 17:33:03 +02:00
Philip Rebohle
417b6cb6dc
[dxvk] Reduce CPU overhead of indirect draw calls
2018-10-07 17:09:46 +02:00
Philip Rebohle
09bbb68d98
[meta] Release v0.81
2018-10-05 21:14:11 +02:00
Philip Rebohle
a3bf90f5a3
[vr] Cosmetic code cleanup
2018-10-04 12:30:26 +02:00
Andrew Eikum
bc367fd817
[vr] Load native openvr library on winelib builds
2018-10-04 12:08:12 +02:00
Philip Rebohle
0d9e714d3e
[dxvk] Add discardImage method
2018-10-01 16:54:34 +02:00
Philip Rebohle
da76d74a2d
[dxvk] Minor internal buffer API cleanup
2018-09-30 11:05:20 +02:00
Philip Rebohle
aaaf2c53e0
[dxvk] Don't reset unused bind points
...
Saves a few CPU cycles when binding resources.
2018-09-29 20:23:00 +02:00
Philip Rebohle
387f41ede5
[dxvk] Make DxvkBuffer destructor explicit
...
Prevents compiler from inlining massive amounts of code where it's
not needed. This is more consistent with the other classes as well.
2018-09-29 20:19:07 +02:00
Philip Rebohle
33408a8a74
[dxvk] Fix stencil state assignment
...
Not really important since we don't use stencil anyway,
but we should at least populate the struct correctly.
2018-09-27 21:04:49 +02:00
Philip Rebohle
518ab2ebdd
[dxvk] Refactor resolve ops
...
Brings this more in line with clear and copy operations, which
both have more than one code path. Also optimizes barriers.
2018-09-27 12:42:20 +02:00
Philip Rebohle
509e6f1abf
[dxvk] Use new meta copy for depth <> color image copies
2018-09-27 11:44:09 +02:00
Philip Rebohle
fad2e13882
[dxvk] Add meta copy code
...
The current way of copying data between incompatible images is slow
and does not work for multisampled images. This new code implements
a render pass which performs an exact copy of the source data.
2018-09-27 11:44:09 +02:00
Philip Rebohle
c11d492597
[dxvk] Add meta copy shaders
...
Used to copy between depth and color images.
2018-09-27 11:44:09 +02:00
Philip Rebohle
63d7770870
[dxvk] Flush queued barriers when binding any frame buffer
...
We need to flush when starting meta render passes as well.
2018-09-25 21:32:21 +02:00
Philip Rebohle
8bcd47d6dc
[dxvk] Simplify pipeline object locking
...
Any more complex approach is not very useful at the moment
because we have to put a lock around the actual compile
function anyway.
2018-09-25 18:22:58 +02:00
Philip Rebohle
0be291e123
[dxvk] Don't do image-to-buffer copies for multisampled images
...
Vulkan does not allow this.
2018-09-25 14:37:53 +02:00
Philip Rebohle
ddfa7e40b3
[dxvk] Renove redundant vkDestroyPipeline
2018-09-24 22:54:49 +02:00
Philip Rebohle
a950872c7c
[dxvk] Check whether the vertex binding / attribute count is valid
2018-09-24 16:22:12 +02:00
Philip Rebohle
04ed4273ba
[dxvk] Avoid buffer slice copy when binding index/vertex buffers
...
Also redesigns getDescriptor to always return the offset.
2018-09-23 20:09:01 +02:00
Philip Rebohle
1c865328d3
[meta] Release v0.80
2018-09-23 19:01:15 +02:00
Philip Rebohle
b49876528a
[dxvk] Enable state cache for compute pipelines
...
Also cleans up some code to get the design more in line
with how graphics pipelines are handled.
2018-09-23 14:42:03 +02:00
Philip Rebohle
6c8ac9e5f4
[dxvk] Add compute shader support to pipeline state cache
2018-09-23 14:42:03 +02:00
Philip Rebohle
4a72cae1e6
[dxvk] Enable state cache
2018-09-23 14:41:43 +02:00
Philip Rebohle
57dab630b5
[dxvk] Add pipeline state cache
...
Stores state vectors for graphics pipelines in a file and allows
games to start compiling them in advance on subsequent launches.
Changes:
(1) Add environment variable to select the cache file path
(2) Add magic number and entry size to cache file header
2018-09-22 22:38:35 +02:00
Philip Rebohle
d6742e38c5
[dxvk] Lock pipeline object while compiling one pipeline
...
This prevents us from compiling the exact same pipeline twice
at the same time, which for some reason crashes RADV.
2018-09-22 12:04:06 +02:00
Philip Rebohle
0e2d63f6d2
[dxvk] Add method to retrieve shader key from shader module
2018-09-22 12:04:06 +02:00
Philip Rebohle
83447975ac
[dxvk] Refactor pipeline stat counters
...
The stat counter struct no longer has to be passed to
the pipeline compiler function.
The new implementation uses atomic counters of the pipeline manager
rather than per-command list counters, which removes the need to
pass the counter structure to the compiler function.
2018-09-22 12:02:20 +02:00
Philip Rebohle
5410680401
[dxvk] Refactor pipeline object constructors
...
This way we don't need to pass everything to the pipeline objects.
2018-09-22 11:59:25 +02:00
Philip Rebohle
9284081180
[dxvk] Remove redundant declaration
2018-09-21 19:43:47 +02:00
Philip Rebohle
0f52ec2796
Revert "[dxvk] Move command submission to separate thread"
...
This reverts commit f61ff5d345fdbd1627b2fd833f57ff303015c747.
Apparently, this causes extremely poor frame times on some
configurations. Reason is currently unknown.
2018-09-20 19:58:00 +02:00
Philip Rebohle
2eda95f61a
[dxvk] Optimize retrieval of dynamic buffer offsets
2018-09-20 15:19:33 +02:00
Philip Rebohle
f61ff5d345
[dxvk] Move command submission to separate thread
...
- Reduces load on the CS thread and the main rendering thread.
- This takes into account that VR apps access the queue as well.
2018-09-20 14:43:06 +02:00
Philip Rebohle
539cc77b6e
[dxvk] Eliminate buffer slice copy when updating buffer descriptors
2018-09-20 12:10:43 +02:00
Philip Rebohle
e3c2815782
[dxvk] Add copyBufferRegion and copyImageRegion methods
...
These new methods can support overlapped subresource copies by
creating a temporary resource and effectively using two copy
operations. This is required for D3D11 overlapped copies.
2018-09-18 16:20:57 +02:00
Philip Rebohle
482930f04a
[dxvk] Implement backend support for D3D11 forced sample count
...
We don't support rasterization with a sample count different from
the framebuffer sample count, but if there are no attachments, any
sample count is allowed.
2018-09-18 13:22:28 +02:00
Philip Rebohle
4469ef1ec1
[d3d11] Replace shader debug name with shader key
2018-09-18 10:35:27 +02:00
Philip Rebohle
0843e2211c
[dxvk] Add new DxvkShaderKey to represent unique shader key
2018-09-18 10:35:08 +02:00
Philip Rebohle
12efd88726
[dxvk] Avoid more unnecessary copies of ref-counted pointers
...
Improves performance measurably in Shadow Warrior 2 when CPU bound.
2018-09-17 23:42:34 +02:00
Philip Rebohle
3a1fbdaaf1
[dxvk] Avoid buffer slice copy when tracking buffer views
2018-09-17 23:30:36 +02:00
Philip Rebohle
820904f22d
[dxvk] Optimize ref counting around resource tracking
...
Micro-optimization that reduces the number of atomic increments
and decrements when moving reference-counted objects around.
2018-09-17 20:42:08 +02:00
Philip Rebohle
f42f708f72
[dxvk] Rename DxvkBindingState -> DxvkBindingMask
...
Preparation for some more binding-related work.
2018-09-17 10:45:28 +02:00
Philip Rebohle
eac86fab15
[dxvk] Do not map allocations that don't need a HOST_VISIBLE memory type
...
Should reduce the amount of virtual memory used on systems without
dedicated VRAM. Refs #640 .
2018-09-17 09:08:00 +02:00
Philip Rebohle
a78dc3b444
[dxvk] Do not store a strong reference from adapter to instance
...
The instance stores an array of adapters now. Fixes crash when
using the device filter, and fixes the instance not getting
destroyed.
2018-09-16 19:11:15 +02:00
Philip Rebohle
c8e0c253ba
[dxvk] Simplify graphics pipeline instance management
2018-09-16 10:07:45 +02:00
Philip Rebohle
b6bf72aeb6
[dxvk] Fix some legacy cruft around Vulkan instance creation
2018-09-15 14:16:56 +02:00
Philip Rebohle
364e15d11a
[dxvk] Remove all remaining pipecompiler code
2018-09-14 17:22:56 +02:00