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
Philip Rebohle
4b5ec1be3e
[dxvk] Implement support for dynamic buffer binding offsets
2018-06-22 00:33:06 +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
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
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
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
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
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
4b37590e14
[dxvk] Use new mip map generator
2018-05-25 17:45:41 +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
3fc9466a07
[dxvk] Fix query scopes
...
Occlusion queries must begin and end in the same render pass.
Fixes a rendering issue in Shadow Warrior 2 on AMD drivers.
2018-05-12 19:46:08 +02:00
Philip Rebohle
c7d2957d8f
[util] Remove duplicate tzcnt function
2018-05-09 20:09:09 +02:00
Philip Rebohle
37456d583e
[dxvk] Move DxvkPipelineCache to DxvkPipeManager
...
Since the pipeline cache isn't used for anything else but compiling
pipelines, keeping this stuff together is much more useful.
2018-05-09 14:26:45 +02:00
Philip Rebohle
47b9fd8b19
[dxvk] Reimplement vertex buffer bindings
...
Reduces the number of Vulkan calls for vertex buffer bindings and
works around incorrect validation errors emitted when applications
do not use a consecutive range of vertex bindings. No performance
impact is expected in most games.
2018-05-09 13:01:52 +02:00
Philip Rebohle
3a3b1eda59
[dxvk] Move render pass out of pipeline state vector
2018-05-03 23:48:45 +02:00
Philip Rebohle
5683422208
Merge branch 'clearopt'
2018-05-02 00:45:17 +02:00
Philip Rebohle
e30a8299e6
[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass
2018-05-02 00:45:10 +02:00
Philip Rebohle
badb93334e
[dxvk] Fix DxvkContext::transformImage
...
We have to spill the render pass before transforming the
image. We don't need the barrier if the old and new
layout are the same.
2018-05-01 23:29:58 +02:00
Philip Rebohle
5e02c1bb2f
[dxvk] Move DxvkPipelineManager instance back to DxvkDevice
2018-05-01 16:56:33 +02:00
Philip Rebohle
cf1358b2f4
[dxvk] Fixed partial depth-stencil clear operations
2018-04-30 21:42:16 +02:00
Philip Rebohle
ba53cf92ac
Revert "[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass"
...
This reverts commit 1bbfe770139f222d33bc54e471c8516950abd4b7.
Breaks Path of Exile.
2018-04-30 18:47:35 +02:00
Philip Rebohle
5d5be87402
[dxvk] Oprimize render target clear operations
...
We can save one image layout transition when clearing a render
target by delaying clears until vkCmdBeginRenderPass is called.
2018-04-30 17:04:13 +02:00
Philip Rebohle
1bbfe77013
[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass
2018-04-30 15:47:29 +02:00
Philip Rebohle
1bcae90dd0
[dxvk] Fix image layouts for images using VK_IMAGE_TILING_LINEAR
...
We have to use VK_IMAGE_LAYOUT_GENERAL for those. On top of that,
we should avoid image transitions when the image is in GENERAL
layout anyway in order to save some time on the GPU.
2018-04-29 15:28:50 +02:00
Philip Rebohle
1784b8c44d
[d3d11] Merge interop API
2018-04-26 22:20:09 +02:00
Philip Rebohle
8cb3a266f7
[dxvk] Fix potential state tracking issue when updating render targets
2018-04-26 18:43:19 +02:00