Hans-Kristian Arntzen
f792225688
meta: Add compute swapchain pipeline.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-06 11:22:39 +02:00
Hans-Kristian Arntzen
7f7bffcef9
meta: Implement meta for swapchain pipelines.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-06 11:22:39 +02:00
Hans-Kristian Arntzen
b3cdd7d05c
vkd3d: Move vkd3d_view_key to private header.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-06 11:22:39 +02:00
Joshua Ashton
eee64787c7
vkd3d: Keep track of vkd3d_format for resources
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:50:28 +02:00
Joshua Ashton
be2c0c1f1e
include: Remove DECLSPEC_HIDDEN from headers
...
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-10-05 10:44:10 +02:00
Hans-Kristian Arntzen
9d36ab59d6
vkd3d: Add support for a shader debug ring.
...
Will allow replaced shaders to emit debug messages to a buffer.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-29 15:00:36 +02:00
Philip Rebohle
29fe4da015
vkd3d: Remove unused fields from d3d12_desc.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
0450ae9f85
vkd3d: Introduce VKD3D_DESCRIPTOR_FLAG_VIEW.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Philip Rebohle
eb0ada76e8
vkd3d: Remove unused code for descriptor updates.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-29 14:48:26 +02:00
Hans-Kristian Arntzen
250357c998
debug: Integrate automatic RenderDoc capturing.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-22 12:44:18 +02:00
Hans-Kristian Arntzen
adde8947c6
vkd3d: Trace which pipelines are being bound and if they are replaced.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +02:00
Philip Rebohle
dcb03257f9
vkd3d: Implement pipeline library functionality based on VkPipelineCache.
...
This is used extensively by Horizon Zero Dawn, and allows us
to skip the compile screen after the initial first run.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
92b6e71ce4
vkd3d: Factor out pipeline state struct conversion.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
d4f4e34656
vkd3d: Remove pipeline cache from d3d12_device.
...
Unused now, instead we should implement D3D12 caching primitives
correctly and rely on the Vulkan driver otherwise.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Philip Rebohle
0396ee544c
vkd3d: Implement support for cached PSO pipeline state.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +02:00
Hans-Kristian Arntzen
ec441808c8
vkd3d: Emit host memory barrier as needed.
...
There is no resource state associated with this, so emit the barrier at
the end of a command buffer based on trivial tracking.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-02 14:46:12 +02:00
Philip Rebohle
6940716417
vkd3d: Enable VK_AMD_buffer_marker if available.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-28 17:27:05 +02:00
Hans-Kristian Arntzen
e3d2484a49
vkd3d: Rewrite timeline semaphore handling.
...
Need to handle large (> 4G) jumps in timeline value, which is not
supported by all implementations.
There is no good way to handle that, so rewrite and clean up timeline
semaphore handling by separating the timeline into a virtual timeline
(which can rewind and jump around arbitrarely) and a physical timeline
which increments by one each time.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-28 14:13:47 +02:00
Hans-Kristian Arntzen
2d22317f31
vkd3d: Never attempt to use PCI-pinned memory types.
...
These memory types might end up being used as fallback memory types,
which is problematic due to their tiny sizes, and unexpected performance
behavior. Generally, when we want to fallback, we should cleanly fall
back to system memory rather than a different device local type.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-27 12:45:58 +02:00
Philip Rebohle
0d0917508b
vkd3d: Remove VKD3D_DESCRIPTOR_POOL_TYPE_IMMUTABLE_SAMPLER.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
17cf1f69d7
vkd3d: Use global descriptor sets for static samplers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
a862d02c4c
vkd3d: Introduce global descriptor pools for static samplers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
d4bbd4b43e
vkd3d: Add sampler state object to d3d12_device.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Philip Rebohle
a09a0ed86d
vkd3d: Introduce vkd3d_sampler_state.
...
Manages unique static samplers for now, in order to reduce duplicates.
Can be extended to also manage descriptor pools for static samplers in
the future.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +02:00
Hans-Kristian Arntzen
0c1b49d681
vkd3d: Implement OpenExistingHeapFromAddress.
...
Refactors out some common code in d3d12_heap_init.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
6e2b153235
vkd3d: Add host import to allocate_buffer_memory.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Hans-Kristian Arntzen
95b6596d75
vkd3d: Enable VK_EXT_external_memory_host.
...
Needed for OpenExistingHeapFromAddress and friends.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-08-25 11:48:41 +02:00
Philip Rebohle
5a9d132b20
vkd3d: Get rid of descriptor spinlocks.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
9098221f0a
vkd3d: Add sampler map to device.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
6545cb4f7d
vkd3d: Add view map to null resources.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
ff69d59fa6
vkd3d: Add view map to d3d12_resource.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
7785c60a08
vkd3d: Add image parameter to vk_image_view_desc.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
3c9a54cb73
vkd3d: Introduce vkd3d_buffer_view_desc.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
a056922293
vkd3d: Create separate descriptor set layout for host-only pools.
...
D3D12 allows much larger pools to be created for heaps that are not
shader-visible, which some games make use of. Fixes crashes on Nvidia.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
8e4aaeff05
vkd3d: Introduce new descriptor metadata struct.
...
Stores info about where exactly the descriptor is stored in the
Vulkan descriptor pool, and whether we have to worry about an
additional UAV counter descriptor.
This is meant to replace all the other non-static data stored
inside d3d12_desc.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Philip Rebohle
fcc0c4c163
vkd3d: Remove default null image views.
...
We're not using these anywhere because we need formats to be correct
for image views. Buffer views are used for root descriptors and null
UAV counters.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-19 12:54:56 +02:00
Hans-Kristian Arntzen
00618cb2c1
vkd3d: Load VK_LAYER_KHRONOS_validation if we enable debug mode.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-30 17:36:53 +02:00
Hans-Kristian Arntzen
b47dae95e5
vkd3d: Lower MAX_DESCRIPTOR_SETS to 9.
...
We just removed packed set.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-30 11:58:58 +02:00
Philip Rebohle
3364758746
vkd3d: Remove volatile packed descriptor handling.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-30 11:56:24 +02:00
Philip Rebohle
c580866648
vkd3d: Remove packed descriptor set from root signature.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-30 11:56:24 +02:00
Philip Rebohle
fd249acb64
vkd3d: Remove packed descriptor set update code.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-30 11:56:24 +02:00
Philip Rebohle
3766e7e994
vkd3d: Rename BINDLESS_UAV_COUNTERS -> RAW_VA_UAV_COUNTERS.
...
For clarity, since we'll be moving to full bindless anyway.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +02:00
Philip Rebohle
7f36039c9c
vkd3d: Update uav counter set as necessary.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +02:00
Philip Rebohle
949e38e0b3
vkd3d: Add binding for uav counter views.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +02:00
Philip Rebohle
1af4c6c719
vkd3d: Enable VK_EXT_calibrated_timestamps if available.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-17 11:49:38 +02:00
Philip Rebohle
b212b3fb9c
vkd3d: Introduce d3d12_resource_get_vk_subresource.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
Philip Rebohle
def7cf409a
vkd3d: Introduce discard mask for deferred clear operations.
...
Allows us to skip clears while still initializing the image.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-16 16:53:17 +02:00
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
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
0e9a1555c1
vkd3d: Add dynamic state information to vkd3d_pipeline_key.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00