Commit Graph

8422 Commits

Author SHA1 Message Date
Francisco Casas
6ca05f458e vkd3d-shader/hlsl: Actually emit 0xf write masks for FOG and PSIZE destination operands. 2025-11-10 15:54:59 +01:00
Francisco Casas
5dc96ab8d6 tests/hlsl: Test which shader models allow FOG and PSIZE. 2025-11-10 15:54:18 +01:00
Shaun Ren
58d02da892 vkd3d-shader/hlsl: Use a bool type for "new_cond" in lower_conditional_block_discard_nz().
This fixes the assertion error

    "sm4_generate_vsir_instr_expr Failed assertion: dst_type->e.numeric.type == HLSL_TYPE_BOOL"

which occurs when compiling the following HLSL shader using the ps_4_0 target profile:

    uniform float4 x;
    uniform bool b;

    float4 main() : SV_Target
    {
        if (!b)
            clip(x.x);
        else
            clip(x.y);

        return x;
    }
2025-11-10 15:51:26 +01:00
Giovanni Mascellani
0c9a5b7a0c tests/d3d12: Do not crash when failing to create a shader cache session.
With some (Windows 11) runtimes creating a shader cache session fails
when the requested size is too small. The test will have to be fixed for
that, but in the meantime let's at least ensure it doesn't crash.
2025-11-10 15:37:52 +01:00
Elizabeth Figura
67d391fad8 vkd3d-shader/hlsl: Use replace_ir() for lower_discard_nz(). 2025-11-06 15:59:50 +01:00
Elizabeth Figura
88b218cae1 vkd3d-shader/hlsl: Use replace_ir() for lower_resource_load_bias(). 2025-11-06 15:59:01 +01:00
Elizabeth Figura
bf702331d9 vkd3d-shader/hlsl: Use replace_ir() for hlsl_normalize_binary_exprs(). 2025-11-06 14:10:53 +01:00
Elizabeth Figura
974db85d07 vkd3d-shader/hlsl: Use replace_ir() for fold_unary_identities(). 2025-11-06 14:10:53 +01:00
Henri Verbeet
74ebd4621f vkd3d-shader/msl: Implement VSIR_OP_FIRSTBIT_HI. 2025-11-04 14:59:38 +01:00
Henri Verbeet
c576a09d57 vkd3d-shader/msl: Implement VSIR_OP_FIRSTBIT_LO. 2025-11-04 14:59:38 +01:00
Henri Verbeet
08026880d6 vkd3d-shader/msl: Implement VSIR_OP_COUNTBITS. 2025-11-04 14:59:38 +01:00
Henri Verbeet
f431cddc9f vkd3d-shader/msl: Implement support for VKD3DSPR_IMMCONSTBUFFER registers. 2025-11-04 14:59:38 +01:00
Henri Verbeet
51cce61770 vkd3d-shader/msl: Implement VSIR_OP_SYNC. 2025-11-04 14:59:38 +01:00
Henri Verbeet
3660a5a79c vkd3d-shader/msl: Include metal_stdlib in the generated code.
We're already using functions not made available through either
metal_common or metal_texture. This doesn't seem to be an issue for the
Metal shader runner, possibly because the "online" compiler includes the
required headers by default. In any case, including metal_stdlib should
make all of MSLib available.
2025-11-04 14:59:38 +01:00
Giovanni Mascellani
d6d1485e40 ci: Execute DXC tests on 32-bit as well. 2025-11-03 17:52:54 +01:00
Giovanni Mascellani
92f22edb88 ci: Merge job test-win-64-dxc into test-win-64.
DXC doesn't fail any more, so there is no need for two jobs.
2025-11-03 17:52:54 +01:00
Giovanni Mascellani
12c713bbfa tests/hlsl: Do not execute 64-bit wave bitwise operations on WARP.
They are known to be buggy on the CI machine.
2025-11-03 17:52:32 +01:00
Giovanni Mascellani
1cda8afc07 ci: Exclude the WARP driver from the test-win-32 and test-win-64 artifacts. 2025-11-03 17:51:56 +01:00
Giovanni Mascellani
b835510010 tests/hlsl: Test shader model 6.2 denormal mode for 16-bit and 64-bit floats. 2025-10-30 19:12:39 +01:00
Giovanni Mascellani
69c109786b tests/hlsl: Test shader model 6.2 denormal mode for 32-bit floats. 2025-10-30 19:12:27 +01:00
Giovanni Mascellani
da6ce78c1c tests/shader_runner: Add support for testing explicit descriptor mapping.
When no descriptor mapping is specified, the backend will just
build the usual default mapping. Otherwise the explicit mapping
is used.

Once all backends support the explicit mapping, we'll be able to
handle generating the default mapping in the shader runner core
rather than having each backend implement its own algorithm.

So far only the d3d12 backend supports explicit descriptor
mapping.
2025-10-30 18:42:35 +01:00
Giovanni Mascellani
6b157cc149 tests/shader_runner_d3d12: Move the uniform root parameter to the end of the root signature.
So that it's easy to index SRV and UAV root parameters without an offset.
2025-10-30 18:27:04 +01:00
Giovanni Mascellani
cc1db404b0 vkd3d-shader/msl: Implement support for VKD3DSPR_UNDEF registers.
MSL doesn't seem to have any special handling for undefined values,
differently from SPIR-V. Thus we just emit zeros.

UNDEF registers are sometimes created by the DXIL parser,
for example in sm6_parser_emit_composite_construct().
2025-10-30 18:18:14 +01:00
Giovanni Mascellani
eaabd2ffd7 vkd3d-shader/msl: Allow binding to descriptor arrays.
This requires merging adjacent bindings in the Metal shader runner,
mostly like 805a4bc1e8 did for the
d3d12 backend.
2025-10-30 17:53:10 +01:00
Giovanni Mascellani
82619e81c3 tests/shader_runner_metal: Unify the UAV and TEXTURE cases when computing descriptor bindings. 2025-10-30 17:52:28 +01:00