Stefan Dösinger
26387e1d4b
tests: Add CreateShaderCacheSession pointer clearing tests.
...
Native's behavior is inconsistent. It sets the pointer to NULL when it
fails to open an existing cache due to a version mismatch, but leaves
the pointer untouched when the description fails validation.
2024-04-10 08:54:56 -05:00
Giovanni Mascellani
0be29f78c0
tests: Pop the test context when leaving its scope.
2024-04-10 08:54:51 -05:00
Giovanni Mascellani
7cfb02cfd3
tests: Skip some tests that crash on llvmpipe.
2024-04-10 08:54:50 -05:00
Giovanni Mascellani
0b2ce5c13a
tests: Mark some test failures as todo on llvmpipe.
2024-04-10 08:54:50 -05:00
Zebediah Figura
083a58767a
tests: Test HLSL unbounded array syntax.
...
Change the shader in test_unbounded_samplers() to also test a nested array.
Note that the changed shader compiles to the same bytecode.
2024-04-09 12:27:49 -05:00
Henri Verbeet
4f589356f1
tests: Free the shader blobs once we're done with them in test_create_pipeline_state(). (Valgrind).
2024-04-04 22:20:35 +02:00
Stefan Dösinger
8653ce17cf
tests: Add tests for creating D3D12ShaderCacheSession objects.
2024-04-04 22:19:46 +02:00
Henri Verbeet
46bd3b1545
tests: Initialise resource_desc1.Layout in test_get_copyable_footprints() (Valgrind).
2024-04-02 23:10:18 +02:00
Zebediah Figura
a686fa7750
tests: Use a UAV barrier between ClearUnorderedAccessViewFloat() and a compute shader.
...
In an attempt to fix test failures on radv.
2024-03-13 21:50:31 +01:00
Giovanni Mascellani
dff22c9ed7
tests: Clear the UAV before testing.
...
There is no guarantee that a resource is cleared upon creation. This
fixes the test on NVIDIA and llvmpipe.
2024-03-11 22:10:15 +01:00
Giovanni Mascellani
0c63824d9f
tests: Mark the coverage test as buggy on MoltenVK.
...
Apparently MoltenVK doesn't set the SampleMask built-in to the
fragment coverage mask.
2024-03-11 22:10:13 +01:00
Giovanni Mascellani
cf816a255c
tests: Pop the test context when leaving its scope.
2024-03-11 22:10:13 +01:00
Giovanni Mascellani
f6fe9a39db
tests: Mark the HS punned array test as buggy on MoltenVK.
...
MoltenVK doesn't support the Component decoration on tessellation
shaders.
2024-03-11 22:10:10 +01:00
Conor McCarthy
4dafd6bedf
vkd3d: Implement GetCopyableFootprints1().
2024-03-08 23:36:08 +01:00
Conor McCarthy
197f16efa9
vkd3d: Implement CreatePlacedResource1().
2024-03-08 23:36:08 +01:00
Conor McCarthy
e5ae6bd3c2
vkd3d: Implement CreateCommittedResource2().
2024-03-08 23:36:08 +01:00
Conor McCarthy
6edba86a26
vkd3d: Implement GetResourceAllocationInfo2().
2024-03-08 23:36:08 +01:00
Conor McCarthy
2ed36efcb5
tests/d3d12: Add tests for GetCopyableFootprints1().
2024-03-08 23:36:06 +01:00
Conor McCarthy
9987b519a2
tests/d3d12: Add tests for CreatePlacedResource1().
2024-03-08 23:36:05 +01:00
Conor McCarthy
c09ae2c93f
tests/d3d12: Add tests for CreateCommittedResource2().
2024-03-08 23:36:04 +01:00
Conor McCarthy
81a4dbe52d
tests/d3d12: Add tests for GetResourceAllocationInfo2().
2024-03-08 23:36:02 +01:00
Conor McCarthy
13143700b7
tests/shader-runner: Add raw UAV tests.
2024-03-06 23:04:11 +01:00
Conor McCarthy
99947deeb7
tests/d3d12: Add a test for zero description count in test_resource_allocation_info().
2024-02-15 23:29:32 +01:00
Conor McCarthy
4668271872
vkd3d: Return DXGI_ERROR_NOT_FOUND from GetProtectedResourceSession().
2024-02-15 23:29:32 +01:00
Conor McCarthy
e38f3995fd
tests/d3d12: Add tests for GetProtectedResourceSession().
2024-02-15 23:29:30 +01:00
Conor McCarthy
eae4b7b4a2
vkd3d: Implement GetResourceAllocationInfo1().
2024-02-01 22:25:13 +01:00
Conor McCarthy
67b4ae658a
tests/d3d12: Add tests for GetResourceAllocationInfo1().
2024-02-01 22:25:12 +01:00
Conor McCarthy
7e84421b9c
vkd3d: Support multiple descriptions in GetResourceAllocationInfo().
2024-02-01 22:25:11 +01:00
Conor McCarthy
8d0331df6c
tests/d3d12: Test multiple descriptions in test_resource_allocation_info().
2024-02-01 22:25:10 +01:00
Evan Tang
13ac795061
tests/shader-runner: Support testing for integer pixel data.
...
Modified by Conor McCarthy to use read_uint() and read_uint4().
2024-02-01 22:24:54 +01:00
Giovanni Mascellani
fd7d23f64b
tests: Mark a strip cut test as buggy in MoltenVK.
...
Metal, and therefore MoltenVK, doesn't support disabling primitive
restart.
2024-01-25 22:25:05 +01:00
Giovanni Mascellani
c5469c85e8
tests: Mark a depth sampling test as buggy on MoltenVK.
...
MoltenVK seems to be unable to handle tight inequalities (i.e.,
0.5 <= 0.5) properly on 16 bit depth resources.
2024-01-25 22:25:03 +01:00
Giovanni Mascellani
b6c1e6dcdf
tests: Mark the tessellation pipeline as buggy on MoltenVK.
2024-01-25 22:25:03 +01:00
Giovanni Mascellani
74a14dad28
tests: Mark geometry shaders as buggy on MoltenVK.
2024-01-25 22:25:03 +01:00
Giovanni Mascellani
586ebeafec
tests: Mark ReadFromSubresource() and WriteToSubresource() as todo on MoltenVK.
2024-01-25 22:25:03 +01:00
Giovanni Mascellani
17f3f2914e
tests: Mark a test related to instanced draws as buggy on MoltenVK.
...
I haven't been able to understand what's happening here exactly,
but it doesn't look like we're generating bad Vulkan calls.
2024-01-25 22:25:01 +01:00
Giovanni Mascellani
d304422a34
tests: Mark count buffers as buggy on MoltenVK.
...
They require Vulkan indirect draw count extension.
2024-01-24 22:38:28 +01:00
Giovanni Mascellani
5d4edba925
tests: Mark a timestamp query test as buggy on MoltenVK.
...
The generated Vulkan calls look right and do not trigger any
validation error, but the returned timestamp is 0. A valid
timestamp is returned if the CopyResource() call is commented,
or the second EndQuery() call is moved before CopyResource(),
or the first EndQuery() call is commented. I am not seeing any
sensible pattern here, so I guess there is just a bug in
MoltenVK.
2024-01-24 22:38:26 +01:00
Giovanni Mascellani
66cd2af188
tests: Mark clip distance as unsupported on MoltenVK.
...
At least for tessellation and geometry shaders.
2024-01-24 22:38:23 +01:00
Giovanni Mascellani
9a83e568b4
tests: Mark cull distance as buggy on MoltenVK.
...
The generated MSL code is not accepted by the Metal runtime, and
it looks wrong anyway.
2024-01-24 22:38:19 +01:00
Giovanni Mascellani
60e0246436
tests: Skip unbounded descriptor ranges tests when they're unsupported.
...
They are unsupported if the Vulkan descriptor indexing extension
is not available; on MoltenVK it is known to be buggy, so it is
disabled.
2024-01-24 22:38:18 +01:00
Giovanni Mascellani
711ce4e65d
tests: Mark loading from stencil as buggy on MoltenVK.
...
Specifically, MoltenVK seems to be able to load from stencil, but
the specific replicating swizzle (repeating the stencil value on
all the channels) is not honored. The stencil value is read only
on the red channel.
2024-01-24 22:38:15 +01:00
Giovanni Mascellani
72e2eeaf14
tests: Add a test for SV_ViewportArrayIndex.
2024-01-22 22:19:16 +01:00
Giovanni Mascellani
bd84b96e9f
tests: Use test utils to create the pipeline state in test_ps_layer().
2024-01-22 22:19:16 +01:00
Giovanni Mascellani
245cce02bd
tests: Test using SV_RenderTargetArrayIndex in the vertex shader.
2024-01-22 22:19:16 +01:00
Giovanni Mascellani
5ddf745d95
tests: Compile HLSL shaders at runtime in test_ps_layer().
2024-01-22 22:19:15 +01:00
Conor McCarthy
ca7487a56d
vkd3d-shader/spirv: Handle UINT32_MAX result from FIRSTBIT_HI and FIRSTBIT_SHI instructions.
2024-01-22 22:18:27 +01:00
Conor McCarthy
62e15dac8d
tests/d3d12: Add a raw firstbit test to test_shader_instructions().
2024-01-22 22:18:25 +01:00
Conor McCarthy
83851133c5
vkd3d-shader/ir: Set merged signature element interpolation mode only from used elements.
2024-01-18 23:15:27 +01:00
Conor McCarthy
759362b527
tests: Test an interpolated PS input where component x is unused.
...
FXC does not emit an interpolation mode for unused elements.
2024-01-18 23:15:26 +01:00
Conor McCarthy
4c30b23821
vkd3d-shader: Make the control point count the outer dimension of I/O arrays.
...
The relative-addressed case in shader_register_normalise_arrayed_addressing()
leaves the control point id in idx[0], while for constant register
indices it is placed in idx[1]. The latter case could be fixed instead,
but placing the control point count in the outer dimension is more
logical.
2024-01-17 22:28:59 +01:00
Conor McCarthy
b8561d6fd2
tests: Test punned array access in patch constant functions.
...
The FXC optimiser sometimes converts a local array of input values into
direct array addressing of the inputs, which can result in a
dcl_indexrange instruction spanning input elements with different masks.
2024-01-17 22:28:58 +01:00
Conor McCarthy
c5bc28b454
tests/d3d12: Test vector parameter for countbits() and firstbithigh() in test_shader_instructions().
2024-01-15 19:56:36 +01:00
Giovanni Mascellani
90bcc6691d
tests: Mark resource arrays as buggy on MoltenVK.
...
They require Vulkan descriptor indexing extension, which is
exposed by MoltenVK but known to be buggy, so we assume it is
disabled.
2024-01-08 21:44:58 +01:00
Giovanni Mascellani
a610ccaed9
tests: Mark predicated rendering as buggy on MoltenVK.
...
It requires Vulkan conditional rendering extension.
2024-01-08 21:44:56 +01:00
Giovanni Mascellani
54514ba7dd
tests: Mark streaming output as buggy on MoltenVK.
...
It requires Vulkan transform feedback extension.
2024-01-08 21:44:55 +01:00
Giovanni Mascellani
1cc2ccaf98
tests: Mark some sampling tests as buggy on MoltenVK.
...
Apparently Metal doesn't support specifying a bias directly in the
sampler, and, with "nearest" mip filtering, it doesn't switch
precisely at LOD 0.5 (though still between 0.5 and 0.6).
2024-01-08 21:44:53 +01:00
Giovanni Mascellani
9c9b1fadbd
tests: Use a uint target for rendering uint data.
...
This fixes a failure in MoltenVK.
2024-01-08 21:44:50 +01:00
Stefan Dösinger
b0d1fb0bd7
tests: Show that CreatePipelineState also doesn't reuse duplicate objects.
2023-12-07 21:57:45 +01:00
Stefan Dösinger
1eaf7fa37b
tests: Show that compute pipeline state objects are not reused.
2023-12-07 21:57:45 +01:00
Stefan Dösinger
82a3209ee2
tests: Show that graphics pipeline state objects are not reused.
2023-12-07 21:57:45 +01:00
Stefan Dösinger
705cf10626
tests: Show that creating identical root signatures returns the same pointer.
2023-12-07 21:57:45 +01:00
Zebediah Figura
fcd6ec33bd
tests: Avoid shadowing "l" in test_get_copyable_footprints().
...
Found with -Wshadow.
2023-12-07 21:57:18 +01:00
Alistair Leslie-Hughes
5c134d44d6
include: D3D12_RT_FORMAT_ARRAY remove typedef to make header compatible with windows.
...
windows d3d12.idl doesn't have this as a typedef.
2023-11-28 00:09:20 +01:00
Conor McCarthy
63b8972b0e
tests: Test CreatePipelineState().
...
Based on vkd3d-proton patches by Hans-Kristian Arntzen and Philip
Rebohle.
2023-11-15 21:48:44 +01:00
Conor McCarthy
130e7bdf0f
tests/shader-runner: Add tests for 64-bit casts.
2023-11-15 21:48:33 +01:00
Nikolay Sivov
41a72a4eae
tests: Fix some spelling mistakes.
2023-11-13 23:19:14 +01:00
Zebediah Figura
0805ce121e
tests: Add more semantics to test_nop_tessellation_shaders().
...
To act as a regression test for 852eefc01d
.
2023-11-08 22:49:51 +01:00
Giovanni Mascellani
eaf35c394d
tests: Skip test_atomic_instructions() on WARP.
...
Pipeline creation fails with E_INVALIDARG, atomics are likely not
supported on WARP.
2023-10-16 22:36:52 +02:00
Giovanni Mascellani
0d4a5f1860
tests: Skip test_unbounded_resource_arrays() on WARP.
...
Most reads on WARP are off by a few units. I haven't investigated
the reason.
2023-10-16 22:36:50 +02:00
Giovanni Mascellani
fe88dafdbd
tests: Skip test_execute_indirect() on WARP.
...
The device is eventually lost, indirect commands are likely not
supported on WARP.
2023-10-16 22:36:49 +02:00
Giovanni Mascellani
ee3c4b6555
tests: Skip test_get_copyable_footprints() on WARP.
...
There are 12025 failures with WARP. I haven't investigated them.
2023-10-16 22:36:47 +02:00
Giovanni Mascellani
d72e30f1d1
tests: Skip test_null_vbv() on WARP.
...
On WARP 0xffffffff is read instead of zero.
2023-10-16 22:36:45 +02:00
Giovanni Mascellani
14c9be697f
tests: Acknowledge some double operations being broken on WARP.
2023-10-16 22:36:45 +02:00
Giovanni Mascellani
3f87cf9d7f
tests: Acknowledge WARP giving a GPU handle to a non-shader-visible descriptor heap.
...
WARP has no GPU, so it probably treats GPU handles just like CPU handles.
2023-10-16 22:36:43 +02:00
Giovanni Mascellani
862dcf27a6
tests: Acknowledge WARP accepting some unusual CreateCommittedResource() configuration.
...
A software implementation can conceivably satisfy some requests that
cannot work on real hardware.
2023-10-16 22:36:41 +02:00
Nikolay Sivov
9c6c7cb78f
vkd3d: Add partial implementation for CreateCommittedResource1().
2023-10-10 22:11:46 +02:00
Nikolay Sivov
6ba75fd92f
vkd3d: Add partial implementation for CreateHeap1().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-09 21:58:07 +02:00
Conor McCarthy
39be40ce94
tests: Destroy the test context in test_readback_map_stability().
2023-10-02 22:25:10 +02:00
Henri Verbeet
5503a025d9
tests: Add some missing vkd3d_test_pop_context() calls to test_shader_instructions().
2023-09-28 23:13:04 +02:00
Giovanni Mascellani
4374d45655
tests: Work around a MoltenVK bug in test_tgsm().
2023-09-26 22:07:43 +02:00
Giovanni Mascellani
ca05e57e67
tests: Mark a bug as resolved on Mesa.
2023-09-22 11:06:57 +02:00
Giovanni Mascellani
d640b213b2
tests: Do not crash if the render target doesn't support MSAA 8.
...
This currently happens on MoltenVK.
2023-09-22 11:06:50 +02:00
Giovanni Mascellani
6dfdbb5c26
tests: Do not crash if a pipeline statistics query heap cannot be created.
...
This currently happens on MoltenVK.
2023-09-22 11:06:44 +02:00
Giovanni Mascellani
d742770499
tests: Compile HLSL shaders at runtime in test_draw_depth_only().
2023-09-22 11:06:41 +02:00
Giovanni Mascellani
4557ad36b0
tests: Compile HLSL shaders at runtime in test_draw_depth_no_ps().
2023-09-22 11:06:41 +02:00
Giovanni Mascellani
b7c951ba78
tests: Compile HLSL shaders at runtime in test_scissor().
2023-09-22 11:06:41 +02:00
Giovanni Mascellani
15c5ef5bb5
tests: Compile HLSL shaders at runtime in test_fractional_viewports().
2023-09-22 11:06:40 +02:00
Giovanni Mascellani
61b403a032
tests: Compile HLSL shaders at runtime in test_unknown_dsv_format().
2023-09-13 23:11:04 +02:00
Giovanni Mascellani
264ff9e2da
tests: Compile HLSL shaders at runtime in test_unknown_rtv_format().
2023-09-13 23:11:04 +02:00
Giovanni Mascellani
b1cae0dd1e
tests: Compile HLSL shaders at runtime in test_multiple_render_targets().
2023-09-13 23:11:04 +02:00
Giovanni Mascellani
f7354ff9e3
tests: Compile HLSL shaders at runtime in test_create_compute_pipeline_state().
2023-09-13 23:11:04 +02:00
Evan Tang
f374934281
tests: Test CopyResource depth to color.
2023-08-24 21:43:59 +02:00
Conor McCarthy
1e178efa01
tests/d3d12: Add tests for GetResourceTiling().
...
Based on vkd3d-proton patches by Philip Rebohle and
Hans-Kristian Arntzen.
2023-07-31 21:07:56 +09:00
Conor McCarthy
31ff1fa9b6
tests: Test releasing the command signature immediately after use.
...
D3D12 docs are silent on a required lifetime and immediate release
works in Windows.
2023-07-24 22:40:54 +02:00
Conor McCarthy
9014183100
vkd3d: Return a null handle from GetGPUDescriptorHandleForHeapStart() for non-shader-visible heaps.
2023-07-20 22:33:17 +02:00
Conor McCarthy
981034e6e4
tests: Test GetGPUDescriptorHandleForHeapStart() on a non-shader-visible heap.
2023-07-20 22:33:07 +02:00
Conor McCarthy
6835e8176f
vkd3d-shader/ir: Normalise signatures and input/output registers to the Shader Model 6 pattern.
...
In Shader Model 6 each signature element can span a range of register
indices, or 'rows', and system values do not share a register index with
non-system values. Inputs and outputs are referenced by element index
instead of register index. This patch merges multiple signature elements
into a single element under the following conditions:
- The register index in a load or store is specified dynamically by
including a relative address parameter with a base register index. The
dcl_index_range instruction is used to identify these.
- A register declaration is split across multiple elements which declare
different components of the register.
- A patch constant function writes tessellation factors. These are an
array in SPIR-V, but in SM 5.x each factor is declared as a separate
register, and these are dynamically indexed by the fork/join instance
id. Elimination of multiple fork/join phases converts the indices to
constants, but merging the signature elements into a single arrayed
element matches the SPIR-V output.
All references to input/output register indices are converted to element
indices. If a relative address is present, the element index is moved up
a slot so it cannot be confused with a constant offset. Existing code
only handles register index relative addressing for tessellation factors.
This patch adds generic support for it.
2023-05-24 22:00:29 +02:00
Nikolay Sivov
f470c00453
tests: Add support for UAV buffers to d3d12 runner.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-22 22:03:36 +02:00
Nikolay Sivov
74c0ad0a7a
tests: Rename readback helper to be more generic.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-22 22:03:28 +02:00