Philip Rebohle
35238ec4d1
[d3d11] Make D3D11 context methods more robust to null pointers
...
Assetto Corsa tries to do some questionable things when reflections
are disabled in the game options. Refs #648 .
2018-09-19 12:33:30 +02:00
Philip Rebohle
d9009efd22
[d3d11] Implement and advertize support for CopyWithOverlap feature
2018-09-18 16:22:47 +02:00
Philip Rebohle
f1b075c0f3
[dxvk] Add CS chunk pool
...
Reduces the number of dynamic memory allocations for CS chunks by
recycling them once they are no longer needed. Also fixes a potential
issue with chunks that are dispatched multiple times.
2018-08-27 16:07:38 +02:00
Philip Rebohle
f75e3ad13f
[d3d11] Fix silly GenerateMips bug
2018-08-16 00:57:16 +02:00
Philip Rebohle
0b1b898be4
[d3d11] Implement ID3D11DeviceContext1::ClearView
...
Required for Feature Level 11_1.
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
da21a6db7f
[d3d11] Silence warning about GenerateMips being called on buffers
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
fb88070888
[d3d11] Implement copy flags for CopySubresourceRegion1 / UpdateSubresource1
2018-08-03 11:22:26 +02:00
Philip Rebohle
3fee20dfec
[d3d11] Implement DiscardResource for buffers
...
We don't suppor this for images, and we don't support DiscardView yet.
Buffers can be invalidated, which may in some cases be beneficial in
order to avoid synchronization on the GPU.
2018-08-03 11:10:40 +02:00
Philip Rebohle
c31e646921
[dxvk] Introduce concept of shader constants
...
Large constant arrays should be moved to a uniform buffer instead
of being baked directly into the shader code.
2018-07-30 20:29:05 +02:00
Philip Rebohle
7f0f7ac048
[d3d11] Refactor shader binding
...
This way we can get rid of an unnecessary template and make future
extensions possible.
2018-07-30 19:37:19 +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
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
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
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
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
05f24c3c38
[d3d11] Reduce log spam about UAV rendering
2018-06-10 04:19:30 +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
4a0c81276f
[d3d11] Implement new auto-flush heuristic
2018-06-04 23:31: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
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
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
26b319b29b
[d3d11] Fallout 4: Force Flush on GetData calls
2018-05-14 02:40:59 +02:00
Philip Rebohle
c17f4e2fc0
[dxvk] Increase update buffer size
...
Helps reduce the number of memory allocations further
when deferred contexts are used for rendering.
2018-05-13 14:45:50 +02:00
Philip Rebohle
9d4654f445
[dxvk] Fix update buffer allocation size
2018-05-13 11:12:54 +02:00
Philip Rebohle
cd92d0b992
[dxvk] Allow binding render targets of different sizes
...
In order to not cause Vulkan validation issues, we have
to reduce the framebuffer size. Fixes a regression in
Bioshock Infinite.
2018-05-07 20:46:20 +02:00
Philip Rebohle
a55bee9554
[d3d11] Validate render targets before setting them up
...
Mimicks what native D3D11 does. Fixes validation errors in
Nier:Automata with multisampling enabled in some situations.
2018-05-05 09:12:36 +02:00
Philip Rebohle
e30a8299e6
[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass
2018-05-02 00:45:10 +02:00
Philip Rebohle
ba53cf92ac
Revert "[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass"
...
This reverts commit 1bbfe77013
.
Breaks Path of Exile.
2018-04-30 18:47:35 +02:00
Philip Rebohle
1bbfe77013
[dxvk] Refactor DxvkFramebuffer and DxvkRenderpass
2018-04-30 15:47:29 +02:00
Philip Rebohle
7cb7e4a944
Merge branch 'master' of https://github.com/doitsujin/dxvk
2018-04-28 14:18:18 +02:00
Philip Rebohle
99813a7778
[d3d11] Use const ref pointer for device parameter
...
Closes #323 .
2018-04-28 14:17:52 +02:00
pchome
4a74cd45d5
[clang-tidy] performance-move-const-arg fix ( #324 )
...
https://clang.llvm.org/extra/clang-tidy/checks/performance-move-const-arg.html
2018-04-28 14:13:23 +02:00
Philip Rebohle
1784b8c44d
[d3d11] Merge interop API
2018-04-26 22:20:09 +02:00
Philip Rebohle
cfcca11fc5
[d3d11] CopySubresourceRegion: Fix block size alignment check
...
The source region size doesn't have to be aligned to the destination
block size. We should be checking whether the destination region is
aligned to the destination block size.
2018-04-22 23:00:31 +02:00
Philip Rebohle
4a71da3a1c
[d3d11] Improved debug output for CopySubresourceRegion
2018-04-22 22:35:10 +02:00
ZeroFault
52f0d853c0
[d3d11] add some resource validation for copying resources ( #305 )
...
* [d3d11] add some resource validation for CopyResource and CopyResourceSubregion
combine if statement
* [d3d11] added copy extents validation for compressed formats
* correct return values
* fix incorrect logic operators
* set valid copy extents when possible
* [d3d11] Clamp copy region in CopySubresourceRegion
* [dxvk] Add helper methods to deal with block-compressed images
* [d3d11] Clean up validation in CopySubresourceRegion
* [d3d11] Improve error reporting and validation in CopyResource
* [d3d11] Fix inconsistent error messages
2018-04-20 23:35:29 +02:00
Philip Rebohle
62b0e34a73
[d3d11] Implement IDXGIVkInteropDevice for D3D11Device
2018-04-20 00:19:03 +02:00
Philip Rebohle
fcdba67b88
[d3d11] Implement 2D<->3D image copies in CopySubresourceRegion
2018-04-17 22:22:49 +02:00
ZeroFault
a248ae985d
[d3d11] nullptr check on Begin and End ( #295 )
2018-04-17 13:57:39 +02:00
Philip Rebohle
d523405a5a
[dxvk] Implement bindRenderTargets method
...
An alternative to manually creating a framebuffer object and binding
it via bindFramebuffer. Future optmizations can use this to bring
down the number of redundant render pass changes.
2018-04-15 01:09:53 +02:00
Philip Rebohle
a6767ebd52
[d3d11] Improved debug output of D3D11DeviceContext methods
2018-04-14 11:45:31 +02:00
Philip Rebohle
56a1433d3f
[d3d11] ClearUnorderedAccessViewUInt: Create temp view if necessary
...
If this method is used to clear a view with a floating point format,
we need to create a compatible view with an integer format in order
to clear the resource with the correct value. Fixes some calls to
this function in Rise of the Tomb Raider and other games.
2018-04-12 23:31:15 +02:00
Philip Rebohle
db541d188f
[dxgi] Added static format mapping table
2018-04-12 17:49:14 +02:00
Philip Rebohle
ef4a3c5bfc
[d3d11] Use meta clear for ClearUnorderedAccessView* methods
2018-04-11 23:39:12 +02:00
Philip Rebohle
e06300d592
[d3d11] Fix multisample format support query for depth images
...
Fixes a crash in World of Warships when reflections are enabled.
2018-04-04 11:24:16 +02:00