Shaders: write one PSV0 semantic string per element #73

Closed
github-bot wants to merge 1 commit from gh-pr/73/head into gh-pr/73/base
Owner

@⁠Kaivyyy on GitHub · 2026-11-24 21:10 UTC · original
Kaivyyy:shader/mesh-psv-strings → main · +120 −12 · 1 files · 1 commits · closed without merging

Summary

container::psv previously deduplicated arbitrary semantic names in the PSV0 string table via substring search ( ind(&strings, &needle)). As already noted in container::signature for ISG1/OSG1, DXC keys its string table by each signature element's own name buffer rather than by string content, emitting one NUL-terminated entry per arbitrary semantic element in element order (repeats included).

Sharing offsets caused the Windows SDK dxil.dll validator to reject PSV0:

  • on mesh shaders with repeated semantic names (such as TEXCOORD0/TEXCOORD1, see #12) under Windows SDK 10.0.26100.0 and 10.0.22621.0;
  • on vertex, pixel, and geometry shaders with repeated or suffix-overlapping semantics (including emit::rect::tests::the_rectangle_stage_is_a_geometry_shader) under Windows SDK 10.0.22621.0.

Testing

  • Added mesh_and_vertex_signatures_with_repeated_and_suffix_names_validate covering repeated TEXCOORD/CUSTOM mesh outputs and repeated/suffix-overlapping TEXCOORD/BCOLOR/COLOR vertex outputs.
  • Verified cargo test -p victory-shader --locked against both Windows SDK 10.0.26100.0 and 10.0.22621.0 dxil.dll validators, plus cargo clippy --all-targets --all-features -- -D warnings.
**@⁠Kaivyyy** on GitHub · 2026-11-24 21:10 UTC · [original](https://github.com/fxceless/victory-fork/pull/73) `Kaivyyy:shader/mesh-psv-strings` → `main` · +120 −12 · 1 files · 1 commits · closed without merging ## Summary container::psv previously deduplicated arbitrary semantic names in the PSV0 string table via substring search ( ind(&strings, &needle)). As already noted in container::signature for ISG1/OSG1, DXC keys its string table by each signature element's own name buffer rather than by string content, emitting one NUL-terminated entry per arbitrary semantic element in element order (repeats included). Sharing offsets caused the Windows SDK dxil.dll validator to reject PSV0: - on mesh shaders with repeated semantic names (such as TEXCOORD0/TEXCOORD1, see #12) under Windows SDK 10.0.26100.0 and 10.0.22621.0; - on vertex, pixel, and geometry shaders with repeated or suffix-overlapping semantics (including emit::rect::tests::the_rectangle_stage_is_a_geometry_shader) under Windows SDK 10.0.22621.0. ## Testing - Added mesh_and_vertex_signatures_with_repeated_and_suffix_names_validate covering repeated TEXCOORD/CUSTOM mesh outputs and repeated/suffix-overlapping TEXCOORD/BCOLOR/COLOR vertex outputs. - Verified cargo test -p victory-shader --locked against both Windows SDK 10.0.26100.0 and 10.0.22621.0 dxil.dll validators, plus cargo clippy --all-targets --all-features -- -D warnings.
As in ISG1/OSG1, DXC keys its PSV0 string table by each element's own name buffer rather than sharing substrings across elements. Sharing substrings caused dxil.dll to reject PSV0 on mesh shaders with repeated semantics (such as TEXCOORD0/TEXCOORD1) on Windows SDK 10.0.26100.0 and on multi-element vertex, pixel and geometry signatures (including rect_list_gs) on Windows SDK 10.0.22621.0.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:35:39 +00:00
github-bot closed this pull request 2026-11-26 03:35:39 +00:00
Author
Owner

@⁠Kaivyyy on GitHub · 2026-11-24 21:12 UTC · original

Closing in favor of #61, which was opened a few minutes earlier with the same root-cause fix.

**@⁠Kaivyyy** on GitHub · 2026-11-24 21:12 UTC · [original](https://github.com/fxceless/victory-fork/pull/73#issuecomment-7144626172) Closing in favor of #61, which was opened a few minutes earlier with the same root-cause fix.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No description provided.