Port XEMSS parser, shader and offline translation improvements #361

Open
tecnofifamobile-ai wants to merge 4 commits from upstream-pr/361 into main
tecnofifamobile-ai commented 2026-11-24 23:53:53 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by tecnofifamobile-ai on 2026-11-24T23:53:53Z.


Summary

This consolidates the reusable changes from XEMSS into VIctory fork's existing PE parser, shader compiler and victory translate workflow.

  • Validate DXBC part offsets against the end of the header and offset table.
  • Validate AMD64 PE TLS directory size, callback addresses and null termination. Preserve a terminator in a section's zero-filled mapped tail.
  • Build shader blocks in decoded address order and reject late far jumps with no decoded target. Keep the fork's lane-spill handling.
  • Lower all 15 nonzero float image_store masks, including sparse masks and packed f16 operands. Add RGBA32F GPU readback coverage.
  • Add opt-in --output and --timings to victory translate. Export mode preserves distinct containers and existing output files, reports partial failures, and enforces the repository's output policy. The existing validation and pipeline checks remain in the workflow.

Ports XEMSS #5 and #6, plus the initial XEMSS DXBC boundary fix. f16 signed-zero coverage is already tracked in #278.

Verification

  • Windows x64 with the Windows SDK DXIL validator.
  • Full local Windows suite: 503 reported passed, 0 failed, 7 ignored, including the repository asset-policy test. The optional console-compiler comparisons were skipped.
  • PE and shader crate suites passed locally. The masked store regression passed on both hardware and WARP for f32 and packed f16.
  • CLI integration passed with a broken input, an unsupported stage, and two distinct containers sharing a DXIL part. Both good outputs were written and preserved on rerun.
  • Workspace Clippy passed with default and all features using -D warnings. git diff --check passed.

All new fixtures are generated by the tests. No game inputs are included in this change.

AI-assisted with Codex.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6593857505 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/361). Originally posted by [tecnofifamobile-ai](https://github.com/tecnofifamobile-ai) on 2026-11-24T23:53:53Z. --- ## Summary This consolidates the reusable changes from XEMSS into VIctory fork's existing PE parser, shader compiler and `victory translate` workflow. - Validate DXBC part offsets against the end of the header and offset table. - Validate AMD64 PE TLS directory size, callback addresses and null termination. Preserve a terminator in a section's zero-filled mapped tail. - Build shader blocks in decoded address order and reject late far jumps with no decoded target. Keep the fork's lane-spill handling. - Lower all 15 nonzero float `image_store` masks, including sparse masks and packed f16 operands. Add RGBA32F GPU readback coverage. - Add opt-in `--output` and `--timings` to `victory translate`. Export mode preserves distinct containers and existing output files, reports partial failures, and enforces the repository's output policy. The existing validation and pipeline checks remain in the workflow. Ports [XEMSS #5](https://github.com/tecnofifamobile-ai/XEMSS/pull/5) and [#6](https://github.com/tecnofifamobile-ai/XEMSS/pull/6), plus the initial XEMSS DXBC boundary fix. f16 signed-zero coverage is already tracked in #278. ## Verification - Windows x64 with the Windows SDK DXIL validator. - Full local Windows suite: 503 reported passed, 0 failed, 7 ignored, including the repository asset-policy test. The optional console-compiler comparisons were skipped. - PE and shader crate suites passed locally. The masked store regression passed on both hardware and WARP for f32 and packed f16. - CLI integration passed with a broken input, an unsupported stage, and two distinct containers sharing a DXIL part. Both good outputs were written and preserved on rerun. - Workspace Clippy passed with default and all features using `-D warnings`. `git diff --check` passed. All new fixtures are generated by the tests. No game inputs are included in this change. AI-assisted with Codex.
This pull request cannot be merged automatically due to conflicts.
Merge manually to resolve the conflicts.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin 'upstream-pr/361:upstream-pr/361'
git switch 'upstream-pr/361'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'upstream-pr/361'
git switch 'upstream-pr/361'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/361'
git switch 'upstream-pr/361'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/361'
git switch 'main'
git merge --squash 'upstream-pr/361'
git switch 'main'
git merge --ff-only 'upstream-pr/361'
git switch 'main'
git merge 'upstream-pr/361'
git push origin 'main'
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!361
No description provided.