Francisco Casas
583016e550
tests/hlsl: Test clip/cull distance inputs.
2025-11-25 15:50:51 +01:00
Henri Verbeet
3431c006ae
tests/hlsl: Avoid sampling on texel edges in ps1-projection.shader_test.
...
In the projected case, (1.2, 0.5) divided by 2.0 results in (0.6, 0.25) as
effective coordinates. The 0.25 y-coordinate is well within the second row of
texels; that's fine. On the other hand, the 0.6 x-coordinate falls right
between the third and fourth column of texels. The test expects the fourth
column to be selected, but that's very fragile: neither 1.2 nor 0.6 can be
exactly represented as a 32-bit floating-point value, and it only takes a
single ulp to push things to the other side of the edge.
2025-11-24 18:54:54 +01:00
Giovanni Mascellani
f47f712164
tests/hlsl: Test SM6.6 dynamic resources.
2025-11-24 17:38:14 +01:00
Giovanni Mascellani
d380bc196f
tests/shader_runner: Use SHADER_MODEL_MAX to represent the maxium supported shader model.
2025-11-24 17:14:24 +01:00
Giovanni Mascellani
b93fceb6a5
tests/shader_runner: Keep a single array of shader model strings.
...
That is, one with dots and one with underscores.
2025-11-24 17:13:00 +01:00
Anna (navi) Figueiredo Gomes
13ee6d74ad
vkd3d-shader/hlsl: Store statically initialized constant scalars/vectors in ctx->static_initializers.
...
Constant numeric local variables can be used in places were literals are
expected if they're initialized with a static expression.
Storing such constant in ctx->static_initializers allows copy-prop to
handle such cases properly.
2025-11-24 17:09:15 +01:00
Anna (navi) Figueiredo Gomes
4a8eabf517
tests/hlsl: Add const scalar array dimension tests.
2025-11-24 17:05:45 +01:00
Giovanni Mascellani
e4cbbe3172
tests/shader_runner_d3d12: Lay out the descriptor heap as suggested by descriptor mappings.
2025-11-20 18:29:28 +01:00
Giovanni Mascellani
9b7ff3dcf6
tests/shader_runner_d3d12: Do not keep a free list for pipeline states.
...
It's not very useful, since we're synchronizing with the GPU
anyway.
2025-11-20 18:27:04 +01:00
Giovanni Mascellani
544a0d1631
tests/shader_runner_d3d12: Do not leave a root signature around between draw calls.
...
Since it's always recreated anyway.
2025-11-20 18:27:04 +01:00
Elizabeth Figura
c50210f230
vkd3d-shader: Implement shader model 1.0-1.3 texture projection.
2025-11-20 18:15:15 +01:00
Giovanni Mascellani
654c96fc94
tests/d3d12: Mark a texture aliasing test as todo on Intel.
2025-11-17 15:21:08 +01:00
Giovanni Mascellani
ffbf0320ba
tests/hlsl: Mark a denormalization mode test as todo on Intel.
...
It behaves the same as llvmpipe.
2025-11-17 15:20:47 +01:00
Anna (navi) Figueiredo Gomes
990be02cca
vkd3d-shader/hlsl: Add a default value fail test with all allowed instructions.
...
Co-Authored-By: Francisco Casas <fcasas@codeweavers.com >
2025-11-17 15:15:47 +01:00
Giovanni Mascellani
7f377879fc
vkd3d-shader/spirv: Clamp push constant CBV sizes to those of the push constant ranges backing them.
...
Otherwise invalid SPIR-V may be generated, because the CBV field in
"push_cb_struct" may end up overlapping with a subsequent one.
2025-11-12 15:24:30 +01:00
Giovanni Mascellani
2903831f79
tests/hlsl: Test using an SRV in combination with a CBV larger than the declared uniforms.
...
This appears to be valid on native (no validation message is
raised) but is not properly handled by vkd3d.
2025-11-12 15:19:33 +01:00
Henri Verbeet
4039168bca
vkd3d-shader/hlsl: Consider scalars to be equivalent to 1-component vectors in hlsl_add_conditional().
2025-11-12 15:12:30 +01:00
Giovanni Mascellani
7022bb57fc
tests/shader_runner_metal: Implement explicit descriptor mapping.
2025-11-12 15:02:58 +01:00
Giovanni Mascellani
653de0c076
tests/shader_runner: Generate a default descriptor mapping when none is provided.
2025-11-12 15:02:18 +01:00
Giovanni Mascellani
a30c07f510
tests/shader_runner_d3d12: Always create a descriptor heap.
...
So it's also available when resources are not used, which
simplifies later commits.
2025-11-12 14:58:15 +01:00
Giovanni Mascellani
fb985f496d
tests/shader_runner_d3d12: Appropriately set the root descriptor table for dispatching.
2025-11-12 14:57:24 +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
Henri Verbeet
74ebd4621f
vkd3d-shader/msl: Implement VSIR_OP_FIRSTBIT_HI.
2025-11-04 14:59:38 +01:00