Commit Graph

768 Commits

Author SHA1 Message Date
Francisco Casas
09b9f8ff9f vkd3d-shader/hlsl: Fix invalidation of the wrong components in copy-propagation.
Fixes: 1bba18aa75.
2025-03-12 22:14:25 +01:00
Francisco Casas
bff9068a7f tests: Add a hard test for copy-propagation invalidation.
This test is currently miscompiling on SM4 because
copy_propagation_invalidate_variable_from_deref_recurse() is not always
invalidating the right components.
2025-03-12 22:14:15 +01:00
Elizabeth Figura
a87b1efbd2 vkd3d-shader/hlsl: Don't invalidate OOB constant derefs. 2025-03-12 22:09:57 +01:00
Henri Verbeet
b9ebf87114 vkd3d-shader/hlsl: Do not collect expressions across different operations in hlsl_normalize_binary_exprs(). 2025-03-12 21:34:17 +01:00
Henri Verbeet
b4296e1a2d tests/hlsl: Add another constant folding test. 2025-03-12 21:34:02 +01:00
Shaun Ren
dd1072a99b tests/hlsl: Add geometry shader syntax tests. 2025-03-12 21:21:35 +01:00
Francisco Casas
7be7e589a9 vkd3d-shader/hlsl: Lower TRUNC expressions for SM1.
Basically, separate lower_casts_to_int() into the lowering of the CAST
and the lowering of the TRUNC, so that TRUNCs that are not part of a
cast are lowered as well.
2025-03-12 18:26:23 +01:00
Shaun Ren
1b03676a36 tests/hlsl: Add dynamic addressing copy-propagation tests. 2025-03-12 18:22:01 +01:00
Elizabeth Figura
18ca7affad vkd3d-shader/hlsl: Make min16uint into a first-class type.
And properly implement translation into some binary enumerations.
2025-03-06 17:15:15 +01:00
Anna (navi) Figueiredo Gomes
50254c284b vkd3d-shader: Parse angle bracket initializer in state blocks.
While fxc allows full expressions inside the angle brackets, we don't parse that
yet as it'd be quite a mess to properly do so with yacc, and I'm not aware of any
game doing so in their shaders.
2025-03-03 18:00:23 +01:00
Anna (navi) Figueiredo Gomes
9809bda0e5 tests/hlsl: Add angle bracket state block syntax test. 2025-03-03 18:00:23 +01:00
Francisco Casas
7cb1970952 vkd3d-shader/hlsl: Don't cast all expressions to float.
Instead, allow half, bool, int, and uint, expressions that map to the
same float op to reach sm1_generate_vsir_instr_expr().
2025-03-03 17:26:15 +01:00
Anna (navi) Figueiredo Gomes
0ce2b1359f tests/hlsl: Add lower sm1 saturate test. 2025-03-03 17:25:20 +01:00
Conor McCarthy
439652f023 tests: Replace test_vs_ps_relative_addressing() with a shader runner test.
Besides simply being more compact, this allows the test to cover more
shader types, perhaps most notably DXIL.
2025-02-24 16:19:01 +01:00
Francisco Casas
e60c89c532 tests: Test unused invalid samples with a static sampler. 2025-02-20 15:44:09 +01:00
Conor McCarthy
67d8cf744c tests/hlsl: Add a conditional 16-bit test. 2025-02-19 17:53:57 +01:00
Conor McCarthy
36f9510bb3 tests/hlsl: Add interstage interface 16-bit tests. 2025-02-19 17:52:05 +01:00
Conor McCarthy
6ee650f316 tests/hlsl: Add a typed SRV load 16-bit test. 2025-02-19 17:48:38 +01:00
Conor McCarthy
2b325d3b59 tests/hlsl: Add a TGSM 16-bit test. 2025-02-19 17:47:29 +01:00
Conor McCarthy
94b8747da4 tests/hlsl: Add a sampler 16-bit test. 2025-02-19 17:46:05 +01:00
Conor McCarthy
e355cdbae0 tests/hlsl: Add typed buffer SRV 16-bit tests. 2025-02-19 17:44:59 +01:00
Giovanni Mascellani
665c29f0be vkd3d-shader/tpf: Allow I/O index ranges to not intersect a signature element for a given register.
The current TPF validator enforces that for each register involved
in a DCL_INDEX_RANGE instruction there must be a signature element
for that register and the DCL_INDEX_RANGE write mask. This is an
excessively strong request, and causes some shaders from The Falconeer
to be invalidly rejected.

The excessively strong check was needed to avoid triggering a bug
in the I/O normaliser. Since that bug is now solved, the check
can be relaxed.
2025-02-19 17:30:25 +01:00
Giovanni Mascellani
8887501042 tests: Test I/O index ranges not intersecting a signature element for a given register.
Since this test depend on the specific code generated by the
native d3dcompiler we add the possibility to specify a "raw"
shader using a hex format. When the shader assembler is finally
available they should be replaced with assembly code.
2025-02-19 17:01:17 +01:00
Conor McCarthy
c3555a34dc tests/hlsl: Add structured buffer UAV 16-bit tests. 2025-02-12 20:03:50 +01:00
Conor McCarthy
504bdcc8bb tests/hlsl: Add a raw buffer UAV 16-bit test. 2025-02-12 20:00:33 +01:00