Shader: fix DXIL signature ordering for packed semantics #112

Open
github-bot wants to merge 1 commit from github-bot/gh-112 into main AGit
Owner

@⁠avt0m4t48 on GitHub · 2026-11-24 21:34 UTC · original
avt0m4t48:fix/dxil-signature-name-order → main · +37 −2 · 1 files · 1 commits · open

Refs #53. The DXC container writer orders signature records by stream, register, and semantic-name offset. VIctory emits stream zero and was using component column as the register tie-breaker. Use the already-computed name offset so packed semantics serialize in the order the validator expects. DXC signature writer

The regression packs two semantics in one register in an order that differs from both their component columns and their alphabetical order. It checks input and output records and verifies their masks. The test fails with the old comparator. With the fix, the shader crate's library suite passed 171 tests with two ignored.

A separate, source-built pixel shader reproduced Container part 'Program Input Signature' does not match expected for module with Linux dxv. Re-emitting it with the comparator change passed validation. The retail shader from #53 and its Windows pipeline were not rerun.

cargo test --locked -p victory-shader signature_sorts_packed_registers_by_semantic_name_offset
cargo test --locked -p victory-shader --lib

AI-assisted using Codex. Source-built inputs only.

**@⁠avt0m4t48** on GitHub · 2026-11-24 21:34 UTC · [original](https://github.com/fxceless/victory-fork/pull/112) `avt0m4t48:fix/dxil-signature-name-order` → `main` · +37 −2 · 1 files · 1 commits · open Refs #53. The DXC container writer orders signature records by stream, register, and semantic-name offset. VIctory emits stream zero and was using component column as the register tie-breaker. Use the already-computed name offset so packed semantics serialize in the order the validator expects. [DXC signature writer](https://github.com/microsoft/DirectXShaderCompiler/blob/main/lib/DxilContainer/DxilContainerAssembler.cpp#L209-L216) The regression packs two semantics in one register in an order that differs from both their component columns and their alphabetical order. It checks input and output records and verifies their masks. The test fails with the old comparator. With the fix, the shader crate's library suite passed 171 tests with two ignored. A separate, source-built pixel shader reproduced `Container part 'Program Input Signature' does not match expected for module` with Linux `dxv`. Re-emitting it with the comparator change passed validation. The retail shader from #53 and its Windows pipeline were not rerun. ```sh cargo test --locked -p victory-shader signature_sorts_packed_registers_by_semantic_name_offset cargo test --locked -p victory-shader --lib ``` AI-assisted using Codex. Source-built inputs only.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 03:36:21 +00:00
Author
Owner

@⁠arminkhaleghirod on GitHub · 2026-11-24 22:23 UTC · original

Merged onto main 90228a7 and ran victory translate --validate over the full title (26,148 programs) on Windows 11 / RTX 4080.

Clears the 39 Program Output Signature and 33 Program Input Signature mismatches. On main those 72 programs then fall into the blanket PSV mismatch (17,359 → 17,431), so the gain only shows on top of #61. #124, #110 and #112 give identical counts here, so they look like they overlap.

**@⁠arminkhaleghirod** on GitHub · 2026-11-24 22:23 UTC · [original](https://github.com/fxceless/victory-fork/pull/112#issuecomment-7146176885) Merged onto main 90228a7 and ran `victory translate --validate` over the full title (26,148 programs) on Windows 11 / RTX 4080. Clears the 39 `Program Output Signature` and 33 `Program Input Signature` mismatches. On main those 72 programs then fall into the blanket PSV mismatch (17,359 → 17,431), so the gain only shows on top of #61. #124, #110 and #112 give identical counts here, so they look like they overlap.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/112/head:github-bot/gh-112'
git switch 'github-bot/gh-112'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-112'
git switch 'github-bot/gh-112'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-112'
git switch 'github-bot/gh-112'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-112'
git switch 'main'
git merge --squash 'github-bot/gh-112'
git switch 'main'
git merge --ff-only 'github-bot/gh-112'
git switch 'main'
git merge 'github-bot/gh-112'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.