Philip Rebohle
fbbcb30590
vkd3d: Use NULL descriptors for vertex buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Philip Rebohle
87bf1e8937
vkd3d: Use NULL descriptors for undefined root descriptors.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
Joshua Ashton
45d4296a54
vkd3d: Rename vkd3d_uint32_atomic to vkd3d_atomic_uint32
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Joshua Ashton
033f76e3ae
vkd3d: Define our own memory orders
...
We shouldn't potentially override stuff in the std library and this allows us to map directly to __ATOMIC_* memory orders which is more correct.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-24 21:13:35 +02:00
Hans-Kristian Arntzen
349412f19f
vkd3d: Support rewinding ID3D12Fence.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-16 11:00:08 +02:00
Hans-Kristian Arntzen
5ef7b99e0b
vkd3d: Fix uninitialized return value in CPU fence signaling.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-16 11:00:08 +02:00
Joshua Ashton
cd5d01d25c
vkd3d: Refactor atomics
...
There is no stdatomic available on MSVC so let's clean things up.
This moves all the atomic helpers to vkd3d_atomic.h and implements all platform's spinlocks in entirely the same way.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 20:40:10 +02:00
Joshua Ashton
b9909854fe
vkd3d: Make nameless unions really nameless
...
This makes it consistent across tests and vkd3d.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-06-15 19:59:52 +02:00
Hans-Kristian Arntzen
9defd87f95
vkd3d: Implement BeginEvent/EndEvent.
...
Only support ANSI/UNICODE version for now. The PIX3BLOB format is
extremely weird, complicated and undocumented.
We can refer to RenderDoc if we need it later ...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Hans-Kristian Arntzen
9534c1a345
vkd3d: Move to VK_EXT_debug_utils.
...
debug_marker/debug_report are both deprecated in favor of debug_utils and vkd3d was using marker in a
buggy way anways, as debug_marker requires debug_report to work, but it was
only conditionally enabled.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-11 13:02:50 +02:00
Hans-Kristian Arntzen
d8ca2cef6d
vkd3d: Serialize all queue submissions.
...
Gets rid of the full barrier on command buffer end.
Instead, do what D3D12 wants, which is to serialize all
ExecuteCommandLists. Simplify the existing timeline sempahore setup for
sparse queues and use it for all submissions.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-06-09 14:28:13 +02:00
Hans-Kristian Arntzen
9875d65d35
vkd3d: Apply heap offsets for ExecuteIndirect buffers.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-05-29 13:03:32 +02:00
Philip Rebohle
1ade8c0cc5
vkd3d: Issue full barrier at the end of command lists.
...
D3D12 apparently does this implicitly. Fixes rendering issues in
the AMD COCOA demo on Polaris with RADV, which does not emit a
barrier between the AO compute passes and the tone mapping pass
in the next command buffer.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-27 14:59:21 +02:00
Philip Rebohle
50a9fae263
vkd3d: Silence SetMarker/BeginEvent/EndEvent log spam.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:27:02 +02:00
Philip Rebohle
6707f3fc30
vkd3d: Invalidate descriptor heaps on root signature change.
...
Apparently we need to do this if the push constant layout changes.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:27:02 +02:00
Philip Rebohle
c75bbb9997
vkd3d: Handle null root descriptors.
...
We should hook this up to the robustness2 feature at some point,
but for now, just use the dummy descriptors. Fixes a crash in
the AMD CACAO demo.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-12 12:27:02 +02:00
Philip Rebohle
8588b46900
vkd3d: Implement d3d12_command_list_CopyTiles.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-08 16:30:54 +02:00
Philip Rebohle
2e0ce6a186
vkd3d: Serialize sparse binding calls.
...
In D3D12, Update/CopyTileMappings are implicitly synchronized with
respect to other commands executing on the same queue, which means:
- Signal and Execute have to wait for previously submitted
sparse binding operations to complete
- Wait and Execute have to complete before subsequently
submitted sparse binding operations can execute.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
73bcd3e79d
vkd3d: Create semaphores for sparse binding operations.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
902ab95ba6
vkd3d: Factor out vkd3d_create_timeline_semaphore.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
e1b75748a2
vkd3d: Implement d3d12_command_queue_CopyTileMappings.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
f56a860bc6
vkd3d: Implement d3d12_command_queue_UpdateTileMappings.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
e3eb3498c2
vkd3d: Implement sparse binding.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-07 15:24:35 +02:00
Philip Rebohle
0d74a13bc4
vkd3d: Improve error handling in d3d12_command_queue_init.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-06 14:48:59 +02:00
Philip Rebohle
e59d6c4c32
vkd3d: Clean up queue creation and management.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-05-06 14:48:12 +02:00
Philip Rebohle
6f517a3788
vkd3d: Fix UpdateTileMappings signature.
...
Also, formatting.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-30 18:08:25 +02:00
Philip Rebohle
9367fd5ee8
vkd3d: Implement deferred clears.
...
This allows us to perform clears inside the render pass even if
the render pass hasn't been started at the time of the clear yet.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-28 16:29:11 +02:00
Philip Rebohle
7bfe5d0bb3
vkd3d: Remove d3d12_command_list_clear.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-28 16:29:11 +02:00
Philip Rebohle
fe269109ef
vkd3d: Reimplement ClearRenderTargetView.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-28 16:29:11 +02:00
Philip Rebohle
1cffdb93f2
vkd3d: Reimplement ClearDepthStencilView.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-28 16:29:11 +02:00
Philip Rebohle
0bd0352073
vkd3d: Introduce d3d12_command_list_clear_attachment helper.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-28 16:29:11 +02:00
Philip Rebohle
e6bd3cb305
vkd3d: Don't emit barriers when temporarily suspending render passes.
...
Fixes performance regressions introduced with the barrier rework.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 16:13:19 +02:00
Philip Rebohle
d355f03d66
vkd3d: Fix depth-stencil load/store ops.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 16:13:19 +02:00
Philip Rebohle
1b447bd2dd
vkd3d: Fix image layouts for swap chain back buffers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
1eac9936f4
vkd3d: Transition DSV to correct layout.
...
Now uses the layout from the graphics pipeline.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
0ff0423538
vkd3d: Store DSV layout with graphics pipelines.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
f0570509c1
vkd3d: Fix image layouts for clear operations.
...
We'll need to revisit this as the current implementation is
not only inefficient but also wrong in quite a few ways.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
ae89f2d639
vkd3d: Fix image layouts for resolve operations.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
82032e9e58
vkd3d: Fix image layouts for buffer<->image copies.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
151f18d9ef
vkd3d: Fix image layouts in d3d12_command_list_copy_image.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
8d9d23a9f9
vkd3d: Rework d3d12_command_list_ResourceBarrier.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
5bb613ac07
vkd3d: Use common layout in initial state transitions.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
fc60b6400c
vkd3d: Introduce vk_access_and_stage_flags_from_d3d12_resource_state.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
608ef6e605
vkd3d: Emit layout transitions when beginning and ending a render pass.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
edb793b069
vkd3d: Infer current DSV format from DSV descriptor.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
d3128592ca
vkd3d: Store RTV and DSV descriptors with command list.
...
We need access to the resource in order to perform render pass
layout transitions, just the view handle isn't enough.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
8c09ef838a
vkd3d: Use common image layout for descriptors.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
76b2d2af89
vkd3d: Add layout property to texture views.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-27 15:40:39 +02:00
Philip Rebohle
baa0a293e7
vkd3d: Apply heap offset to destination buffer in ResolveQueryData.
...
Fixes rendering issues in The Talos Principle.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-23 17:26:55 +02:00
Hans-Kristian Arntzen
805f92a38c
vkd3d: Remove dead transfer buffer code.
...
Obsoleted after shader copy path.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-23 12:31:48 +02:00