vkd3d/tests
Conor McCarthy 2b71ea406f vkd3d: Back descriptor heaps with Vulkan descriptor sets if descriptor indexing is available.
The existing implementation using virtual descriptor heaps, where Vk
descriptor sets are created for the bindings in the root descriptor tables,
is inefficient when multiple command lists are used with large descriptor
heaps. It also cannot support updating a descriptor set after it is bound.

This patch creates Vk sets for each D3D12 heap. Because D3D12 heaps
can contain CBV, SRV and UAV descriptors in the same heap, multiple Vk sets
are needed for each heap, however the total number of populated descriptors
is never more than (heap size + UAV counter count).

A new 'virtual_heaps' config option is introduced to make the old
implementation available when needed. It's not always possible to determine
if this is necessary when the device is created.

Up to nine Vk descriptor sets may be used. It's theoretically possible to
reduce this to eight by placing immutable samplers in the push descriptor
set layout, but contradictions in earlier versions of the Vulkan spec made
driver support inconsistent. The documentation was corrected in version
1.2.203.

This patch also adds support for UAV counter descriptor arrays. It's not
practical to add this in a separate patch due to complications with
combining the old UAV counter implementation with the new descriptor heap
implementation.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47713
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47154
Signed-off-by: Conor McCarthy <cmccarthy@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-03-18 12:38:53 +01:00
..
.gitignore tests: Add some C HLSL preprocessor tests. 2020-11-24 22:28:11 +01:00
abs.shader_test vkd3d-shader/hlsl: Parse the abs() intrinsic. 2021-09-20 20:53:01 +02:00
arithmetic-float.shader_test tests: Split hlsl-operations into individual test units. 2022-03-08 17:45:11 +01:00
arithmetic-int.shader_test tests: Split hlsl-operations into individual test units. 2022-03-08 17:45:11 +01:00
arithmetic-uint.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
bitwise.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
cast-to-float.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
cast-to-half.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
cast-to-int.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
cast-to-uint.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
conditional.shader_test tests: Import HLSL conditional tests from Wine. 2020-10-01 21:47:55 +02:00
d3d12_crosstest.h tests: Add tests for ID3D12CommandQueue_GetClockCalibration(). 2022-01-14 19:28:11 +01:00
d3d12_invalid_usage.c tests: Move invalid BC1_UNORM buffer view tests to d3d12_invalid_usage. 2019-08-12 09:31:19 +02:00
d3d12_test_utils.h tests: Add a D3D11 shader runner backend. 2022-01-27 18:00:49 +01:00
d3d12.c vkd3d: Back descriptor heaps with Vulkan descriptor sets if descriptor indexing is available. 2022-03-18 12:38:53 +01:00
floor.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
hlsl_d3d12.c vkd3d-shader: Add predefined macros to the macro list. 2021-01-26 21:28:14 +01:00
hlsl-array-dimension.shader_test tests: Use % as the shader_test comment character. 2021-10-05 21:09:16 +02:00
hlsl-bool-cast.shader_test tests: Test casting to and then from bool. 2021-09-08 17:41:19 +02:00
hlsl-clamp.shader_test tests: Use SM1-compatible uniform layouts in shader tests. 2022-03-08 17:45:16 +01:00
hlsl-comma.shader_test tests: Import comma tests from Wine. 2020-10-02 19:04:03 +02:00
hlsl-cross.shader_test vkd3d-shader/hlsl: Implement cross() intrinsic function. 2021-11-22 16:25:05 +01:00
hlsl-duplicate-modifiers.shader_test vkd3d-shader: Allow declarations to specify type modifiers redundant with the type. 2021-06-28 13:43:49 +02:00
hlsl-for.shader_test tests: Test a for loop, with break and continue. 2021-09-15 18:34:58 +02:00
hlsl-function-cast.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
hlsl-function-overload.shader_test tests: Add a simple test for function overloads. 2021-09-08 17:40:40 +02:00
hlsl-function.shader_test tests: Add some simple tests for HLSL function calls. 2022-02-24 18:39:05 +01:00
hlsl-gather-offset.shader_test tests: Add tests for texture gather methods. 2022-01-26 18:36:28 +01:00
hlsl-gather.shader_test tests: Add tests for texture gather methods. 2022-01-26 18:36:28 +01:00
hlsl-initializer-flatten.shader_test tests: Test initializer argument flattening. 2022-02-04 16:46:00 +01:00
hlsl-initializer-invalid-arg-count.shader_test tests: Test invalid number of arguments on initializers. 2022-02-04 16:45:46 +01:00
hlsl-initializer-local-array.shader_test tests: Test array initializers. 2022-02-02 21:06:23 +01:00
hlsl-initializer-nested.shader_test tests: Test nested initializers. 2022-02-04 16:45:52 +01:00
hlsl-initializer-numeric.shader_test vkd3d-shader/hlsl: Fix floating point literals matching. 2022-02-17 21:21:35 +01:00
hlsl-initializer-static-array.shader_test tests: Test array initializers. 2022-02-02 21:06:23 +01:00
hlsl-initializer-struct.shader_test tests: Test struct initializers. 2022-02-04 16:45:43 +01:00
hlsl-intrinsic-override.shader_test tests: Test redefining intrinsic functions. 2022-01-19 22:47:13 +01:00
hlsl-invalid.shader_test vkd3d-shader: Apply type modifiers recursively when cloning a type. 2021-06-28 13:43:52 +02:00
hlsl-majority-pragma.shader_test tests: Import HLSL majority tests from Wine. 2020-10-02 19:04:10 +02:00
hlsl-majority-typedef.shader_test tests: Import HLSL majority tests from Wine. 2020-10-02 19:04:10 +02:00
hlsl-mul.shader_test tests: Test matrix multiplication. 2022-02-14 21:02:05 +01:00
hlsl-nested-arrays.shader_test tests: Add some tests for nested arrays. 2021-03-05 18:00:55 +01:00
hlsl-numeric-constructor-truncation.shader_test tests: Test initialization using a numeric constructor with implicit truncation. 2022-02-04 16:45:55 +01:00
hlsl-numeric-types.shader_test tests: Test support for HLSL vector and matrix types. 2021-11-19 15:20:25 +01:00
hlsl-return-implicit-conversion.shader_test tests: Test implicit conversions for return statements. 2021-11-17 14:17:24 +01:00
hlsl-return-void.shader_test tests: Import HLSL return statement tests from Wine. 2020-10-02 19:04:06 +02:00
hlsl-shape.shader_test tests: Test the shape of the sum of two numeric values. 2021-09-15 18:34:53 +02:00
hlsl-single-numeric-initializer.shader_test tests: Test single numeric initializers. 2022-02-04 16:45:57 +01:00
hlsl-state-block-syntax.shader_test vkd3d-shader/hlsl: Parse state blocks in variable definitions. 2021-10-01 19:32:26 +02:00
hlsl-static-initializer.shader_test vkd3d-shader: Allow static const variables to lack an initializer. 2021-03-22 16:59:18 +01:00
hlsl-storage-qualifiers.shader_test tests: Use SM1-compatible uniform layouts in shader tests. 2022-03-08 17:45:16 +01:00
hlsl-struct-assignment.shader_test tests: Import HLSL struct assignment tests from Wine. 2020-10-05 20:52:46 +02:00
hlsl-struct-semantics.shader_test vkd3d-shader: Avoid using the term "varying" for all semantics. 2021-05-10 18:09:26 +02:00
hlsl-vector-indexing-uniform.shader_test tests: Avoid using non-float uniforms where possible. 2022-03-08 17:45:18 +01:00
hlsl-vector-indexing.shader_test tests: Import vector indexing tests from Wine. 2020-10-01 21:47:57 +02:00
logic-operations.shader_test tests: Split hlsl-operations into individual test units. 2022-03-08 17:45:11 +01:00
math.shader_test tests: Use SM1-compatible uniform layouts in shader tests. 2022-03-08 17:45:16 +01:00
max.shader_test tests: Use SM1-compatible uniform layouts in shader tests. 2022-03-08 17:45:16 +01:00
pow.shader_test tests: Use SM1-compatible uniform layouts in shader tests. 2022-03-08 17:45:16 +01:00
preproc-if-expr.shader_test vkd3d-shader/preproc: Allow capital U and L after integer constants as well. 2022-02-02 21:06:21 +01:00
preproc-if.shader_test tests: Add some basic tests for #if and related preprocessor directives. 2020-11-23 22:07:44 +01:00
preproc-ifdef.shader_test tests: Add some tests for #ifdef and defined(). 2020-11-23 22:07:47 +01:00
preproc-invalid.shader_test tests: Add some tests for shaders which fail to preprocess. 2020-11-24 22:27:59 +01:00
preproc-macro.shader_test tests: Add some tests for macro expansion. 2020-11-24 22:27:53 +01:00
preproc-misc.shader_test tests: Add some more miscellaneous preprocessor tests. 2020-11-24 22:28:05 +01:00
round.shader_test tests: Avoid using non-float uniforms where possible. 2022-03-08 17:45:18 +01:00
sampler-offset.shader_test tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
sampler.shader_test tests: Add a shader test for texture sampling. 2021-11-09 19:56:26 +01:00
saturate.shader_test tests: Avoid using non-float uniforms where possible. 2022-03-08 17:45:18 +01:00
shader_runner_d3d11.c tests: Mark some tests as requiring shader model 4.0. 2022-03-08 17:45:21 +01:00
shader_runner_d3d12.c tests: Use only one heap for textures in the d3d12 shader runner. 2022-03-14 18:26:50 +01:00
shader_runner.c tests: Use only one heap for textures in the d3d12 shader runner. 2022-03-14 18:26:50 +01:00
shader_runner.h tests: Use only one heap for textures in the d3d12 shader runner. 2022-03-14 18:26:50 +01:00
swizzle-0.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-1.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-2.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-3.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-4.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-5.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-6.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
swizzle-7.shader_test tests: Import HLSL swizzle tests from Wine. 2020-10-01 21:47:51 +02:00
texture-load-typed.shader_test tests: Add a test for explicitly typed textures. 2021-10-05 21:09:25 +02:00
texture-load.shader_test tests: Add a test for texture load instructions. 2021-10-05 21:09:20 +02:00
trigonometry.shader_test tests: Import trigonometry tests from Wine. 2020-10-02 19:04:01 +02:00
utils.h tests: Add a D3D11 shader runner backend. 2022-01-27 18:00:49 +01:00
vkd3d_api.c vkd3d: Require VKD3D_API_VERSION_1_2 for version 1.1 root signatures. 2020-06-30 21:05:46 +02:00
vkd3d_common.c vkd3d-common: Move vkd3d_write_mask_is_contiguous() from vkd3d-shader. 2019-07-05 17:52:04 +02:00
vkd3d_shader_api.c vkd3d-shader/sm1: Add support for vkd3d_shader_scan(). 2021-10-06 18:35:46 +02:00
writemask-assignop-0.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00
writemask-assignop-1.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00
writemask-assignop-2.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00
writemask-assignop-3.shader_test tests: Add some tests for fused assignment operations with writemasks. 2021-03-15 20:39:13 +01:00