Commit Graph

8497 Commits

Author SHA1 Message Date
Giovanni Mascellani
8ec4f75654 vkd3d-shader/ir: Process all destinations when lowering SATURATE modifiers.
The instruction iterator should not be advanced when iterating
over more than one destination.
2025-10-16 14:56:30 +02:00
Giovanni Mascellani
737158e7b8 vkd3d-shader/ir: Remove SATURATE modifiers after lowering them. 2025-10-16 14:55:51 +02:00
Henri Verbeet
346b62bc70 vkd3d-shader/spirv: Free the output on failure in spirv_compiler_generate_spirv(). 2025-10-16 14:31:18 +02:00
Henri Verbeet
8df581b2d9 vkd3d-shader: Avoid referencing "ins" after insertion in vsir_program_materialise_phi_ssas_to_temps_in_function(). 2025-10-16 14:30:41 +02:00
Shaun Ren
27f0475dbe vkd3d-shader/ir: Keep source swizzles for registers with fixed masks in temp_allocator_set_src(). 2025-10-16 14:29:11 +02:00
Shaun Ren
b5e2e1dd06 vkd3d-shader/ir: Determine the correct writemask for destinations with fixed masks. 2025-10-16 14:27:29 +02:00
Shaun Ren
e5081a1bf9 tests/shader_runner: Add a "compile shader model" require directive.
This directive requires specific shader models to be tested for
compilation, bypassing the default behaviour where only one version from
each shader model set (SM1-3, SM4-5, SM6) is compiled.
2025-10-16 14:26:47 +02:00
Giovanni Mascellani
a7e56beb19 ci: Run the Windows tests with WARP version 1.0.16.1.
Many tests fail or even segfault with the older WARP version
provided by the current CI Windows environment.
2025-10-16 14:25:07 +02:00
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
Henri Verbeet
0e7eae00ba vkd3d-shader/d3dbc: Trace the vsir program before applying any transformations.
Specifically, before running vsir_program_lower_d3dbc().
2025-10-15 12:45:39 +02:00
Conor McCarthy
997d445724 vkd3d-shader/ir: Fix the FTOU swizzle for MOVA in vsir_program_normalize_addr(). 2025-10-15 12:41:49 +02:00
Conor McCarthy
13e631779d vkd3d-shader/ir: Use an SSA intermediate in vsir_program_lower_precise_mad(). 2025-10-15 12:41:49 +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
3943f9aca6 vkd3d-shader/spirv: Handle VSIR_DATA_SNORM and VSIR_DATA_UNORM in image_format_for_image_read().
Typed UAVs can be declared snorm or unorm.
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