Henri Verbeet pushed to branch master at wine / vkd3d
Commits: 583016e5 by Francisco Casas at 2025-11-25T15:50:51+01:00 tests/hlsl: Test clip/cull distance inputs.
- - - - - e23b3c84 by Francisco Casas at 2025-11-25T15:54:40+01:00 tests/hlsl: Test clip distance semantic indexes above the 0-1 range.
- - - - - 59ba079e by Francisco Casas at 2025-11-25T17:01:12+01:00 vkd3d-shader/ir: Introduce vsir_opcode_is_fork_or_join_phase().
- - - - - e00bc4b9 by Francisco Casas at 2025-11-25T17:01:59+01:00 vkd3d-shader/ir: Introduce vsir_opcode_is_control_point_phase().
- - - - - 1307659e by Francisco Casas at 2025-11-25T17:24:29+01:00 vkd3d-shader/ir: Assign new register indexes to clip plane signature elements.
- - - - - 85b7b9c6 by Francisco Casas at 2025-11-25T19:45:19+01:00 vkd3d-shader/ir: Introduce vsir_signature_element_is_array().
- - - - - 0dabfdee by Francisco Casas at 2025-11-25T19:49:11+01:00 vkd3d-shader/ir: Transform clip/cull inputs/outputs into arrays.
Takes care of transforming clip/cull system values from the Direct3D convention of 2 4-component registers, into the SPIR-V/GLSL convention of 8-element scalar float arrays.
This fixes SPIR-V validation errors in clip-cull-distance.shader_test, as well as segfaults on Mesa 25.1.1-arch1.2 if those shaders are executed regardless.
We create indexable temporaries of the appropriate size, and replace accesses to clip/cull I/O signature elements with accesses to those temporaries. The existing clip/cull signature elements are then replaced with new scalar signature element arrays, and we copy the contents of those I/O signature elements to/from the corresponding temporaries at the start/end of the vsir program.
It is worth pointing out that the current implementation assumes that every instance of the control point phase of a hull shader only writes to the output registers of its control point, given by vOutputControlPointID, and not to other control points. Shader compilation will fail if that constraint is violated.
- - - - - 60fc0728 by Henri Verbeet at 2025-11-25T19:49:28+01:00 vkd3d-shader/ir: Move "has_descriptor_info" and "has_no_modifiers" to struct vsir_normalisation_flags.
- - - - - 41c593ef by Francisco Casas at 2025-11-25T19:58:24+01:00 tests/hlsl: Test clip/cull distance semantics as arrays.
Arrays are allowed for clip/cull distance semantics. Their maximum size is 2 since that's the maximum amount of registers allowed for clip/cull distances.
Indirect addressing of these arrays is allowed on shader model 6.
These tests are introduced after the transformation of clip/cull input/outputs into arrays in vsir since otherwise they segfault.
- - - - - 7b1b52df by Francisco Casas at 2025-11-25T19:58:45+01:00 vkd3d-shader/spirv: Remove the unused "array_element_mask field" from struct vkd3d_shader_output_info.
- - - - -
12 changed files:
- Makefile.am - libs/vkd3d-shader/d3dbc.c - libs/vkd3d-shader/glsl.c - libs/vkd3d-shader/hlsl_codegen.c - libs/vkd3d-shader/ir.c - libs/vkd3d-shader/msl.c - libs/vkd3d-shader/spirv.c - libs/vkd3d-shader/tpf.c - libs/vkd3d-shader/vkd3d_shader_main.c - libs/vkd3d-shader/vkd3d_shader_private.h - tests/hlsl/clip-cull-distance.shader_test → tests/hlsl/clip-cull-distance-1.shader_test - + tests/hlsl/clip-cull-distance-2.shader_test
View it on GitLab: https://gitlab.winehq.org/wine/vkd3d/-/compare/e9d08df0108e1a6b7dd67b37f3ed2...