Elizabeth Figura
1e43088662
vkd3d-shader/d3dbc: Use struct vkd3d_shader_dst_param instead of struct sm1_dst_register.
2024-12-16 17:11:57 +01:00
Henri Verbeet
c4f69f4d3d
vkd3d-shader/hlsl: Prefer overload candidates without component count widening.
2024-12-16 17:09:40 +01:00
Henri Verbeet
64bb4150f0
vkd3d-shader/hlsl: Prefer overload candidates without component type narrowing.
2024-12-16 17:09:40 +01:00
Henri Verbeet
32d432ab5e
vkd3d-shader/hlsl: Prefer overload candidates with matching component types.
2024-12-16 17:09:40 +01:00
Henri Verbeet
6b8878377f
vkd3d-shader/hlsl: Prefer overload candidates with matching component type classes.
2024-12-16 17:09:40 +01:00
Henri Verbeet
63fce3062e
vkd3d-shader/hlsl: Prefer overload candidates without component count narrowing.
2024-12-16 17:09:40 +01:00
Henri Verbeet
cdf6100fe5
tests: Add yet more overload resolution tests.
2024-12-16 17:09:40 +01:00
Elizabeth Figura
5827197246
tests/shader_runner: Don't bother distinguishing directive substrings.
...
Consider ']' a terminator for any string.
2024-12-12 17:28:45 +01:00
Elizabeth Figura
830bdd0037
tests/shader_runner: Use a separate variable for shader type.
2024-12-12 17:26:49 +01:00
Elizabeth Figura
edb36c078f
tests/shader_runner: Use is_todo instead of separate shader states.
2024-12-12 17:26:37 +01:00
Giovanni Mascellani
dd0ed989a1
vkd3d-shader/d3dbc: Normalise I/O register write masks when not disassembling.
...
Sometimes SM1-3 shaders contain write masks that exceed the
signature element masks. That happens because SM1-3 shaders do not
have a concept of signature and signature masks, and OTOH aren't
always able to express any given write mask.
In VSIR we don't want to deal with I/O register masks exceeding the
corresponding signature element mask or usage mask, because, for
instance, for higher shader models it can complicate dealing with
DCL_INDEX_RANGE. In order to have uniform rules for all shader
models we normalise masks coming from SM1-3 shaders.
We don't do that normalisation when disassembling, in order to
preserve the expected output.
2024-12-12 17:21:49 +01:00
Giovanni Mascellani
64126a00c3
vkd3d-shader/ir: Give more meaningful names to I/O normalisation levels.
...
The previous names "not normalised" and "fully normalised" have meanings
which are likely to change with time. OTOH including a description of the
normalisation level in the enumerant seems excessive. Relating
normalisation levels to shader model versions might be a reasonable
compromise.
2024-12-12 17:21:49 +01:00
Elizabeth Figura
09095403ac
vkd3d-shader/hlsl: Store swizzles in vsir format.
...
The previous format matched sm1 and sm4, but if we're going to be feeding
everything through vsir, we want vsir's format.
2024-12-12 17:20:23 +01:00
Elizabeth Figura
474a0ac4e2
vkd3d-shader/hlsl: Use swizzle helpers in more places.
2024-12-12 17:11:53 +01:00
Elizabeth Figura
a905a78a96
vkd3d-shader/hlsl: Use a structure for matrix swizzles.
2024-12-12 17:11:27 +01:00
Elizabeth Figura
70e2148fcb
vkd3d-shader/hlsl: Document matrix swizzles.
2024-12-12 16:56:52 +01:00
Victor Chiletto
ed6061dfae
vkd3d-shader/hlsl: Drop the _ir_ infix from enum hlsl_loop_unroll_type.
2024-12-12 16:54:07 +01:00
Victor Chiletto
a1d995e740
vkd3d-shader/hlsl: Unroll loops with conditional jumps.
2024-12-12 16:54:04 +01:00
Victor Chiletto
351d58a95b
vkd3d-shader/hlsl: Partially defer continue resolution.
...
We need 'for' iter blocks to be separate for loop unrolling.
2024-12-12 16:41:34 +01:00
Victor Chiletto
5d8448a44e
vkd3d-shader/hlsl: Remove loop_unrolling_find_unrollable_loop().
...
Since loop unrolling doesn't clone the entire program anymore, we can
express it as a hlsl_transform_ir() transform.
2024-12-12 16:41:34 +01:00
Victor Chiletto
de3a365fea
vkd3d-shader/hlsl: Do not clone the entire program for loop unrolling.
2024-12-12 16:41:34 +01:00
Victor Chiletto
0a8c4a6fa2
vkd3d-shader/hlsl: Run copy propagation incrementally during loop unrolling.
2024-12-12 16:41:34 +01:00
Victor Chiletto
6c3a60cc54
vkd3d-shader/hlsl: Constant fold casts to boolean.
2024-12-12 16:41:34 +01:00
Victor Chiletto
7bee33f948
vkd3d-shader/hlsl: Allow copy propagation to be stopped early.
2024-12-12 16:41:34 +01:00
Victor Chiletto
3cb9e8dc3b
vkd3d-shader/hlsl: Explicitly track the copy propagation state stack.
2024-12-12 16:41:18 +01:00