mesa/src
Virgile Bello 50ab52f135 microsoft/compiler, d3d12: preserve TCS outputs and pad TES inputs for cross-stage signature matching
Four linked D3D12 pipeline-validation problems with GLSL TCS on DXIL:

1) dxil_nir_kill_unused_outputs killed TCS outputs read back by the
   patch-constant function after a barrier, zeroing the tess factors.
   Keep shader_out locations with any intra-shader load_deref live
   regardless of next_stage_read_mask.

2) is_dead_in_variable dropped TES padding placeholders (no local
   uses) in nir_remove_dead_variables. Also honor
   prev_stage_written_mask so padded TES inputs stay alive.

3) Preserving (1) leaves HS with outputs the DS doesn't declare,
   breaking pipeline validation (e.g. piglit's barrier.shader_test).
   Add dxil_nir_pad_tes_input_signature, called from both link paths,
   to synthesize matching TES inputs (reusing each TCS output's type
   so sig shape and stride match byte-for-byte) plus the tess-level
   inputs -- subsuming the tess-level-only block previously in
   dxil_spirv_nir_link. Scope the per-variable padding to TCS
   outputs that TCS itself reads back via load_deref: outputs that
   neither TES nor TCS consumes get killed from the HS signature,
   so padding them into DS would make the DS input signature longer
   than HS output and break validation for SSO pipelines whose TCS
   declares unused per-patch writes (arb_separate_shader_objects/
   mix-and-match-tcs-tes).

4) remove_hs_intrinsics rewrote load_output but not
   load_per_vertex_output in HS main. With (1) keeping outputs alive,
   GLSL reads of outputs in main whose result survives DCE (UAV
   atomics, non-tess per-vertex output writes) left
   LoadOutputControlPoint in the control-point function, which dxil.dll
   rejects outside the PCF (CreatePipelineState then fails with
   E_INVALIDARG). Treat load_per_vertex_output like load_output.

Validated on piglit arb_tessellation_shader/execution (WARP + DXC
1.8.2403): barrier now passes; the previously-crashing
tcs-output-unmatched and variable-indexing/tcs-output-array-* fail
gracefully matching baseline; isoline/isoline-no-tcs remain flakes
(pre-existing canary corruption, unrelated).

d3d12-quick_shader.txt drops barrier; d3d12-flakes.txt adds
isoline-no-tcs alongside isoline.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41028>
2026-04-23 18:45:01 +00:00
..
amd radv: advertise VK_KHR_shader_constant_data 2026-04-23 11:12:06 +00:00
android_stub android_stub: fix missing prototypes issues 2025-12-02 20:03:02 +00:00
asahi spirv,treewide: rework specialization constant 2026-04-22 06:57:55 +00:00
broadcom ci: Delete references to various broken traces. 2026-04-22 17:39:31 +00:00
c11 c11/threads: fix build on c23 2025-11-10 07:01:50 +10:00
compiler spirv: add support for SPV_KHR_constant_data 2026-04-23 11:12:06 +00:00
drm-shim drm-shim: fix shim on GLX 2026-04-14 12:06:10 +00:00
egl meson: Add support for buidling zink + Turnip/KGSL 2026-03-31 15:00:29 +00:00
etnaviv Uprev Piglit to 11ce9eb56edb00e6a7702d13168cc827ce5e0cbd 2026-04-10 21:21:52 +00:00
freedreno tu: Fix draw call offset for LRZ warnings in secondaries 2026-04-23 14:23:25 +00:00
gallium microsoft/compiler, d3d12: preserve TCS outputs and pad TES inputs for cross-stage signature matching 2026-04-23 18:45:01 +00:00
gbm gbm: Make documentation for gbm_bo_map more explicit 2025-12-29 10:05:38 +00:00
getopt
gfxstream gfxstream: fix string array marshalling 2026-04-20 15:46:58 +00:00
glx meson: Add support for buidling zink + Turnip/KGSL 2026-03-31 15:00:29 +00:00
gtest
imagination spirv,treewide: rework specialization constant 2026-04-22 06:57:55 +00:00
imgui
intel drirc/anv: add flag to disable VK_EXT_subgroup_size_control 2026-04-23 13:16:05 +00:00
kosmickrisp kk: Add ds state to fragment key since it's part of the pipeline we compile 2026-04-23 12:59:24 +00:00
loader kmsro: wire Zink up as a fallback 2026-03-13 18:54:26 +00:00
mesa spirv,treewide: rework specialization constant 2026-04-22 06:57:55 +00:00
microsoft microsoft/compiler, d3d12: preserve TCS outputs and pad TES inputs for cross-stage signature matching 2026-04-23 18:45:01 +00:00
nouveau nak/lower_cf: remove single src phis 2026-04-21 23:37:55 +00:00
panfrost pan/bi: Fix format in bi_repair_ssa 2026-04-23 15:49:48 +00:00
poly panvk/csf: implement VK_EXT_primitives_generated_query primitive restart 2026-01-21 09:03:34 +00:00
tool intel: Include available counter descriptions in the perfetto counter spec 2026-03-06 08:47:16 +00:00
util drirc: set anv_disable_subgroup_size_control for bg3 2026-04-23 13:16:05 +00:00
virtio ci/venus: update expectation for an expected fail 2026-04-10 12:16:04 +00:00
vulkan vulkan: add tracking for VK_EXT_primitive_restart_index 2026-04-22 08:52:57 +00:00
x11 meson: Add support for buidling zink + Turnip/KGSL 2026-03-31 15:00:29 +00:00
.clang-format intel: add Jay 2026-04-10 18:21:21 +00:00
meson.build gallium/dril: Don't use gbm if there is no gbm configured 2026-02-17 08:24:02 +00:00