Giovanni Mascellani
0b273ea88c
tests: Store the compiler string in the shader runner capabilities.
...
Just like the executor.
2025-03-17 13:50:19 +01:00
Shaun Ren
a4f58be00c
vkd3d-shader/hlsl: Remove the unused hlsl_array_type_to_string() declaration.
...
Accidentally introduced in 870c68dd27
.
2025-03-13 14:02:26 +01:00
Elizabeth Figura
c9a5f586b7
vkd3d-shader/hlsl: Zero-initialize "nonconst_i" and "ret_swizzle" in copy_propagation_replace_with_deref().
...
GCC without LTO is unable to determine that these are never used
uninitialized.
2025-03-13 13:59:05 +01:00
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
Elizabeth Figura
193e40c271
vkd3d-shader/hlsl: Stop checking for failure from intrinsic_float_convert_arg().
2025-03-12 22:02:39 +01:00
Elizabeth Figura
7b5b5dbb8d
vkd3d-shader/hlsl: Do not abort when performing an invalid implicit cast.
2025-03-12 22:02:39 +01:00
Elizabeth Figura
2ee19c4d34
vkd3d-shader/hlsl: Do not abort when performing an invalid explicit cast.
2025-03-12 22:02:39 +01:00
Elizabeth Figura
25f476c7ad
vkd3d-shader/hlsl: Return an error expression from add_cast() on allocation failure.
2025-03-12 22:02:39 +01:00
Elizabeth Figura
0642531c2a
vkd3d-shader/hlsl: Introduce hlsl_block_add_swizzle().
2025-03-12 22:02:31 +01:00
Elizabeth Figura
f8c53fae37
vkd3d-shader/hlsl: Introduce hlsl_block_add_resource_load().
2025-03-12 22:02:21 +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
Shaun Ren
ae5261b98b
vkd3d-shader/hlsl: Forbid output parameters in geometry shaders.
...
Outputs in geometry shaders must be written to streams.
2025-03-12 21:15:15 +01:00
Shaun Ren
4137ea5ab7
vkd3d-shader/hlsl: Validate stream output parameters in geometry shaders.
2025-03-12 21:13:59 +01:00
Shaun Ren
b650e7a503
vkd3d-shader/hlsl: Validate stream output object declarations.
...
Valid stream output objects must be single-element containing a
PointStream/LineStream/TriangleStream object.
Moreover, stream output objects cannot be declared globally.
2025-03-12 21:12:56 +01:00
Shaun Ren
870c68dd27
vkd3d-shader/hlsl: Validate and record input primitive types in geometry shaders.
2025-03-12 21:11:46 +01:00
Shaun Ren
57bb28e841
vkd3d-shader/hlsl: Parse primitive type modifiers in geometry shaders.
2025-03-12 20:42:59 +01:00
Shaun Ren
e880b11626
vkd3d-shader/hlsl: Parse the maxvertexcount attribute.
2025-03-12 20:42:15 +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
Shaun Ren
7ab7b2ab8b
vkd3d-shader/hlsl: Implement copy-propagation of derefs with a non-constant index.
...
We implement a transformation that propagates loads with a single
non-constant index in its deref path. Consider a load of the form
var[[a0][a1]...[i]...[an]], where ak are integral constants, and i is
an arbitrary non-constant node. If, for all j, the following holds:
var[[a0][a1]...[j]...[an]] = x[[c0*j + d0][c1*j + d1]...[cm*j + dm]],
where ck, dk are constants, then we can replace the load with
x[[c0*i + d0]...[cm*i + dm]]. This pass is implemented by
copy_propagation_replace_with_deref().
2025-03-12 18:16:59 +01:00
Shaun Ren
f484527cfb
vkd3d-shader/hlsl: Rename init_deref() to hlsl_init_deref().
2025-03-12 17:22:44 +01:00