Giovanni Mascellani
5e6bcc4f9d
tests: Test wave reconvergence after selections and loops.
...
Tangled instructions, like wave operations, are sensitive to how the
invocations in a wave reconverge after having diverged. Here we test
for some of those scenarios.
2024-04-30 22:59:44 +02:00
Conor McCarthy
c2a787181f
tests/hlsl: Add SV_Coverage tests.
2024-04-30 16:32:10 +02:00
Conor McCarthy
0bd6083785
tests/hlsl: Add an SV_InstanceId test.
2024-04-30 16:32:10 +02:00
Conor McCarthy
2fc32c3d1d
tests/hlsl: Add a test for constexpr pointer cast.
2024-04-30 16:31:43 +02:00
Nikolay Sivov
836fe05916
tests: Add some tests for string variables.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-04-23 22:37:19 +02:00
Conor McCarthy
0f7095d2aa
tests/hlsl: Add tests for min() and integer max().
2024-04-23 22:35:51 +02:00
Henri Verbeet
7b4a1fdfbc
vkd3d: Move the vkd3d_cond implementation to vkd3d-common.
...
Much like the vkd3d_mutex implementation.
2024-04-22 23:15:20 +02:00
Conor McCarthy
d5c6e12dd3
tests/hlsl: Add wave op tests.
2024-04-22 23:13:20 +02:00
Zebediah Figura
6cf065e7fd
tests: Add tests for register space reservation syntax.
2024-04-22 23:13:16 +02:00
Zebediah Figura
f7a79517ae
tests: Add tests for profile syntax in register reservations.
2024-04-22 23:13:16 +02:00
Conor McCarthy
b68a9ae3ec
tests/hlsl: Add tests for SV_Depth.
2024-04-19 22:23:40 +02:00
Conor McCarthy
696fc12061
tests/hlsl: Add tests for GetSamplePosition() and GetSampleCount().
2024-04-17 22:51:30 +02:00
Conor McCarthy
2379bda36f
tests/hlsl: Add a tessellation test.
2024-04-16 22:18:12 +02:00
Nikolay Sivov
fd9e1a87ff
vkd3d-shader/hlsl: Test refract() intrinsic.
...
With some changes by Giovanni Mascellani.
2024-04-10 08:55:26 -05:00
Stefan Dösinger
f24005507c
vkd3d: Implement opening and closing shader caches.
2024-04-10 08:54:58 -05:00
Conor McCarthy
bdfa14d219
tests/hlsl: Add tests for CalculateLevelOfDetail().
...
Includes improvements made by Giovanni Mascellani.
2024-04-10 08:54:23 -05:00
Francisco Casas
73ef6907bc
tests: Add tests for "compile" and CompileShader() syntax.
2024-04-10 08:54:23 -05:00
Francisco Casas
83f4b46fb1
tests: Add tests for fxgroup syntax.
2024-04-10 08:54:23 -05:00
Francisco Casas
00c8cf1bcc
tests: Test function call syntax for state blocks.
2024-04-10 08:54:23 -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
Nikolay Sivov
9117629e35
vkd3d-shader/fx: Handle "half" type for fx_2_0 parameters.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:25 +01:00
Nikolay Sivov
3fdf674a4d
tests: Rename effect test files to make them easier to find.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:25 +01:00
Conor McCarthy
c7dcfc2a04
tests/shader-runner: Add TGSM tests.
2024-03-27 22:36:57 +01:00
Henri Verbeet
2431357fd6
vkd3d-common: Merge vkd3d_debug.h into vkd3d_common.h.
...
There doesn't seem much point in separating these. Pretty much all of
vkd3d (eventually) includes vkd3d_debug.h, and vkd3d_debug.h includes
vkd3d_common.h because it uses VKD3D_PRINTF_FUNC. The separation also
makes it inconvenient to use the debug macros in vkd3d_common.h.
2024-03-19 22:58:51 +01:00
Conor McCarthy
52a831ba0d
tests/hlsl: Add UAV counter tests.
2024-03-18 23:07:21 +01:00
Nikolay Sivov
cf7c05f431
vkd3d-shader: Remove a token for 'precise' modifier.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:50 +01:00
Francisco Casas
308c7941d4
tests: Test comparison and logic operators on SM1 vertex shaders.
...
Currently these are failing for SM1 because VKD3DSIH_SLT is not being
handled by spirv.c.
2024-03-11 22:09:43 +01:00
Conor McCarthy
7fcf1b6ca2
tests/shader-runner: Add sampler comparison tests.
2024-03-11 22:09:08 +01:00
Francisco Casas
faea8cd7c8
tests: Copy autotool's testsuite driver script.
...
For the driver script to run properly it is necessary to run
"autoreconf" in the source directory and call the configure script again
in the build directory.
2024-03-08 23:35:28 +01:00
Nikolay Sivov
b13d60d805
vkd3d-shader/hlsl: Add determinant() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-08 23:35:23 +01:00
Nikolay Sivov
4dd1bbae40
tests: Add some tests for shader object type names.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-06 23:04:25 +01:00
Conor McCarthy
13143700b7
tests/shader-runner: Add raw UAV tests.
2024-03-06 23:04:11 +01:00
Henri Verbeet
f866fb95ad
Release 1.11.
2024-03-05 20:39:45 +01:00
Giovanni Mascellani
500b61c383
tests: Test how constant folding works on SM1.
2024-02-26 23:04:08 +01:00
Conor McCarthy
3906c12476
tests/shader-runner: Add tests for UAV atomic ops.
2024-02-20 22:50:13 +01:00
Francisco Casas
4d855611b7
tests/shader-runner: Support SRV buffers.
2024-02-19 21:11:51 +01:00
Evan Tang
628acb6b96
tests: Add some tests for rasteriser-ordered views.
2024-02-14 21:48:53 +01:00
Conor McCarthy
cf4ed988d0
tests/shader-runner: Add shader model 6 texture UAV tests.
...
The UAV default register allocation rules changed with SM 5.1.
2024-02-07 22:59:16 +01:00
Petrichor Park
92044d5e41
tests/shader-runner: Add tests for acos and asin trig intrinsics.
...
Extracted by Conor McCarthy from an HLSL patch, and modified to include
SM 6 variations.
2024-02-06 23:09:46 +01:00
Francisco Casas
4791c7c23b
tests: Test register(cX) reservations.
2024-01-29 22:33:25 +01:00
Francisco Casas
d7d4c9bc90
tests: Rename register-reservations.shader_test to register-reservations-resources.shader_test.
2024-01-29 22:33:25 +01:00
Zebediah Figura
53bd1f5419
vkd3d-utils: Add D3DReflect().
2024-01-24 22:37:53 +01:00
Zebediah Figura
e73ba2a4c3
include: Add vkd3d_d3d12shader.idl.
2024-01-24 22:37:53 +01:00
Zebediah Figura
57c4a13024
tests: Add tests for valid conditional types.
2024-01-23 20:26:47 +01:00
Nikolay Sivov
341963bbec
tests/hlsl: Add some tests for annotations.
2024-01-23 20:26:14 +01:00
Zebediah Figura
9ac210eb1e
tests: Add many more tests for ternary expressions.
2024-01-17 22:28:50 +01:00
Nikolay Sivov
a0207436f2
vkd3d-shader/tpf: Add initial support for writing fx_4_0/fx_4_1 binaries.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-01-11 23:04:48 +01:00
Henri Verbeet
0c33f82f72
Release 1.10.
2023-12-06 15:31:21 +01:00
Henri Verbeet
ff674b5db5
build: Add tests/driver.c to the distribution.
2023-12-06 15:31:21 +01:00
Francisco Casas
e6b7b38a29
tests: Test current failure when propagating swizzles.
...
The included test fails because copy_propagation_transform_swizzle()
is using the value recorded for the variable when the swizzle is being
read, and not the swizzle's load.
2023-11-29 22:53:16 +01:00
Henri Verbeet
beb3f6e0c2
tests: Introduce an OpenGL shader runner.
2023-11-22 22:08:11 +01:00
Akihiro Sagawa
e493627130
vkd3d-shader/hlsl: Add radians() function.
2023-11-20 22:07:17 +01:00
Conor McCarthy
130e7bdf0f
tests/shader-runner: Add tests for 64-bit casts.
2023-11-15 21:48:33 +01:00
Conor McCarthy
38e85079aa
tests/shader-runner: Add a test for float comparisons.
2023-11-15 21:48:30 +01:00
Nikolay Sivov
e57bf3db0b
tests: Add some tests for ceil().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-11-08 22:49:37 +01:00
Francisco Casas
3deb3b5a21
tests: Rename array-index-expr.shader_test as non-const-indexing.shader_test.
2023-11-07 22:25:42 +01:00
Giovanni Mascellani
bae6079047
include: Move D3D_BLOB_PART to a new header file.
...
According to a clang diagnostic, redefining a typedef is C11, and
we want to stick with C99.
2023-11-06 23:08:42 +01:00
Nikolay Sivov
8e5c8c1725
tests: Add some tests for 'technique' token behaviour.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:59:45 +01:00
Nikolay Sivov
ebb5aacabf
tests: Add some tests for the 'switch' statements.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-31 21:58:57 +01:00
Giovanni Mascellani
f462d237c1
ci: Run shader tests on Windows.
2023-10-31 21:58:53 +01:00
Giovanni Mascellani
dbc5e7d07c
ci: Run cross tests on Windows.
...
A driver program is introduced to coordinate test running on Windows,
similarly to what "make test" does on Linux and macOS.
2023-10-31 21:58:51 +01:00
Giovanni Mascellani
90f9407b80
tests: Do not use global half values.
...
They are not allowed by the native compiler, except in compatibility
mode.
2023-10-18 20:58:14 +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
Nikolay Sivov
b5c0c9c22f
vkd3d-shader/hlsl: Add fwidth() function.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-10-05 16:15:10 +02:00
Henri Verbeet
90d4529f27
Release 1.9.
2023-09-21 19:16:32 +02:00
Henri Verbeet
46c7f65be8
build: Add vkd3d_shader_utils.h to libvkd3d_la_SOURCES.
2023-09-19 21:30:43 +02:00
Francisco Casas
60a3279318
tests: Test matrix swizzles.
2023-09-13 23:10:37 +02:00
Nikolay Sivov
7fd10bb6bc
tests: Add some tests for a 'const' modifier.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-08-15 21:51:50 +02:00
Francisco Casas
948c4145f5
tests: Test texture allocation ordering in complex scenarios.
2023-08-15 21:51:26 +02:00
Henri Verbeet
fbb5e59a03
vkd3d-dxbc: Implement listing DXBC contents.
2023-08-08 21:15:28 +09:00
Henri Verbeet
6bfb94c440
vkd3d-dxbc: Introduce a program to inspect and modify DXBC blobs.
2023-08-08 21:15:28 +09:00
Nikolay Sivov
18731d71a6
tests: Add some tests for GetDimensions().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-07-31 21:07:46 +09:00
Francisco Casas
b8a85c6ad5
tests: Add lowering combined samplers tests.
2023-07-17 22:55:43 +02:00
Francisco Casas
396edae281
tests: Test multiple variable initializers.
2023-07-04 22:39:18 +02:00
Francisco Casas
d8e6a1066d
tests: Test semantics in uniform variables.
2023-07-04 22:39:18 +02:00
Conor McCarthy
6775f7ba66
vkd3d-shader/dxil: Read and validate DXIL bitcode unabbreviated blocks.
2023-06-28 21:40:34 +02:00
Zebediah Figura
0d2f2e1860
tests: Move HLSL tests to a subdirectory.
2023-06-28 21:40:32 +02:00
Nikolay Sivov
6ef0213135
tests: Add some tests for clip().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-06-27 22:33:48 +02:00
Henri Verbeet
771e442af1
Release 1.8.
2023-06-22 22:00:20 +02:00
Henri Verbeet
e17ee34b92
build: List tests/object-parameters.shader_test before tests/object-references.shader_test.
2023-06-22 22:00:20 +02:00
Ethan Lee
aa17d139be
tests: Add a test for arrays with an expression as the index.
...
Currently, the compiler requires that dereferences be HLSL_IR_CONSTANT, so that
it can compute the offset at compile time. However, scenarios such as this test
will produce a dereference with HLSL_IR_EXPR, which will generate an error.
Passing this test in particular will require adding support for SM4 relative
addressing, as well as support for non-constant indexing in general.
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
2023-05-29 20:21:01 +02:00
Francisco Casas
fbd2df2ad5
tests: Add minimal tests for temp lifetimes within a loop.
2023-05-24 22:00:19 +02:00
Ethan Lee
c3f10fe271
tests: Add a test for SampleGrad() method.
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
2023-05-23 21:07:47 +02:00
Nikolay Sivov
cf8cacd336
vkd3d-shader/hlsl: Improve UAV format type checking for buffer types.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-22 22:03:27 +02:00
Zebediah Figura
6129399b4f
tests: Add a test for SampleBias() with multiple mipmap levels.
2023-05-08 20:24:15 +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
e3eb4fc5eb
tests: Add a test for loading from nonzero mipmap levels.
2023-05-08 20:24:15 +02:00
Francisco Casas
7c2ac5b098
tests: Test objects as parameters.
2023-05-08 20:24:14 +02:00
Nikolay Sivov
7516adeeae
vkd3d-shader/hlsl: Add support for fmod() intrinsic.
2023-05-08 20:21:52 +02:00
Nikolay Sivov
87037d3748
vkd3d-shader/hlsl: Implement asfloat().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-05-02 20:46:16 +02:00
Nikolay Sivov
7d41cf4440
vkd3d-shader/hlsl: Partially implement static expressions evaluation.
2023-05-02 20:46:08 +02:00
Henri Verbeet
3f8aa0e272
vkd3d-shader/d3d-asm: Rename trace.c to d3d_asm.c.
2023-05-02 20:45:33 +02:00
Ethan Lee
109f7094bc
tests: Add tests for sign() intrinsic.
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
2023-05-01 22:18:41 +02:00
Zebediah Figura
3cce4e70e9
tests: Test bool semantics.
2023-05-01 22:18:33 +02:00
Nikolay Sivov
7ba373946b
vkd3d-shader/hlsl: Implement D3DCOLORtoUBYTE4() function.
2023-04-28 21:04:13 +02:00
Nikolay Sivov
4b3707aeb4
vkd3d-shader/hlsl: Partially implement trunc().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-04-28 21:04:11 +02:00
Ethan Lee
d3876e49bc
tests: Add tests for ddx(), ddy() intrinsics.
...
Thanks to Giovanni for the second set of tests! Note that the
tolerance for the final pixel was set much higher than the others;
this test seems to be an issue for some devices (in my case, a 7900
XTX running RADV).
Co-authored-by: Giovanni Mascellani <gmascellani@codeweavers.com>
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
2023-04-28 21:03:43 +02:00
Nikolay Sivov
4fe4784e8a
tests: Add a simple test for "discard".
...
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-04-26 22:46:52 +02:00
Henri Verbeet
8e0df3f720
vkd3d-shader/sm1: Merge hlsl_sm1.c into d3dbc.c.
2023-04-20 22:54:32 +02:00
Henri Verbeet
99bc07ccf5
vkd3d-shader/sm4: Merge sm4.h into tpf.c.
2023-04-20 22:54:31 +02:00