6785 Commits

Author SHA1 Message Date
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
Elizabeth Figura
36fda8e28c vkd3d-shader: Correct the disassembly for POSITIONT. 2024-12-03 14:49:02 +01:00
Elizabeth Figura
3d6f836801 vkd3d-shader: Fix the disassembly names of IFC and BREAKC. 2024-12-03 14:49:02 +01:00
Elizabeth Figura
7a7dc4bf0e vkd3d-shader/d3dbc: Mark some more instructions as version-limited. 2024-12-03 14:47:00 +01:00
Elizabeth Figura
e2961a2e3c vkd3d-shader/d3dbc: Omit unnecessary instruction maximum versions. 2024-12-03 14:47:00 +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
74365417ac vkd3d-shader/hlsl: Output the candidates for ambiguous function calls. 2024-12-03 14:38:33 +01:00
Henri Verbeet
4ca4dc0b2a vkd3d-shader/hlsl: Introduce hlsl_dump_ir_function_decl(). 2024-12-03 14:38:33 +01:00
Henri Verbeet
0b726e4408 vkd3d-shader/hlsl: Introduce hlsl_dump_type(). 2024-12-03 14:38:33 +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
1c93d706d7 vkd3d-shader/ir: Merge removing I/O declarations in the general instruction lowering pass. 2024-12-03 14:36:13 +01:00
Giovanni Mascellani
4717775abb vkd3d-shader/ir: Remove I/O declarations before flattening hull shader phases. 2024-12-03 14:19:50 +01:00
Giovanni Mascellani
4ef946287c vkd3d-shader/ir: Remove I/O declarations before normalising hull shader control point I/O. 2024-12-03 14:19:50 +01:00
Giovanni Mascellani
66382f0d68 vkd3d-shader/ir: Remove I/O declarations before I/O normalisation. 2024-12-03 14:19:50 +01:00
Giovanni Mascellani
18e422dfe4 vkd3d-shader/ir: Encode I/O declarations in vsir_program.
Most I/O registers are already described by the shader signatures.
The registers that are not do not have any property other then
being used by the program or not, so they can be collectively
described with a bitmap.
2024-12-03 14:19:24 +01:00
Giovanni Mascellani
a92b602b33 vkd3d-shader/spirv: Merge emitting input and output registers.
The register storage class is now represented in
vkd3d_register_builtins, so the spirv_compiler_emit_io_register()
doesn't need to know it from the caller.
2024-12-03 13:48:39 +01:00
Elizabeth Figura
8bc9e15618 vkd3d-shader/hlsl: Translate invalid implicit-size arrays to an error type.
Instead of returning nonsense (such as, currently, a type with zero size).
In practice this improves error reporting for shaders such as the following:

void func(float x[])
{
    float y[] = {x};
}

Currently this outputs a nonsense

test.hlsl:1:19: E5002: Implicit size arrays not allowed in function parameters.
test.hlsl:3:7: E5002: Implicit size arrays need to be initialized.

With this patch the second warning is removed.
2024-12-03 12:39:27 +01:00
Elizabeth Figura
e060b47330 vkd3d-shader/hlsl: Return an error expression when a function is used as a variable. 2024-12-03 12:39:27 +01:00
Elizabeth Figura
c553c45f00 vkd3d-shader/hlsl: Move the numeric type check to add_constructor(). 2024-12-03 12:39:27 +01:00
Elizabeth Figura
97eac342d3 vkd3d-shader/hlsl: Do not abort parsing when invalid modifiers are used. 2024-12-03 12:39:27 +01:00
Elizabeth Figura
9c70348b39 vkd3d-shader/hlsl: Do not abort when modifying a const expression. 2024-12-03 12:39:27 +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
fc98cb482f vkd3d-shader/ir: Add a couple of traces for signature remapping. 2024-12-02 17:12:13 +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
Elizabeth Figura
a1de406de4 vkd3d-shader/spirv: Handle SSA registers in spirv_compiler_get_register_info().
Instead of in spirv_compiler_emit_load_reg(). This allows arbitrary swizzles to
work and reduces the amount of duplicated code.
2024-12-02 17:08:43 +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
Nikolay Sivov
949708450b vkd3d-compiler: Support fx_4_0 sources embedded in DXBC containers.
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2024-11-30 14:03:50 +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
Giovanni Mascellani
9e0c02a0ea vkd3d-shader/ir: Evaluate OUTCONTROLPOINT usage in the patch constant phase directly.
Instead of using DCL_INPUT.

The main goal here is to eventually get rid of the I/O
declaration instructions. A positive side effect is that we don't
add a useless barrier to shaders which have a DCL_INPUT instruction
in the patch constant phase but don't actually read OUTCONTROLPOINT
registers.
2024-11-27 13:59:39 +01:00
Giovanni Mascellani
1cfe23569c vkd3d-shader/ir: Synthesize the default control point phase in the HS control point I/O normaliser.
This makes it available to all backends, without requiring an
ad-hoc solution for each of them. It also gets rid of an
undocumented flag we're currently passing to
DCL_CONTROL_POINT_PHASE.
2024-11-27 13:57:09 +01:00