Commit Graph

17 Commits

Author SHA1 Message Date
e3923876c0 tests/hlsl: Test integer division with big integers.
Similarly to the modulus operator, d3dbc results with constant folding
are different from results when constant folding cannot be applied, and
different from tpf results.
2025-03-18 15:25:41 +01:00
080672478d tests/hlsl: Test integer modulus with big integers.
Note that in d3dbc target profiles it gives different results when this
operation is constant folded compared to when it is not.

This suggests that whatever pass lowers the modulus operation to d3dbc
operations doesn't do it before constant folding.

Also note that when constant folded, d3dbc results differ from tpf
results for negative operands, because of the loss of precision that
happens when NEG is constant folded.

So the same integer modulus expression can have 3 different results
depending on the context.
2025-03-18 15:21:43 +01:00
becb749792 tests/hlsl: Add arithmetic int16 tests. 2025-02-10 13:19:16 +01:00
b0646cb427 tests/shader_runner: Introduce a Metal shader runner. 2024-10-31 16:47:26 +01:00
fc8384462f vkd3d-shader/glsl: Implement VKD3DSIH_IMAX. 2024-10-08 22:01:56 +02:00
d3ba810c98 tests: Stop probing all pixels when drawing a uniform colour.
This is simply unnecessary and wastes time.

As part of this, simply remove the "all" directive. Only for a couple of tests
is it even potentially interesting to validate all pixels (e.g.
nointerpolation.shader_test), and for those "all" is replaced with an explicit
(0, 0, 640, 480) rect.

In all other cases we just probe (0, 0).
2024-06-13 23:55:31 +02:00
0715734dfb tests/shader_runner: Add GLSL support to the GL runner. 2024-03-19 22:57:50 +01:00
747511131d vkd3d-shader/hlsl: Lower non-float operators for SM1. 2024-03-06 23:04:05 +01:00
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
b3903636f7 vkd3d-shader/dxil: Implement DX intrinsic Binary. 2024-01-23 20:26:29 +01:00
99924d913b vkd3d-shader/spirv: Support 64-bit sources in spirv_compiler_emit_int_div(). 2024-01-02 23:03:05 +01:00
af731024d7 tests/shader-runner: Fix the arithmetic-int-uniform int64 abs expected results. 2023-12-13 22:32:31 +01:00
27d4ccf225 tests/shader-runner: Add 64-bit arithmetic tests. 2023-12-12 22:50:51 +01:00
90d178bf12 vkd3d-shader/dxil: Implement the DXIL CAST instruction. 2023-11-09 21:14:42 +01:00
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
6d1ba83856 vkd3d-shader/hlsl: Use conditional moves for arithmetic operators instead of branching.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-09-22 11:06:22 +02:00
0d2f2e1860 tests: Move HLSL tests to a subdirectory. 2023-06-28 21:40:32 +02:00