Shaders: write one PSV0 semantic string per element #73

Closed
Kaivyyy wants to merge 1 commit from upstream-pr/73 into main
Kaivyyy commented 2026-11-24 21:10:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Kaivyyy on 2026-11-24T21:10:04Z.


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.
<!-- greyfinch-sync:fxceless/victory-fork:issue:6591475955 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/73). Originally posted by [Kaivyyy](https://github.com/Kaivyyy) on 2026-11-24T21:10:04Z. --- ## 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.
upstream-sync closed this pull request 2026-11-24 21:30:29 +00:00
Kaivyyy commented 2026-11-24 21:30:42 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Kaivyyy on 2026-11-24T21:12:39Z.


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

<!-- greyfinch-sync:fxceless/victory-fork:comment:7144626172 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/73#issuecomment-7144626172). Originally posted by [Kaivyyy](https://github.com/Kaivyyy) on 2026-11-24T21:12:39Z. --- Closing in favor of #61, which was opened a few minutes earlier with the same root-cause fix.

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
fxceless/victory-fork!73
No description provided.