Commit Graph

74 Commits

Author SHA1 Message Date
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
Nikolay Sivov
214d44fb11 tests: Add [effect] section support.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:45 +01:00
Giovanni Mascellani
0dc40d7c1e tests: Skip processing resources according to [require] directives. 2023-10-18 20:58:19 +02:00
Henri Verbeet
803e5183cc tests: Specify argument types for dxcompiler_create(). 2023-10-17 22:18:36 +02:00
Giovanni Mascellani
c1de65a99b tests: Fail if dxcompiler is not available at runtime. 2023-10-16 22:36:17 +02:00
Conor McCarthy
57280673e5 tests/shader-runner: Test shaders with dxcompiler.
The location of dxcompiler should be set during configuration with
'DXCOMPILER_LIBS=-L/path/to/dxcompiler', and then at runtime with
LD_LIBRARY_PATH, WINEPATH or PATH as applicable.

A new 'fail(sm<6)' decoration is needed on many shader declarations
because dxcompiler succeeds on many shaders which fail with fxc. The
opposite case is less common and is flagged with 'fail(sm>=6)'. A few
tests cause dxcompiler to crash or hang, so these are avoided using
[require], which now skips tests until reset instead of exiting. Also,
'todo(sm<6)' and 'todo(sm>=6)' are used to separate checking of results.
2023-10-11 22:21:14 +02:00
Conor McCarthy
d211160b89 tests/shader-runner: Replace immediate shader type strings with an enum. 2023-10-11 22:21:14 +02:00
Conor McCarthy
0ef0735999 tests/shader-runner: Do not exit if a 'require' directive is not met.
Tests are skipped until the next 'require' directive, which restores
the defaults before the new requirements are read.
2023-10-11 22:21:14 +02:00
Conor McCarthy
192f4dcb2b tests/shader-runner: Handle individual keywords in shader directives.
Matching all possible combinations of keywords becomes too complex
if more keywords are added.
2023-10-11 22:21:14 +02:00
Nikolay Sivov
269747dbf3 tests: Enable compiler backwards compatibility mode only for shaders that require it.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-28 20:40:06 +02:00
Nikolay Sivov
01faf6ad9e tests: Add test file syntax to specify compiler options.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-07-24 22:41:09 +02:00
Francisco Casas
ab37b27a7d tests: Pass D3DCOMPILE_ENABLE_BACKWARDS_COMPATIBILITY when compiling with the shader-runner. 2023-07-17 22:55:43 +02:00
Nikolay Sivov
a4ebde202a tests: Add support for UAV buffers in Vulkan runner.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-22 22:03:28 +02:00
Zebediah Figura
4ec60707e2 tests: Add a test for sampling from nonzero mipmap levels. 2023-05-08 20:24:15 +02:00
Zebediah Figura
c940486a89 tests/shader_runner: Add support for creating mipmapped textures. 2023-05-08 20:24:15 +02:00
Zebediah Figura
3cce4e70e9 tests: Test bool semantics. 2023-05-01 22:18:33 +02:00
Francisco Casas
627678a632 tests: Map unindentified hrs on compilation. 2023-05-01 22:18:17 +02:00
Francisco Casas
9cc1c7fe9d tests: Allow invalid vertex shader tests. 2023-05-01 22:18:17 +02:00
Francisco Casas
877fd3f0b4 tests: Expect S_OK result on [vertex shader]. 2023-05-01 22:18:16 +02:00
Zebediah Figura
e34bdcab3a tests/shader_runner: Remove a redundant vkd3d_test_pop_context().
We already popped the context here.

Move the break inside the previous if to make control flow a little clearer.
2023-04-20 22:54:23 +02:00
Giovanni Mascellani
625155bd3c tests: Pop the shader runner context after processing the current section.
This way failures produced while compiling or preprocessing a shader
are shown with the appropriate context.
2023-04-19 20:46:53 +02:00
Zebediah Figura
dfa4bfdd03 include: Make test context information nestable.
Based on Wine.
2023-04-04 21:59:58 +02:00
Giovanni Mascellani
9a27df3a8c tests: Read integer uniforms with strtol() and strtoul().
Because %i sscanf() converters are deprecated, and in practice
clamp to [-2^31, 2^31) on 32 bit.
2023-04-03 18:00:14 +02:00
Zebediah Figura
9ea84ae8c9 tests/shader_runner: Use the global test_options structure.
Inspired by a patch by Giovanni Mascellani.
2023-03-10 21:13:05 +01:00
Giovanni Mascellani
8d7159b4be tests: Initialize shader_runner fields after having zeroed the struct. 2023-03-10 21:12:44 +01:00
Giovanni Mascellani
1717dc0516 tests: Print DLL versions when running tests on Windows. 2023-01-24 18:10:22 +01:00
Giovanni Mascellani
2445743002 tests: Run d3d9 and d3d12 tests on non-cross builds too.
On cross builds, shaders are compiled with d3dcompiler_47.dll and
run with d3dN.dll. On non-cross builds, shaders are compiled with
vkd3d-shader and run with d3dN.dll (on Windows) or Vulkan and vkd3d
(on Linux).
2023-01-24 18:10:17 +01:00
Giovanni Mascellani
44d9e2d728 tests: Distinguish between cross and non-cross Win32 builds.
Now the tests compile correctly on non-cross Win32 builds.
2023-01-24 18:10:15 +01:00
Zebediah Figura
9c817e5e6d vkd3d-shader/hlsl: Forbid recursive calls. 2023-01-19 19:16:27 +01:00
Zebediah Figura
503be4243c tests/shader_runner: Explicitly track the expected shader compilation HRESULT instead of using a boolean flag. 2023-01-19 19:16:26 +01:00
Zebediah Figura
c0782a9029 tests: Add some tests for HLSL attribute syntax. 2022-11-08 20:52:59 +01:00
Zebediah Figura
4d17758657 tests: Always compile HLSL shaders.
Do not rely on a draw or dispatch command to do this.

This allows more efficiently testing syntax, in cases where testing the actual
shader functionality is not interesting.
2022-11-08 20:52:57 +01:00
Zebediah Figura
75494a4ae6 tests: Add a basic shader test for compute shaders. 2022-10-19 21:59:29 +02:00
Zebediah Figura
eb70f1aeb5 tests: Add a test for asuint(). 2022-10-12 21:57:55 +02:00
Zebediah Figura
f821a1b29a tests: Add a test for multiple render targets.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 19:13:12 +02:00
Zebediah Figura
08e2a8e9bb tests: Add a basic shader test for UAVs.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 19:13:09 +02:00
Zebediah Figura
2b69ee67bd tests/shader_runner: Make the render target into a resource.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 19:13:06 +02:00
Zebediah Figura
ac404afe93 tests/shader_runner: Allow creating UAV resources.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 19:12:59 +02:00
Giovanni Mascellani
6ff6cb4ed2 tests/shader_runner: Allow probing a single component.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-31 21:53:26 +02:00
Zebediah Figura
4a9d675c49 tests/shader_runner: Move the check_readback_data_vec4() call to shader_runner.c.
Split the probe_vec4() directive into get_rt_readback() and release_readback().

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-05-31 21:53:21 +02:00
Zebediah Figura
367bd15ec5 tests: Simplify "probe" directive syntax and parsing a bit.
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-20 23:01:04 +02:00
Zebediah Figura
f187b48792 tests: Mark individual invalid shaders as todo.
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Matteo Bruni <mbruni@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-20 23:00:57 +02:00
Zebediah Figura
c3a5cd7c13 tests: Do not abort when an invalid shader test fails.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-15 21:18:09 +02:00
Zebediah Figura
c0562e2a1e tests: Introduce support for marking individual test directives as todo.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-15 21:18:04 +02:00
Zebediah Figura
26b89cc338 tests: Skip probe directives if the last render failed.
Signed-off-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-15 21:18:01 +02:00
Zebediah Figura
e3f78706ec tests: Introduce a Vulkan shader runner.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 19:00:19 +02:00
Zebediah Figura
3e8b5a9fc3 tests: Store samplers in a fixed-size array.
We will need to allocate some structures in the Vulkan backend; this is easier
if we don't need to worry about allocating them dynamically.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 19:00:16 +02:00
Zebediah Figura
e208d87847 tests: Store resources in a fixed-size array.
We will need to allocate some structures in the Vulkan backend; this is easier
if we don't need to worry about allocating them dynamically.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-12 19:00:14 +02:00
Zebediah Figura
93c6fd0eb0 tests: Introduce a D3D9 shader runner.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Henri Verbeet <hverbeet@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-04-08 11:49:33 +02:00