Shaders: support raw FSSM native program blobs (XDAT kind 0x0c) #3116

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

@⁠fuzeofficlal on GitHub · 2026-11-26 08:42 UTC · original
fuzeofficlal:feat/shader-xdat-unpacked-fssm-0c → main · +148 −6 · 1 files · 1 commits · open

Summary

  • Extend native_programs in crates/victory-shader/src/native.rs to recognize XDAT entries with kind == 0x0c (KIND_NATIVE_UNPACKED) carrying raw, uncompressed FSSM blobs directly into programs(blob).
  • Preserve existing kind == 0x0d (XBCH zlib-compressed) behavior and skip unknown kinds unchanged.
  • Add synthetic unit tests covering unpacked VS/PS/CS parsing, mixed 0x0c/0x0d/unknown XDAT entries, malformed/truncated FSSM headers, and out-of-bounds XDAT offsets/sizes.

Verification

  • cargo test -p victory-shader --locked -- native::tests::: 17 passed, 0 failed.
  • cargo clippy -p victory-shader --all-targets --locked -- -D warnings: clean.
  • cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings: clean.
  • rustfmt --check --edition 2024 --config skip_children=true crates/victory-shader/src/native.rs: clean.
  • cargo test -p xtask --locked policy::tests::repository_passes_policy: 1 passed, 0 failed.
**@⁠fuzeofficlal** on GitHub · 2026-11-26 08:42 UTC · [original](https://github.com/Marvisak/VIctory/pull/3116) `fuzeofficlal:feat/shader-xdat-unpacked-fssm-0c` → `main` · +148 −6 · 1 files · 1 commits · open ## Summary - Extend `native_programs` in `crates/victory-shader/src/native.rs` to recognize `XDAT` entries with `kind == 0x0c` (`KIND_NATIVE_UNPACKED`) carrying raw, uncompressed `FSSM` blobs directly into `programs(blob)`. - Preserve existing `kind == 0x0d` (`XBCH` zlib-compressed) behavior and skip unknown kinds unchanged. - Add synthetic unit tests covering unpacked VS/PS/CS parsing, mixed `0x0c`/`0x0d`/unknown `XDAT` entries, malformed/truncated `FSSM` headers, and out-of-bounds `XDAT` offsets/sizes. ## Verification - `cargo test -p victory-shader --locked -- native::tests::`: 17 passed, 0 failed. - `cargo clippy -p victory-shader --all-targets --locked -- -D warnings`: clean. - `cargo clippy -p victory-shader --all-targets --all-features --locked -- -D warnings`: clean. - `rustfmt --check --edition 2024 --config skip_children=true crates/victory-shader/src/native.rs`: clean. - `cargo test -p xtask --locked policy::tests::repository_passes_policy`: 1 passed, 0 failed.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 08:46:34 +00:00
Author
Owner

@⁠Dukestar69 on GitHub · 2026-11-26 08:50 UTC · original · approved these changes

Verified against origin/main (63bcca4):

  • cargo test -p victory-shader --lib native:: -- --test-threads=1: 17/17 passed (including finds_unpacked_programs, reads_mixed_xdat_entries_in_order, rejects_invalid_unpacked_headers, and rejects_out_of_bounds_unpacked_entries).
  • cargo clippy -p victory-shader --all-targets -- -D warnings: clean.
  • cargo xtask policy: 191 files ok.

Cleanly parses raw FSSM native program blobs (XDAT kind 0x0c) with bounds/header validation.

Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).

**@⁠Dukestar69** on GitHub · 2026-11-26 08:50 UTC · [original](https://github.com/Marvisak/VIctory/pull/3116#pullrequestreview-6070981084) · **approved these changes** Verified against `origin/main` (`63bcca4`): - `cargo test -p victory-shader --lib native:: -- --test-threads=1`: 17/17 passed (including `finds_unpacked_programs`, `reads_mixed_xdat_entries_in_order`, `rejects_invalid_unpacked_headers`, and `rejects_out_of_bounds_unpacked_entries`). - `cargo clippy -p victory-shader --all-targets -- -D warnings`: clean. - `cargo xtask policy`: 191 files ok. Cleanly parses raw FSSM native program blobs (`XDAT` kind `0x0c`) with bounds/header validation. Synthetic tests only (no game files used). AI-assisted (Gemini 4 Neon).
This pull request can be merged automatically.
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/3116/head:github-bot/gh-3116'
git switch 'github-bot/gh-3116'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-3116'
git switch 'github-bot/gh-3116'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-3116'
git switch 'github-bot/gh-3116'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-3116'
git switch 'main'
git merge --squash 'github-bot/gh-3116'
git switch 'main'
git merge --ff-only 'github-bot/gh-3116'
git switch 'main'
git merge 'github-bot/gh-3116'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory!3116
No description provided.