Philip Rebohle
dd13d44bd5
vkd3d: Use UAV counter address binding from descriptor heap.
...
Instead of binding it via push descriptors at draw time.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-23 12:36:17 +02:00
Philip Rebohle
a76e311c5e
vkd3d: Add UAV counter address buffer to descriptor heap bindings.
...
Introduces 'extra' bindings to bindless sets which can be used to
bind additional storage buffers to the pipeline, which will occur
before the bindless descriptor array in the descriptor set.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-23 12:36:17 +02:00
Philip Rebohle
7e32f833ed
vkd3d: Store binding index in descriptor.
...
Needed for when we add additional descriptors to the bindless
descriptor sets.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-23 12:36:17 +02:00
Hans-Kristian Arntzen
16f09a0ba0
vkd3d: Do not perform any alignment analysis for SSBOs.
...
We cannot rely on alignment analysis since games are buggy and screw up
RAW vs structured on occasion.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-22 13:07:05 +02:00
Hans-Kristian Arntzen
eed4f54a80
vkd3d: Enable SSBO path.
...
For now, don't enable it on NV due to a very likely driver bug.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-21 14:34:37 +02:00
Philip Rebohle
544a6184e9
vkd3d: Enable raw SSBOs for root descriptors on supported hardware.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 16:20:26 +02:00
Philip Rebohle
993cdd254e
vkd3d: Emit resource declarations for raw SSBOs.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
3eac9f9c7d
vkd3d: Introduce vkd3d_bindless_set_flag.
...
This will allow us to use the same bindless descriptor set for
different types of descriptor ranges.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
c097c00167
vkd3d: Explicitly set descriptor types for bindless sets.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
07e6687f6a
vkd3d: Rework descriptor set lookup.
...
This is no longer performance-critical, so in order to simplify changing
the binding model, remove hard-coded descriptor set numbers and instead
look them up based on the requested descriptor properties.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Philip Rebohle
b82bbe265e
vkd3d: Pass storage buffer alignment to shader compiler.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-10-16 14:24:36 +02:00
Hans-Kristian Arntzen
f1818c267f
vkd3d: Fix menu regression in RE2.
...
If rendering to A8 format, do not apply output swizzle in non-PS stages.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-14 10:46:46 +02:00
Hans-Kristian Arntzen
f0f1ca161f
vkd3d: Always pass down compiler args.
...
Needed for all stages since typed UAV read can happen in all stages.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-12 14:55:24 +02:00
Hans-Kristian Arntzen
9c04f35757
vkd3d: Fix validation error when render pass is used without attachment.
...
Just drop the VkSubpassDependency in this case to satisfy the validator,
since stages == 0 is not allowed.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-10-07 17:43:53 +02:00
Joshua Ashton
3c54cf8ad6
vkd3d: Use VK_NULL_HANDLE instead of NULL for VkPipelineCache
...
Fixes a warning in MSVC.
Signed-off-by: Joshua Ashton <joshua@froggi.es>
2020-09-30 01:44:50 +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
Hans-Kristian Arntzen
1ce14c2ef3
vkd3d: Remove bindless CBV workaround.
...
Not relevant anymore, and should see good uplift on NV depending on
content.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-11 16:54:00 +02:00
Hans-Kristian Arntzen
52ecd35dee
vkd3d: Set shader module name to the hash.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-09-08 15:03:41 +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
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
15ed944e40
vkd3d: Implement ID3D12PipelineState::GetCachedBlob.
...
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
Philip Rebohle
2b885c4981
vkd3d: Move ID3D12PipelineLibrary imlpementation to separate file.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-09-08 12:31:32 +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
d4f13b755f
vkd3d: Use new global sampler state for static samplers.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-08-26 14:56:17 +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
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
2cd23f5305
vkd3d: Require bindless samplers and SRV/UAV/CBV.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-30 11:56:24 +02:00
Philip Rebohle
d0f64cfbb7
vkd3d: Always use bindless UAV counters if UAVs are bindless.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +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
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
40764d82ef
vkd3d-shader: Introduce VKD3D_SHADER_BINDING_FLAG_RAW_VA.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-07-29 15:23:25 +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
69fdd87aa0
vkd3d: Add more debug logging when we fall back.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
d8ba75e160
vkd3d: Use strip type by default when using primitive restart.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
e9dcdc1308
vkd3d: Move vkd3d_pipeline_key to private header.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
5968d28e75
vkd3d: Refactor out dynamic stride checks to its own function.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
10d6823e34
vkd3d: Do not attempt to create a pipeline with invalid DS format.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
2e57b3d27e
vkd3d: Do not attempt to create pipelines with unknown topology type.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
6967576904
vkd3d: Statically deduce patch vertex count for HS.
...
Fall back when there is a mismatch, which can happen if application does
not declare inputs to hull shader (unlikely).
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
084a3e6928
vkd3d: Validate minimum vertex buffer stride when using dynamic stride.
...
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
7139621c3f
vkd3d: Add conversion for topology type to Vulkan.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
85f8a6ac7c
vkd3d: Add helper to check if topology type can use primitive restart.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
551bc54546
vkd3d: Add topology type to pipeline state.
...
Needed to build dynamic pipeline.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
fc0a94ad04
vkd3d: Add a common pipeline for graphics pipeline state.
...
When using EXT_extended_dynamic_state, we will be able to compile a
master pipeline. Only in special cases will we have to fallback.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
b52a9c46bd
vkd3d: Refactor graphics pipeline creation out to separate function.
...
Preparation for extended dynamic state refactor.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 14:29:34 +02:00
Hans-Kristian Arntzen
9425b4d438
vkd3d: Bump VKD3D_MAX_DESCRIPTORS_SETS to 9.
...
This can happen in the worst case where we have all bindless sets, and:
- Static samplers
- Packed descriptors (UAV counters on drivers without support for this)
- Root descriptors
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-07-14 10:08:38 +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