Commit Graph

5 Commits

Author SHA1 Message Date
Francisco Casas
1c73513425 tests: Use the vulkan runner to run SM1 compilation tests.
At the current moment this is a little odd because for SM1 [test]
directives are skipped, and the [shader] directives are not executed by
the shader_runner_vulkan.c:compile_shader() but by the general
shader_runner.c:compile_shader(). So in principle it is a little weird
that we go through the vulkan runner.

But fret not, because in the future we plan to make the parser agnostic
to the language of the tests, so we will get rid of the general
shader_runner.c:compile_shader() function and instead call a
runner->compile_shader() function, defined for each runner. Granted,
most of these may call a generic implementation that uses native
compiler in Windows, and vkd3d-shader on Linux, but it would be more
conceptually correct.
2024-01-24 22:37:44 +01:00
Zebediah Figura
6a514ebe8e tests: Avoid using "SV_Position" as a name for the vertex shader input.
We use vkd3d_shader_find_signature_element() in the Vulkan runner, and
vkd3d-shader translates SM1 position to "POSITION".
2023-12-14 23:19:30 +01: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
Petrichor Park
976fd67f51 vkd3d-shader/hlsl: Implement intrinsic tan.
This commit also extends the trigonometry tests a little bit to make
sure that tan works right.
2023-09-25 22:07:13 +02:00
Zebediah Figura
0d2f2e1860 tests: Move HLSL tests to a subdirectory. 2023-06-28 21:40:32 +02:00