Shaun Ren
2c9cf7c78b
vkd3d-shader/hlsl: Implement normalization of binary expressions.
...
We normalize binary expressions by attempting to group constants
together, in order to facilitate further simplification of the
expressions.
For any binary operator OP, non-constants x, y, and constants a, b, we
apply the following rewrite rules:
a OP x -> x OP a, if OP is commutative.
(x OP a) OP b -> x OP (a OP b), if OP is associative.
(x OP a) OP y -> (x OP y) OP a, if OP is associative and commutative.
x OP (y OP a) -> (x OP y) OP a, if OP is associative.
Note that we consider floating point operations to be
non-associative.
2024-12-11 15:32:22 +01:00
Francisco Casas
aa3a716249
vkd3d-shader/hlsl: Allow lowering separate sampler arrays on deref offset 0.
2024-12-10 15:52:52 +01:00
Francisco Casas
2c9269ac3a
vkd3d-shader/hlsl: Allocate samplers by decreasing bind count in SM1.
2024-12-10 15:52:50 +01:00
Francisco Casas
3a6bf3be24
vkd3d-shader/hlsl: Lower separated samplers for SM1.
...
The combined sampler is created as a SAMPLER instead of a TEXTURE
because that fits all our current infrastructure. The only problem is
that in the CTAB it must appear as a Texture, so the new field
hlsl_type.is_combined_sampler is added.
Co-authored-by: Elizabeth Figura <zfigura@codeweavers.com>
2024-12-10 15:51:43 +01:00
Francisco Casas
58d318719c
tests: Test sampler array allocation.
2024-12-10 15:51:34 +01:00
Francisco Casas
a0a555878f
tests: Add additional sampler allocation tests for SM1.
2024-12-10 14:02:00 +01:00
Conor McCarthy
f3fac95bb6
tests/hlsl: Add int64 wave op tests.
2024-12-09 14:21:49 +01:00
Conor McCarthy
50306a8b08
tests/hlsl: Add uint64 wave op tests.
2024-12-09 14:20:28 +01:00
Conor McCarthy
f0f8bb3f36
tests/hlsl: Add float64 wave op tests.
2024-12-09 14:17:05 +01:00
Feifan He
9d4bcc951d
vkd3d-shader/msl: Implement VKD3DSIH_USHR.
2024-12-05 21:26:03 +01:00
Feifan He
138e7caa03
vkd3d-shader/msl: Implement VKD3DSIH_ISHR.
2024-12-05 21:26:03 +01:00
Feifan He
5d6ed0fa30
vkd3d-shader/msl: Implement VKD3DSIH_ISHL.
2024-12-05 21:26:03 +01:00
Feifan He
a425c242a4
vkd3d-shader/msl: Implement VKD3DSIH_MAD.
2024-12-05 21:26:03 +01:00
Feifan He
8e0de82c74
vkd3d-shader/msl: Implement support for VKD3DSPDM_SATURATE modifiers.
2024-12-05 21:26:03 +01:00
Feifan He
ebf5828542
vkd3d-shader/msl: Implement VKD3DSIH_ELSE.
2024-12-05 21:25:35 +01:00
Feifan He
bbe10dcf17
vkd3d-shader/msl: Implement VKD3DSIH_NOT.
2024-12-05 21:13:29 +01:00
Elizabeth Figura
a3c74fd429
tests: Add a reflection test for shader model 4.0.
2024-12-04 14:37:33 +01:00
Feifan He
a06e664730
vkd3d-shader/msl: Implement VKD3DSIH_RSQ.
2024-12-04 14:26:20 +01:00
Feifan He
bc67f2eb75
vkd3d-shader/msl: Implement VKD3DSIH_MIN.
2024-12-04 14:26:20 +01:00
Feifan He
ab2cb43e15
vkd3d-shader/msl: Implement VKD3DSIH_MAX.
2024-12-04 14:26:20 +01:00
Feifan He
64ea033c81
vkd3d-shader/msl: Implement VKD3DSIH_LOG.
2024-12-04 14:26:20 +01:00
Feifan He
b1e6dbe83f
vkd3d-shader/msl: Handle SV_IS_FRONT_FACE inputs.
2024-12-04 14:26:20 +01:00
Feifan He
568296c88f
vkd3d-shader/msl: Implement VKD3DSIH_ROUND_NE.
2024-12-04 14:26:20 +01:00
Feifan He
610a11ddf8
vkd3d-shader/msl: Implement VKD3DSIH_IF and VKD3DSIH_ENDIF.
2024-12-04 14:26:20 +01:00
Feifan He
28068c9d4c
vkd3d-shader/msl: Implement VKD3DSIH_ROUND_NI.
2024-12-04 14:26:20 +01:00
Feifan He
a81a9fb7bc
vkd3d-shader/msl: Implement VKD3DSIH_LTO.
2024-12-03 14:44:32 +01:00
Feifan He
24753747a1
vkd3d-shader/msl: Implement VKD3DSIH_EXP.
2024-12-03 14:44:32 +01:00
Feifan He
ac897781ba
vkd3d-shader/msl: Implement VKD3DSIH_IEQ.
2024-12-03 14:44:32 +01:00
Feifan He
67dd1d2b0c
vkd3d-shader/msl: Handle the VKD3DSIM_LINEAR interpolation modifier on inputs.
2024-12-03 14:42:49 +01:00
Feifan He
8ae6a04561
vkd3d-shader/msl: Implement VKD3DSIH_SQRT.
2024-12-03 14:42:27 +01:00
Feifan He
77ed788a60
vkd3d-shader/msl: Implement VKD3DSIH_DP2.
2024-12-03 14:42:27 +01:00
Feifan He
6f7ee57e29
vkd3d-shader/msl: Implement VKD3DSIH_DP4.
2024-12-03 14:42:27 +01:00
Feifan He
046e9b5286
vkd3d-shader/msl: Implement VKD3DSIH_DP3.
2024-12-03 14:42:19 +01:00
Henri Verbeet
d0e4331640
vkd3d-shader/hlsl: Use hlsl_error() instead of hlsl_fixme() for ambiguous function calls.
...
This changes the return code, and some tests start passing as a result.
2024-12-03 14:38:33 +01:00
Giovanni Mascellani
3264378fa0
tests: Print the file name instead of the test name in test logs.
...
Some test programs, particularly the shader runner, are built from
many different files nowadays, and a line number is relatively
cumbersome to use if you don't know which file that line comes from.
2024-12-03 12:38:26 +01:00
Giovanni Mascellani
73be28a252
tests: Use plain skip() when skipping a test in the shader runner.
...
The context already gives the location in the .shader_test file.
2024-12-03 12:38:26 +01:00
Henri Verbeet
39cbef9e01
tests: Get rid of some redundant "glsl" todo's.
...
These are redundant either because we already have a broader tag like
"sm<6", or because the tests are never executed with the GLSL runner in
the first place.
2024-12-02 17:13:17 +01:00
Elizabeth Figura
d56601c8d0
vkd3d-shader/ir: Implement exponential fog.
2024-12-02 17:12:20 +01:00
Elizabeth Figura
1fbbc82f3a
vkd3d-shader/ir: Allow controlling the fog source through a parameter.
2024-12-02 17:12:16 +01:00
Elizabeth Figura
f86d1e72a4
vkd3d-shader/ir: Allow controlling fog through parameters.
...
Fog requires several parameters to even implement the most basic of
functionality correctly, so this commit is relatively large.
2024-12-02 17:12:06 +01:00
Feifan He
7d2819249b
vkd3d-shader/msl: Implement support for the VKD3DSPR_DEPTHOUT register.
2024-11-30 14:25:10 +01:00
Feifan He
b7203b0bbe
tests/shader_runner_metal: Implement clears.
2024-11-30 14:14:26 +01:00
Feifan He
004a6d3055
tests/shader_runner_metal: Implement depth texture and state.
2024-11-30 14:12:21 +01:00
Feifan He
9619582d1b
vkd3d-shader/msl: Implement VKD3DSIH_ROUND_Z.
2024-11-27 14:00:51 +01:00
Feifan He
778382cd94
vkd3d-shader/msl: Implement VKD3DSIH_ROUND_PI.
2024-11-27 14:00:51 +01:00
Feifan He
a7ae6404de
vkd3d-shader/msl: Implement VKD3DSIH_FTOU.
2024-11-27 14:00:51 +01:00
Feifan He
9fd7f4f1ec
vkd3d-shader/msl: Implement VKD3DSIH_UTOF.
2024-11-27 14:00:51 +01:00
Feifan He
ffbade9ed1
vkd3d-shader/msl: Implement VKD3DSIH_FTOI.
2024-11-27 14:00:50 +01:00
Feifan He
16409569fd
vkd3d-shader/msl: Implement VKD3DSIH_ITOF.
2024-11-27 14:00:50 +01:00
Feifan He
71ce43313f
vkd3d-shader/msl: Implement VKD3DSIH_MOVC.
2024-11-25 20:43:13 +01:00