Commit Graph

503 Commits

Author SHA1 Message Date
Hans-Kristian Arntzen dd6656fbe9 vkd3d: Avoid redundant pipeline binds.
When we're using extended dynamic state, we will often end up with dummy
pipeline binds, which we should try to avoid if we can.
Also avoids having to rebind dynamic state redundantly.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 84d9e4b0db vkd3d: Emit vertex buffer sizes even when not using dynamic stride.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 0f91099dd4 vkd3d: Refactor dynamic state to be per-pipeline.
Cleans up dynamic state such that we do not have to keep dynamic state
create infos around.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 5ef3ebce61 vkd3d: Implement extended dynamic state.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen 7bccab7427 debug: Re-introduce different debug channels.
vkd3d-shader is currently kinda buggy and crashes when you try to trace
DXBC. This used to never be run since it was guarded by
VKD3D_SHADER_DEBUG, but with the move to a static build we merged all
debug logging under VKD3D_DEBUG. Reintroduce different debug channels in
a way that is compatible with a statically linked vkd3d.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-10 14:18:15 +02:00
Hans-Kristian Arntzen 337f75b76a vkd3d: Workaround broken MEMORY_READ/WRITE on RADV.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-09 14:50:50 +02:00
Hans-Kristian Arntzen 1341409b88 vkd3d: Implement aliasing barriers.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-09 14:50:50 +02:00
Philip Rebohle fee4781f2b vkd3d: Fix suspended render pass state tracking.
Otherwise, if a render pass gets suspended twice in a row, we
never emit the barrier because render_pass_suspended will be
set to false the second time.

Fixes validation errors in Hitman 2.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-08 17:31:58 +02:00
Hans-Kristian Arntzen cb1da02af9 vkd3d: Fix some warnings.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-06 21:32:16 +02:00
Joshua Ashton 9c105a78a9 vkd3d: Implement swapchain and swapchain factory
Needed for standalone D3D12.

Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-06 19:29:30 +02:00
Joshua Ashton 08544fb938 vkd3d: Use CONST_VTBL instead of const for vtable decls
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-07-03 16:56:10 +02:00
Philip Rebohle e10b9a72e2 vkd3d: Handle views being null in non-bindless descriptor updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-06-29 17:18:29 +02:00
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
Philip Rebohle 5a0ef00d45 vkd3d: Use d3d12_command_list_copy_image for CopyResource as well.
Monster Hunter World uses this to copy between D32 and R32 images.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-22 18:04:29 +02:00
Philip Rebohle 889ab3520f vkd3d: Implement shader-based depth <-> color copies.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-22 18:04:29 +02:00
Philip Rebohle 30e1a49f68 vkd3d: Introduce d3d12_command_list_create_framebuffer.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-22 18:04:29 +02:00
Philip Rebohle e74a48cdc6 vkd3d: Simplify meta operation API a bit.
Passing the main struct to the public functions allows us
to share common data between multiple types of operations.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-22 18:04:29 +02:00
Sveinar Søpler c2e79af6a1 vkd3d: Fix 32-bit compiler warnings
This fixes a couple of 32-bit compiler warnings.

Signed-off-by: Sveinar Søpler <cybermax@dexter.no>
2020-04-21 11:54:59 +02:00
Hans-Kristian Arntzen ca7c027cd1 vkd3d: Replace dummy atomic_fetch_add with atomic loads.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-17 15:46:09 +02:00
Hans-Kristian Arntzen 09af24e69b vkd3d: Avoid vkResetCommandPool if there are pending command buffers.
Works around an app-bug in SotTR, where the command pool is reset before
the command buffer completes.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-17 15:31:38 +02:00
Hans-Kristian Arntzen 334b1cab8d vkd3d: Implement threaded submission queue.
D3D12 supports out-of-order signal and wait. So does Vulkan timeline
semaphores. However, in Vulkan we don't have an infinite amount of
virtual queues. We must potentially map multiple D3D12 queues on top of
Vulkan, which might lead to a deadlock when app attempts to
wait-before-signal if the two queues are mapped to the same physical
Vulkan queue.

In order to solve this, we need to hold back submissions until we know
it is safe to do so. To make this work in practice as simply as possible, each
ID3D12CommandQueue has its own submission thread, which will block on an
ID3D12Fence's pending timeline value for a Wait command. The main reason to use a
submission thread is that resolving this directly in
ID3D12CommandQueue::Signal is extremely tricky and potentially
needs recursively locking queues and fences.

Note that we only block on the pending wait value, not the actual wait
value, so there is no real CPU <-> GPU synchronization here. In the
common case, no submission thread will block.

The added benefit is that submits are async now, so main thread CPU
overhead might slightly decrease.

To play nice with DXGI swapchain, the external entry point for acquiring
the Vulkan queue needs to drain the submission thread and lock it to ensure
submissions happen in order.

Fixes hangs in The Division 1, which makes use of this D3D12 feature.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-17 15:31:38 +02:00
Philip Rebohle 957aec4785 vkd3d: Restore old ClearUnorderedAccessView implementation.
The current code uses D3D12 abstractions to create pipelines but
issues raw Vulkan API calls to actually implement the functionality,
which means the code makes assumptions about the exact descriptor
set layout and push constant layout, which is generally a bad idea
now that we have multiple code paths for root constants etc.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-16 18:03:39 +02:00
Hans-Kristian Arntzen edc614ab2e vkd3d: Remove legacy fence/semaphore path.
Prepares for a rewrite of queue submission, the legacy path is never
run in practice and will likely break in subtle ways.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-04-16 15:31:04 +02:00
Philip Rebohle 5bf266a8ed vkd3d: Check whether root descriptors are defined.
Fixes a crash in Monster Hunter World.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-16 10:29:17 +02:00
Philip Rebohle 0701d87474 vkd3d: Update ID3D12CommandList to ID3D12GraphicsCommandList5.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 14:25:01 +02:00
Philip Rebohle 084f8ed949 vkd3d: Update ID3D12CommandList to ID3D12GraphicsCommandList4.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 10:35:59 +02:00
Philip Rebohle dbeffb0834 vkd3d: Update ID3D12Fence to ID3D12Fence1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-15 10:35:59 +02:00
Philip Rebohle 0c03bbe9b5 vkd3d: Implement ID3D12Device4::CreateCommandList1.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 108ce6409b vkd3d: Update ID3D12CommandList to ID3D12GraphicsCommandList3.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-14 16:27:08 +02:00
Philip Rebohle 4e3ea62e79 vkd3d: Implement depth bounds test.
Used by Resident Evil 2 and 3 if available.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 16:04:39 +02:00
Philip Rebohle 960e6f85fd vkd3d: Support multiple viewports.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 15:57:23 +02:00
Philip Rebohle ae789d9ba8 vkd3d: Pass dynamic state struct to get_or_create_pipeline.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 15:57:23 +02:00
Philip Rebohle 0cc33cb823 vkd3d: Move vertex strides and primitive topology to dynamic_state.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 15:57:23 +02:00
Philip Rebohle d48794408a vkd3d: Refactor dynamic state updates.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 15:39:33 +02:00
Philip Rebohle d8a6d71038 vkd3d: Introduce vkd3d_dynamic_state.
And add a function to (re-)apply dynamic state as necessary. This
will allow us to ignore dynamic state not needed by the pipeline,
and may become necessary if we implement shader-based copies etc.

Currently unused; the following commits will subsequently change
state setting methods over.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 15:39:33 +02:00
Philip Rebohle 6b113bb629 vkd3d: Introduce d3d12_command_list_iface type alias.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-04-01 10:35:40 +02:00
Hans-Kristian Arntzen fce6838870 vkd3d: Fix compilation warning on 32-bit.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-31 17:27:33 +02:00
Hans-Kristian Arntzen 09885f799c vkd3d: Implement stricter checking for timeline semaphores.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-31 12:51:05 +02:00
Hans-Kristian Arntzen 855c59eae5 vkd3d: Implement timeline semaphores.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-31 12:51:05 +02:00
Philip Rebohle 74b1831960 vkd3d: Bind UAV counter address buffer if necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-27 15:04:23 +01:00
Hans-Kristian Arntzen 7c479f6dae vkd3d: Disable index_buffer_strip_cut spam in normal runtime.
Demote this warning to TRACE only.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-25 12:54:44 +01:00
Hans-Kristian Arntzen f7ea9967d0 vkd3d: Use minimum width/height/layer framebuffer.
All attachments must be at least as large as the framebuffer, using a
max operator is not compliant with Vulkan.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-25 11:17:01 +01:00
Philip Rebohle b85852e733 vkd3d: Fix barriers for bindless CBV-as-SSBO.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-23 16:20:38 +01:00
Hans-Kristian Arntzen 71d8f63356 vkd3d: Split descriptor pool allocation based on usage.
Logically split up descriptor pool allocation in three types:
- STATIC: Root descriptors and internal allocation.
- VOLATILE: For packed descriptor set which comes from heaps.
- IMMUTABLE_SAMPLER: For immutable samplers. This should be removed once
  we start allocating sampler sets at sampler creation time.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-18 14:29:03 +01:00
Hans-Kristian Arntzen 291db5581c vkd3d: Fix push constant size check against D3D12_MAX_ROOT_COST.
MAX_ROOT_COST is in terms of number of u32s.

Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-18 14:29:03 +01:00
Philip Rebohle c7af09c68c vkd3d: Allocate descriptor pool space for inline uniform blocks.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 20:49:56 +01:00
Philip Rebohle ada3890211 vkd3d: Write inline uniform block if necessary.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Philip Rebohle e899b96c10 vkd3d: Introduce root signature flag to determine push descriptor usage.
For now this is enbaled based on device capabilities, but future changes
may require this to be disabled for certain root signatures.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-16 13:54:12 +01:00
Hans-Kristian Arntzen fee9b2bb05 vkd3d: Implement RS 1.0 volatile for packed descriptor set.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-11 12:20:00 +01:00
Philip Rebohle 708f26bf40 vkd3d: Only update packed descriptor set if necessary.
When changing tables that only have bindless descriptors,
only update the push constants instead.

Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-11 10:47:58 +01:00
Philip Rebohle 2e18afc7cb vkd3d: Introduce dirty flags for pipeline bindings.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-11 10:47:58 +01:00