Henri Verbeet
64418dd290
tests/shader_runner: Cleanup on insufficient GLSL support in gl_runner_init() (Valgrind).
2024-04-02 23:10:28 +02:00
Henri Verbeet
46bd3b1545
tests: Initialise resource_desc1.Layout in test_get_copyable_footprints() (Valgrind).
2024-04-02 23:10:18 +02:00
Giovanni Mascellani
2a101cf697
tests: Include vkd3d_d3d12.h in utils.h.
...
RECT and D3D12_BOX are used from there.
2024-04-02 23:09:53 +02:00
Conor McCarthy
d72d5c35d1
vkd3d-shader/dxil: Implement DX intrinsics Dot2, Dot3 and Dot4.
2024-04-02 23:09:28 +02:00
Conor McCarthy
2909a5aacc
vkd3d-shader/dxil: Implement DX intrinsic MakeDouble.
2024-04-02 23:09:23 +02:00
Conor McCarthy
cf6e518f1e
tests/hlsl: Add tests for asdouble().
2024-04-02 23:09:20 +02:00
Francisco Casas
b1eaf8327b
tests/test-driver: Print line where vkd3d_unreachable() was hit.
...
With this, a test that fails because vkd3d_unreacheable() was hit, will
now display the error line.
FAIL: tests/hlsl/some-test.shader_test
(SM4.0-SM5.1)OpenGL/SPIR-V 43[XF] 79[XF] 126[XF] 149[XF] 159[XF]
[AF] vkd3d/libs/vkd3d-shader/hlsl.c:246: Aborting, reached unreachable code.
[SIGABRT] Aborted (core dumped)
2024-03-27 22:37:52 +01:00
Francisco Casas
9a90b9591c
tests/test-driver: Display [SIGABRT] and [SIGSEGV] tags.
...
Some times the test can be aborted for reasons others than failed
assertions, such as segmentation faults or reaching unreacheable code.
This commit adds purple tags to the test driver for visual clarity.
2024-03-27 22:37:48 +01:00
Conor McCarthy
11ee92ed7e
vkd3d-shader/dxil: Implement DX intrinsic Discard.
2024-03-27 22:37:42 +01:00
Zebediah Figura
6b6e4bc212
vkd3d-shader: Add a compile option to control whether implicit truncation warnings are printed.
...
d3dcompiler and d3dx9 versions before 42 don't emit this error; this will be
necessary to emulate that behaviour.
Other warnings exist that are introduced in different d3dcompiler versions,
although there are not very many distinct HLSL warnings to begin with.
We could of course group all these together under a single compiler option, but
I find that using separate top-level options is unilaterally friendlier to an
API consumer, and simpler to implement as well. It also in some sense maps
conceptually to e.g. "-Wno-implicit-conversion".
2024-03-27 22:37:34 +01:00
Nikolay Sivov
b382d1843d
vkd3d-shader/fx: Accept texture types when writing fx_2_0 effects.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:29 +01:00
Nikolay Sivov
b09f919673
vkd3d-shader/hlsl: Treat "texture" type name as case-insensitive.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:28 +01:00
Nikolay Sivov
17dc23269e
vkd3d-shader/fx: Handle "uint" type for fx_2_0 parameters.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-27 22:37:27 +01: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
Francisco Casas
11e7265815
vkd3d-shader/spirv: Throw compiler error on unrecognized register.
...
This codepath path is currently triggered when transpiling d3dbc shaders
that use vPos (or other of these special registers).
While vPos gets added to the input signature and gets assigned an INPUT
register, the registers in the shader instructions are still of
VKD3DSPR_MISCTYPE type and are not propperly mapped yet. This gives
invalid results.
Some SM1 tests must be set back to "todo" but they only work because, by
coincidence, we are assigning vPos the input register with index 0.
Propper mapping of these registers is still required.
2024-03-27 22:37:15 +01:00
Zebediah Figura
172cb75872
vkd3d-shader/spirv: Implement VKD3DSIH_ABS.
2024-03-27 22:37:10 +01:00
Francisco Casas
9a222d2be1
vkd3d-shader/d3dbc: Implement HLSL_OP2_LOGIC_AND for SM1.
2024-03-27 22:37:09 +01:00
Francisco Casas
90e8a541fb
tests: Add tests for LOGIC_NOT on uniforms.
2024-03-27 22:37:06 +01:00
Conor McCarthy
9e0b9c3a7a
vkd3d-shader/dxil: Implement the DXIL ATOMICRMW instruction.
2024-03-27 22:36:59 +01:00
Conor McCarthy
b708a9b3b5
vkd3d-shader/dxil: Implement DX instructions ThreadId, GroupId, ThreadIdInGroup and FlattenedThreadIdInGroup.
2024-03-27 22:36:58 +01:00
Conor McCarthy
c7dcfc2a04
tests/shader-runner: Add TGSM tests.
2024-03-27 22:36:57 +01:00
Zebediah Figura
ddfa94fdca
tests: Add more tests for resource and struct RDEF contents.
2024-03-27 22:36:43 +01:00
Zebediah Figura
98b90dde78
tests: Test constant and resource reflection via D3DReflect().
...
Ported from Wine.
2024-03-27 22:36:40 +01:00
Zebediah Figura
0b1f11dd33
vkd3d-shader/hlsl: Allocate register reservations for structs as well.
2024-03-27 22:36:34 +01:00
Henri Verbeet
0715734dfb
tests/shader_runner: Add GLSL support to the GL runner.
2024-03-19 22:57:50 +01:00
Conor McCarthy
0c01a55c7d
vkd3d-shader/dxil: Implement DX intrinsic Saturate.
2024-03-18 23:07:40 +01:00
Conor McCarthy
4599d3c1cf
vkd3d-shader/dxil: Implement DX intrinsic FAbs.
2024-03-18 23:07:39 +01:00
Conor McCarthy
33694f08fc
vkd3d-shader/dxil: Implement DX intrinsics FMa, FMad, IMad and UMad.
2024-03-18 23:07:38 +01:00
Conor McCarthy
08cc5027cf
tests/hlsl: Add tests for mad() and fma().
2024-03-18 23:07:35 +01:00
Nikolay Sivov
4fc15d4b4a
vkd3d-shader/fx: Add initial support for writing fx_2_0 parameters.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-18 23:07:30 +01:00
Conor McCarthy
3f99719ff2
vkd3d-shader/dxil: Implement DX intrinsic BufferUpdateCounter.
2024-03-18 23:07:23 +01:00
Conor McCarthy
52a831ba0d
tests/hlsl: Add UAV counter tests.
2024-03-18 23:07:21 +01:00
Francisco Casas
4c40deaac1
vkd3d-shader/hlsl: Use hlsl_fixme() on missing SM1 matrix writemask lowering.
...
Instead of FIXME(). Otherwise we compile invalid d3dbc.
2024-03-14 22:49:29 +01:00
Francisco Casas
5c986b9cde
vkd3d-shader/hlsl: Lower SLT instructions for pixel shaders.
...
Properly passing the inverse-trig.shader_test tests whose qualifiers
have been removed requires making spirv.c capable of handling ABS.
The same happens for the ps_3_0 equality test in
float-comparison.shader_test.
2024-03-14 22:49:29 +01:00
Francisco Casas
4133c4d801
tests: Test equality between tiny and between large numbers on ps_2_0.
2024-03-14 22:49:29 +01:00
Francisco Casas
e9a4758648
vkd3d-shader/hlsl: Implement SM1 comparison operators.
2024-03-14 22:49:29 +01:00
Conor McCarthy
b6c41d5287
tests/hlsl: Add tests for countbits() and firstbit{high|low}().
2024-03-13 21:50:39 +01:00
Zebediah Figura
a686fa7750
tests: Use a UAV barrier between ClearUnorderedAccessViewFloat() and a compute shader.
...
In an attempt to fix test failures on radv.
2024-03-13 21:50:31 +01:00
Francisco Casas
b831ffe96c
tests: Avoid creating a file named "0" when calling "make check".
...
We use "printf" instead of "print" in awk in order to avoid a newline in
the value of $xfcount, and use "-gt" instead of ">", which creates the
spurious file, in the comparison.
2024-03-12 22:15:00 +01:00
Nikolay Sivov
e0ef45c0a3
vkd3d-shader: Parse a 'single' modifier.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:50 +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
Nikolay Sivov
7f1fdd447c
vkd3d-shader/fx: Add initial support for writing uninitialized vertex/pixel shader objects.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-03-12 22:14:40 +01:00
Evan Tang
03a80cde2e
vkd3d: Enable VK_EXT_fragment_shader_interlock if available.
2024-03-11 22:10:25 +01:00
Giovanni Mascellani
dff22c9ed7
tests: Clear the UAV before testing.
...
There is no guarantee that a resource is cleared upon creation. This
fixes the test on NVIDIA and llvmpipe.
2024-03-11 22:10:15 +01:00
Giovanni Mascellani
5e43f99809
tests: Relax precision a bit for an interpolation test.
...
Otherwise the test fails on Intel, NVIDIA and llvmpipe.
2024-03-11 22:10:14 +01:00
Giovanni Mascellani
0c63824d9f
tests: Mark the coverage test as buggy on MoltenVK.
...
Apparently MoltenVK doesn't set the SampleMask built-in to the
fragment coverage mask.
2024-03-11 22:10:13 +01:00
Giovanni Mascellani
cf816a255c
tests: Pop the test context when leaving its scope.
2024-03-11 22:10:13 +01:00
Giovanni Mascellani
f6fe9a39db
tests: Mark the HS punned array test as buggy on MoltenVK.
...
MoltenVK doesn't support the Component decoration on tessellation
shaders.
2024-03-11 22:10:10 +01:00
Conor McCarthy
4f0e5b9069
vkd3d-shader/dxil: Support 16-bit types.
2024-03-11 22:10:06 +01:00