Philip Rebohle
175385481e
[dxvk] Insert barrier before CS image view clear only if needed
...
Removes one unnecessary sync point in Claybook.
2018-11-01 21:48:22 +01:00
Philip Rebohle
8054e4a772
[dxvk] Add DXVK context method to transparently flush the command list
...
This is identical to what the D3D11 function did, but having it in this
place will allow us to potentially implement better flush heuristics
based on work done on the CS thread.
2018-11-01 13:24:42 +01:00
Philip Rebohle
e15e693dc4
[dxvk] Spill render pass for pipelines that use vertex stage UAVs
...
We cannot use simple pipeline barriers in this case because of the
extremely strict restrictions surrounding self-dependencies.
2018-10-30 14:43:52 +01:00
Philip Rebohle
76b63efedb
[dxvk] Use self-dependency to synchronize SSBO writes
...
While this doesn't support vertex stages yet, it should be faster
when the pipeline writes to storage resources from the fragment
shader.
We should analyze the vertex stage shaders for SSBO writes in
order to determine whether to spill the render pass.
2018-10-30 14:11:27 +01:00
Philip Rebohle
fd52022fff
[dxvk] Spill render pass after draws with storage resources
2018-10-29 12:12:34 +01:00
Philip Rebohle
db2880acfd
[dxvk] Update blend constants only when they have actually changed
...
Reduces number of redundant state changes in Resonance of Fate.
2018-10-22 15:35:56 +02:00
Philip Rebohle
254cd8bd06
[dxvk] Optimize image descriptor updates
...
Avoids unnecessary atomic operations when rendering to a framebuffer
with a depth attachment.
2018-10-15 16:35:40 +02:00
Philip Rebohle
3a48092630
[dxvk] Implement transform feedback draw call
2018-10-10 13:05:37 +02:00
Philip Rebohle
929b75a038
[dxvk] Add support for transform feedback queries
2018-10-10 13:05:37 +02:00
Philip Rebohle
76d917df20
[dxvk] Add xfb counter write -> xfb counter read barrier
...
- Update xfb counter barrier
2018-10-10 13:05:37 +02:00
Philip Rebohle
93b1b9bc00
[dxvk] Implement transform feedback
...
Begins transform feedback when rendering with an xfb-enabled
pipeline bound, and ends transform feedback as needed, while
writing back the counters supplied by the app. This does not
yet support transform feedback queries or the draw command.
2018-10-10 13:05:37 +02:00
Philip Rebohle
1f135f59ed
[dxvk] Add Xfb API stubs
2018-10-10 13:05:37 +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
0d9e714d3e
[dxvk] Add discardImage method
2018-10-01 16:54:34 +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
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
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
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
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
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
2eda95f61a
[dxvk] Optimize retrieval of dynamic buffer offsets
2018-09-20 15:19:33 +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
f42f708f72
[dxvk] Rename DxvkBindingState -> DxvkBindingMask
...
Preparation for some more binding-related work.
2018-09-17 10:45:28 +02:00
Philip Rebohle
18927dc958
[dxvk] Remove asynchronous pipeline compiler
2018-09-14 16:46:07 +02:00
Philip Rebohle
d86b5361f0
[dxvk] Only mark render targets as used on draw calls
2018-09-13 12:00:49 +02:00
Philip Rebohle
1127a344dc
[dxvk] Fix query type enablement in query manager
...
We cannot use query types as flag indices, since query
types added in the future may have gretaer enum values
than 32.
2018-09-11 13:01:00 +02:00
Philip Rebohle
ea6b6e2e53
[dxvk] Rename useAsyncPipeCompiler -> asyncPipeCompiler
2018-09-11 08:38:18 +02:00
Philip Rebohle
5c89a68879
[dxvk] Implement render target state tracking for async compilation
...
This ensures that we always render to targets which are only used once.
2018-09-10 19:41:17 +02:00
Philip Rebohle
37a8743dbc
[dxvk] Add output component mask state to graphics pipelines
...
This is required in order to implement swizzled render target views.
We currently use this to remap color write masks as needed.
2018-09-01 17:59:50 +02:00
Philip Rebohle
2f90213c0f
[dxvk] Enable pipeline statistics queries around compute shaders
...
Fixes potential issues caused by csInvocations being 0.
2018-08-31 16:24:03 +02:00
Philip Rebohle
657093c14e
[dxvk] Refactor query management
...
Moved all query-related state tracking and management into a
separate class. This allows for new query types to be added
in the future, and makes less dodgy assumptions about the
current state when beginning or ending a query.
2018-08-31 15:38:09 +02:00
Philip Rebohle
b75b7d0999
[dxvk] Simplify discardBuffer access flags
...
Specifying both read and write access is unnecessary, as the dirty
check will always return true for writes when it would also return
true for reads.
2018-08-27 14:50:47 +02:00
Philip Rebohle
f4b2c52816
[dxvk] Support render target views in ClearImageView
...
This way, we'll have two separate code paths, one for
storage images and one for render targets. We'll need
this for the implementation of ClearView.
2018-08-15 19:03:26 +02:00
Philip Rebohle
beedd39f7d
[dxvk] Accept VkClearValue in DxvkContext::clearImageView
2018-08-15 19:03:26 +02:00
Philip Rebohle
fe66e668e5
[dxvk] Implement native discardBuffer function in the backend
...
This may be more efficient because it avoids renaming the buffer
in case it can be used without inserting additional barriers.
2018-08-03 11:28:00 +02:00
Philip Rebohle
ffede83d9e
[dxvk] Remove unnecessary barrier recording before compute dispatch
...
This call is not needed any longer because we have compute init barriers.
Might allow for parallel compute shader dispatch in some situations.
2018-08-01 09:14:39 +02:00
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
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
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
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
4f28d57352
[dxvk] Remove unused rasterizer discard state flag
2018-06-25 16:56:52 +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