Commit Graph

2621 Commits

Author SHA1 Message Date
Giovanni Mascellani
a6c6ba6eda tests/hlsl: Check the result for attribute evaluation tests more sharply.
Those tests are meant to check that each single sample computes the
right value during a multi-sampled rendering operation. Checking whether
the result is correct after multi-sample resolution isn't enough,
because errors at different samples belonging to the same pixel might
have cancelled out.

Instead, for each shader invocation we compute the expected result and
return the absolute value of the difference between the expected and
computed value. This way errors at different samples cannot cancel out,
but add up.
2025-10-16 14:16:43 +02:00
Giovanni Mascellani
085ba17c4c tests/d3d12: Use D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE in test_stencil_load().
The texture is also accessed by a compute shader.
2025-10-16 14:03:08 +02:00
Giovanni Mascellani
6d4df71f61 tests/d3d12: Use D3D12_RESOURCE_STATE_ALL_SHADER_RESOURCE in test_depth_load().
The texture is also accessed by a compute shader.
2025-10-16 14:03:01 +02:00
Giovanni Mascellani
beed3f0e15 tests: Print ANSI colour codes in the Windows test driver.
That program is only meant to be used in the specific context of the CI,
so we don't care about querying the terminal or honouring environment
variables.
2025-10-16 14:01:01 +02:00
Elizabeth Figura
507990d3c5 vkd3d-shader/d3dbc: Fix writing vertex input semantics. 2025-10-15 12:55:16 +02:00
Elizabeth Figura
cb514ef6e0 tests: Test a shader with many semantics. 2025-10-15 12:54:52 +02:00
Henri Verbeet
e7f258c622 vkd3d-shader/d3dbc: Get the resource/sampler index from the destination operand in vsir_program_lower_texld_sm1(). 2025-10-15 12:45:39 +02:00
Henri Verbeet
1b491a657c tests: Test that ps_1_4 texld samples from the sampler corresponding to the destination operand. 2025-10-15 12:45:39 +02:00
Conor McCarthy
1c23976660 vkd3d-shader/ir: Fix the addition swizzle in vsir_program_lower_precise_mad().
The swizzle from vsir_swizzle_from_writemask() is for use with a
contiguous write mask starting at bit zero, but we need the final write
mask to match that of the original MAD instruction.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=58746
2025-10-15 12:41:49 +02:00
Conor McCarthy
f9d12e5596 tests/hlsl: Add a precise MAD test where the first component is not x. 2025-10-15 12:41:49 +02:00
Henri Verbeet
a2ce610cc9 vkd3d-shader/glsl: Handle VSIR_DATA_SNORM and VSIR_DATA_UNORM in shader_glsl_vprint_assignment(). 2025-10-15 12:41:49 +02:00
Conor McCarthy
1586c2294a vkd3d-shader/spirv: Handle VSIR_DATA_SNORM and VSIR_DATA_UNORM in spirv_get_type_id(). 2025-10-15 12:41:49 +02:00
Henri Verbeet
f02c0e9be8 tests/hlsl: Add tests for unorm and snorm buffer SRVs. 2025-10-15 12:41:49 +02:00
Henri Verbeet
9b98761909 vkd3d-shader/msl: Implement VSIR_OP_IREM. 2025-10-14 15:49:18 +02:00
Henri Verbeet
b6acac49f1 vkd3d-shader/msl: Implement VSIR_OP_UREM. 2025-10-14 15:49:18 +02:00
Henri Verbeet
69879129f8 vkd3d-shader/msl: Implement VSIR_OP_IDIV. 2025-10-14 15:49:18 +02:00
Henri Verbeet
90758b7ca8 vkd3d-shader/msl: Implement VSIR_OP_UDIV_SIMPLE. 2025-10-14 15:49:18 +02:00
Henri Verbeet
62fa65066f tests/shader_runner: Use format names if available in trace_format_cap(). 2025-10-13 19:04:19 +02:00
Henri Verbeet
9de229925d vkd3d-shader/ir: Handle integer division by zero in vsir_program_lower_udiv().
This achieves two things:
  - The GLSL backend no longer needs to handle this by itself. Likwise, the
    MSL backend won't have to either.
  - We no longer handle division by zero for DXIL UDiv and URem instructions,
    which leave this undefined.
2025-10-13 19:00:05 +02:00
Henri Verbeet
7aa6f4f8b6 tests: Replace the test_shader_instructions() "ps_udiv" test with a shader runner test. 2025-10-13 19:00:05 +02:00
Elizabeth Figura
dd55b15865 vkd3d-shader/ir: Implement an initial vsir copy propagation pass. 2025-10-13 18:55:42 +02:00
Elizabeth Figura
539a5be370 vkd3d-shader: Introduce an interface to specify 1.x texture dimensions. 2025-10-13 18:40:44 +02:00
Henri Verbeet
c522db8ce8 tests/shader_runner: Handle the "rgba" probe format as an alias for "f32". 2025-10-07 13:12:36 +02:00
Elizabeth Figura
c8b2aca23d vkd3d-shader/hlsl: Make ConstructGSWithSO an intrinsic function.
It's not a keyword.
2025-10-07 13:10:26 +02:00
Giovanni Mascellani
cd64aa69c8 tests/shader_runner: Introduce a new tag system.
Mostly to be able to associate a version number to each tag and
get rid of all the foo<1.2.3 tags. The new system also has fixed
tag slots, rather than dealing with strings, so we don't have to
manually adjust the size of the `tags' array.

With the new system each tag can be present or not, and if it is
present it can have an associated version number (of the form
major.minor.patch). If the version is not available, it is set to
0.0.0. Each tag can be queried for existence and for comparison
with the version number.
2025-10-06 19:41:09 +02:00