Philip Rebohle
3f125ac919
vkd3d: Temporarily require VK_KHR_push_descriptor.
...
Allows us to more easily refactor root signature-related code
without having to worry about root descriptors for now.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
0d071c9c37
vkd3d: Rename root signature descriptor set layout members.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
287f4e525b
vkd3d: Remove some useless null pointer checks in d3d12_root_signature_cleanup.
...
All vkDestroy* functions are defined to perform no operation when passed
a null handle. vkd3d_free should follow regular free semantics.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
5e8821d561
vkd3d: Clean up root signature descriptor counting.
...
Removes some unused counters and repurposes the existing ones to
differentiate between bindings (i.e. the array passed to the shader
compiler) and packed descriptors.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
7c276f5e82
vkd3d: Rework root constant updates.
...
Fixes an issue where push constants can be invalidated by
shader-based clear/copy commands.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
0eed8a1080
vkd3d: Rework root constants.
...
Uses one push constant range with VK_SHADER_STAGE_ALL. This
will allow us to easily add descriptor table offsets as push
constants.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
aff849e7f4
vkd3d: Add helpers to iterate over 64-bit masks.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 11:44:45 +01:00
Philip Rebohle
5700b37aa4
vkd3d-shader: Work around games not declaring bindings properly.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
a7fbb728ec
vkd3d-shader: Apply NonUniformEXT decorations to resources as needed.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
d92d2af986
vkd3d-shader: Parse NonUniform operand modifier.
...
This modifier can be applied to both destination and source
operands, so for the sake of simplicity and to avoid having
to pass down modifier information explicitly, just store this
state with the register.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
1c9b07e8b3
vkd3d-shader: Scan multi-register descriptor ranges properly.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
ffaa31e1d9
vkd3d-shader: Implement bindless sampler declarations and indexing.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
6f20fcc488
vkd3d-shader: Implement bindless resource indexing.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
6c4a476318
vkd3d-shader: Implement bindless resource declarations.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
ade87e6c47
vkd3d-shader: Add push constants for descriptor table offsets.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
4218009e79
vkd3d-shader: Add helpers to declare runtime arrays.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Philip Rebohle
34e128897d
vkd3d-shader: Pass more info from root signature to shader compiler.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-10 10:55:24 +01:00
Hans-Kristian Arntzen
ae2a2bdbe8
vkd3d: Fix DXIL check in test_coverage.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-06 17:15:38 +01:00
Philip Rebohle
598afec8ea
vkd3d: Create NULL sampler.
...
Defaults taken from D3D11.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-05 13:03:44 +01:00
Philip Rebohle
8fc2fb9842
vkd3d: Create NULL buffer and image views.
...
An upcoming change to the binding model will use these to
initialize descriptors that have the wrong resource type
bound, or were left uninitialized by the application.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-05 13:03:44 +01:00
Philip Rebohle
0ecce2ec2f
vkd3d: Use different formats for UAVs than for SRVs.
...
Otherwise we might run into undefined behaviour if an app
tries to read a NULL UAV or perform atomic operations.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-05 13:03:44 +01:00
Hans-Kristian Arntzen
92724ce15c
vkd3d: Attempt to create a Vulkan 1.1 instance and device.
...
Need this to support subgroup operations for SM 6.0.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-03-05 11:03:01 +01:00
Philip Rebohle
dfa208f909
vkd3d: Remove d3d12_command_list_invalidate_bindings.
...
The primary purpose of this function was to invalidate UAV
counters upon binding a pipeline. This is no longer an issue
and we don't have any other per-pipeline bindings, so this
function can be dropped.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-03 20:58:46 +01:00
Philip Rebohle
f3d89a548a
vkd3d: Reintroduce UAV counters.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Philip Rebohle
324da790db
vkd3d-shader: Simplify UAV counter interface declaration.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Philip Rebohle
0689d8396d
vkd3d-shader: Change the way UAV bindings are tracked.
...
Makes UAV-related code more readable and supports up to 64
UAV bindings, which is enough to support resource binding
tier 2.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Philip Rebohle
0dab14ed22
vkd3d: Temporarily drop UAV counter support.
...
This needs a major rework as the current implementation has bugs,
is hard to reason about, and very hard to maintain as we're about
to make major changes to the binding model as a whole.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-03-02 12:16:30 +01:00
Hans-Kristian Arntzen
f015da5e56
vkd3d-shader: Add entry point to query if DXIL is supported.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-29 14:11:57 +01:00
Hans-Kristian Arntzen
d1f44ad39b
vkd3d: Add dxil-spirv to autoconf
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-29 14:11:57 +01:00
Hans-Kristian Arntzen
3ebe2eb527
vkd3d-shader: Expose debug shader dumping in private header.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-27 19:46:30 +01:00
Hans-Kristian Arntzen
4928f9c094
vkd3d-shader: Add path for debug dumping SPIR-V as well.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-27 19:46:30 +01:00
Hans-Kristian Arntzen
0f971790e6
vkd3d-shader: Attempt to parse ISG1 as well when parsing input signatures.
...
DXIL blobs use ISG1.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-27 15:20:10 +01:00
Hans-Kristian Arntzen
4a9ab29903
vkd3d-shader: Add helper function to query if a blob is DXIL.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-27 15:20:10 +01:00
Hans-Kristian Arntzen
edd4c990ed
vkd3d-shader: Move vkd3d_find_shader into private header.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-27 15:20:10 +01:00
Philip Rebohle
82f9f76931
vkd3d-shader: Rework SPIR-V extension enablement.
...
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-27 10:30:34 +01:00
Philip Rebohle
7cccf5756a
vkd3d-shader: Rework SPIR-V capability enablement.
...
We're going to need more capabilities outside the 0-63 range
going forward, so a bitmask doesn't cut it and adding extra
struct members for each capability seems excessive.
Signed-off-by: Philip Rebohle <philip.rebohle@tu-dortmund.de>
2020-02-27 10:30:34 +01:00
Hans-Kristian Arntzen
b04c2361e2
vkd3d: Add test for bindless samplers.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:33 +01:00
Hans-Kristian Arntzen
687b072b16
vkd3d: Upgrade SRV bindless test to include textures.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:33 +01:00
Hans-Kristian Arntzen
7c10922aac
vkd3d: Add bindless test where root parameter space is exhausted.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:33 +01:00
Hans-Kristian Arntzen
abb2ef8572
vkd3d: Add test for bindless SRV buffers in SM 5.1.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:33 +01:00
Hans-Kristian Arntzen
1da8ee9f86
vkd3d: Remove obsolete FIXME for immutable samplers with register space.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:05 +01:00
Hans-Kristian Arntzen
fe1d958802
vkd3d: Add static sampler to SM 5.1 register space test.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 20:50:05 +01:00
Hans-Kristian Arntzen
fd33aee854
vkd3d: Don't crash if SM 6.0 is not supported in constant buffer test.
...
Something must have gone wrong in rebase.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 13:00:48 +01:00
Hans-Kristian Arntzen
0c241ff54f
vkd3d: Fix regression with UAV counters.
...
Need to report back actual bindings, not 0/0.
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 13:00:10 +01:00
Hans-Kristian Arntzen
d638a60776
vkd3d: Add DXIL test for vertex ID.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 10:19:46 +01:00
Hans-Kristian Arntzen
c534737a3f
vkd3d: Add DXIL test for instance_id.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 10:19:46 +01:00
Hans-Kristian Arntzen
2ef0e43dce
vkd3d: Add DXIL test for eval attribute.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 10:19:46 +01:00
Hans-Kristian Arntzen
827adfc5c5
vkd3d: Add DXIL test for combined ClipCull.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 10:19:46 +01:00
Hans-Kristian Arntzen
aae5564f4d
vkd3d: Add DXIL test for clip distance.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 10:19:46 +01:00
Hans-Kristian Arntzen
965a82c22d
vkd3d: Add DXIL test for rasterizer sample count.
...
Signed-off-by: Hans-Kristian Arntzen <post@arntzen-software.no>
2020-02-26 10:19:46 +01:00