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
Henri Verbeet
7800c7b40f
vkd3d-shader/sm4: Rename hlsl_sm4.c to tpf.c.
2023-04-20 22:54:30 +02:00
Ethan Lee
81cc077b53
tests: Add tests for any() intrinsic.
...
Currently only tests float and bool, scalar and vector.
Signed-off-by: Ethan Lee <flibitijibibo@gmail.com>
2023-04-19 20:46:53 +02:00
Francisco Casas
8cd3defe0d
tests: Test indexing of non-loads.
2023-04-13 23:05:25 +02:00
Zebediah Figura
526b025c88
tests: Test side effects on indexes.
...
Co-authored-by: Francisco Casas <fcasas@codeweavers.com>
2023-04-13 23:05:21 +02:00
Francisco Casas
86893bc7f4
tests: Test numeric offsets with object fields.
2023-04-13 23:05:07 +02:00
Nikolay Sivov
e4503ad80f
tests: Add a test for SV_IsFrontFace.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-04-13 23:05:00 +02:00
Nikolay Sivov
49b63fbeba
vkd3d-shader/hlsl: Support log2() intrinsic.
2023-04-13 23:04:40 +02:00
Nikolay Sivov
c190c184ce
vkd3d-shader/hlsl: Add support for ternary operator.
2023-04-06 17:51:46 +02:00
Conor McCarthy
eabdccb117
vkd3d-shader/ir: Merge all shader IR fork and join phases into a single phase.
...
Normalise the incoming vkd3d_shader_instruction IR to the shader model 6
pattern. This allows generation of a single patch constant function in
SPIR-V.
2023-04-03 17:58:21 +02:00
Henri Verbeet
57d92a15cf
Release 1.7.
2023-03-24 11:22:28 +01:00
Henri Verbeet
d405295bc7
build: Fix the order of some .shader_test files.
2023-03-09 22:10:53 +01:00
Henri Verbeet
0c833056f6
build: Actually run asuint.shader_test.
2023-03-09 22:10:53 +01:00
Nikolay Sivov
a18f3d4dd5
vkd3d-shader/hlsl: Support distance() intrinsic.
2023-03-08 20:14:22 +01:00
Nikolay Sivov
891217664a
vkd3d-shader/hlsl: Support case-insensitive lookup for builtin 'dword' type.
2023-02-23 21:46:38 +01:00
Francisco Casas
7a7116eaab
tests: Test allocation of unused objects.
2023-02-22 18:28:19 +01:00
Nikolay Sivov
d86db8bcbe
vkd3d-shader/hlsl: Support lit() intrinsic.
2023-02-21 21:09:52 +01:00
Francisco Casas
9df54851c9
tests: Test array parameters on functions.
2023-02-20 21:59:51 +01:00
Zebediah Figura
1ee7a4e82a
tests: Add more tests for majority modifier syntax.
2023-02-20 21:59:42 +01:00
Nikolay Sivov
e5b40092c2
vkd3d-shader/hlsl: Support all() intrinsic.
2023-02-20 21:59:37 +01:00
Nikolay Sivov
e7bc634307
vkd3d-shader/hlsl: Support reflect() intrinsic.
...
Tests authored by Giovanni.
2023-02-20 21:59:23 +01:00
Zebediah Figura
68c232cfab
tests: Test entry point semantics on function declarations.
2023-01-31 22:27:02 +01:00
Zebediah Figura
4954c36347
tests: Add more tests for early return from the entry point.
2023-01-31 22:27:02 +01:00
Zebediah Figura
7460d7adc2
tests: Add some tests for early return from user-defined functions.
2023-01-31 22:27:02 +01:00
Nikolay Sivov
ec00782eae
vkd3d-shader/tests: Add some exp()/exp2() tests.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-01-26 21:52:29 +01:00
Francisco Casas
dd2168754d
tests: Combine all the swizzle tests in a single file.
2023-01-26 21:52:16 +01:00
Francisco Casas
4ce6a17053
tests: Test minimum-precision numeric types.
2023-01-25 22:10:23 +01:00
Nikolay Sivov
3e6fccdbf9
vkd3d-shader/hlsl: Support frac() intrinsic.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=34242
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2023-01-25 22:10:05 +01:00
Francisco Casas
337b4c5db0
tests: Test constant propagation through swizzles.
...
The Load() method offsets are used for these tests since these must
solve to constants in order to pass.
2023-01-24 18:10:38 +01:00
Francisco Casas
7a7b17d0e1
tests: Test offset argument for the texture Load() method.
2023-01-24 18:10:36 +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
Francisco Casas
4e1a4a76d9
tests: Test step() intrinsic.
2023-01-19 19:16:17 +01:00
Francisco Casas
7dbc879e2d
tests: Test sqrt() intrinsic.
2023-01-19 19:16:16 +01:00
Zebediah Figura
22a1a478ea
tests: Test specifying a UAV address as an in/out parameter to a function.
2023-01-13 17:32:39 +01:00
Francisco Casas
a7bb5a0835
vkd3d-shader/hlsl: Support smoothstep() intrinsic.
2023-01-11 16:02:52 +01:00
Francisco Casas
09e7218539
vkd3d-shader/hlsl: Support transpose() intrinsic.
2023-01-11 16:02:50 +01:00
Henri Verbeet
1eaf73147c
Release 1.6.
2022-12-07 16:08:16 +01:00
Henri Verbeet
d5f810068b
build: Add the demo shaders to the distribution.
2022-12-07 16:08:16 +01:00
Henri Verbeet
21302c09eb
build: Remove $(vkd3d_demos_shaders) from the distribution.
...
These were removed in commits 3d85d77ced
and 763f7dfa61
.
2022-12-07 16:08:11 +01:00
Francisco Casas
bd501ce336
vkd3d-shader/hlsl: Don't produce a parse error on empty buffer_body.
2022-11-18 22:29:06 +01:00
Francisco Casas
dd1008867e
tests: Add missing entry for max.shader_test in Makefile.am.
2022-11-18 22:29:02 +01:00
Zebediah Figura
c0782a9029
tests: Add some tests for HLSL attribute syntax.
2022-11-08 20:52:59 +01:00
Brendan Shanks
963ea98a52
vkd3d-common: Add a Windows implementation of vkd3d_set_thread_name().
2022-10-25 21:25:38 +02:00
Zebediah Figura
62fd13059b
tests: Add a basic shader test for typed UAV loads.
2022-10-19 21:59:55 +02:00
Zebediah Figura
75494a4ae6
tests: Add a basic shader test for compute shaders.
2022-10-19 21:59:29 +02:00
Giovanni Mascellani
c644244bcd
tests: Test float operations with uniform inputs.
...
The point of the "uniform" variants is to avoid hiding code generation
bugs because of the constant folding optimization.
2022-10-19 21:59:18 +02:00
Francisco Casas
09d7442cb1
tests: Test explicit casts between types that are component-wise compatible.
2022-10-17 17:59:04 +02:00
Francisco Casas
653b109d8f
tests: Test implicit casts between types that are equal component-wise.
2022-10-17 17:59:01 +02:00