HLE: account for DirectStorage decode intermediates #835

Open
Filip722 wants to merge 1 commit from upstream-pr/836 into main
Filip722 commented 2026-11-25 09:53:25 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-25T09:53:25Z.


Combined zlib and BCPack reads allocate a buffer for the BCPack stream while the zlib input is still live. The scheduler now adds that intermediate buffer to the staging reservation. File-backed requests also reserve their owned source buffer. Memory-backed requests borrow their input.

Two synthetic cases submit a pair of decodes against a 100-byte budget. Their intermediate is 60 bytes, with 20 more bytes of owned input for the file case. Both tests require the second job to wait and then start after the first releases its reservation.

  • Test-only control at 9376fd6: both new cases reproduced premature admission, with the existing staging test passing.
  • Patched Windows MSVC release harness with Rust 1.98.1 under GE-Proton 11-14: all three staging tests passed.
  • The repository asset-policy check passed. Both test arms used only synthetic requests.

OpenAI Codex (GPT-6.2-Sol High) prepared and reviewed the patch, ran the comparison, and drafted this description.

<!-- greyfinch-sync:fxceless/victory-fork:issue:6601771224 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/836). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-25T09:53:25Z. --- Combined zlib and BCPack reads allocate a buffer for the BCPack stream while the zlib input is still live. The scheduler now adds that intermediate buffer to the staging reservation. File-backed requests also reserve their owned source buffer. Memory-backed requests borrow their input. Two synthetic cases submit a pair of decodes against a 100-byte budget. Their intermediate is 60 bytes, with 20 more bytes of owned input for the file case. Both tests require the second job to wait and then start after the first releases its reservation. - Test-only control at `9376fd6`: both new cases reproduced premature admission, with the existing staging test passing. - Patched Windows MSVC release harness with Rust 1.98.1 under GE-Proton 11-14: all three staging tests passed. - The repository asset-policy check passed. Both test arms used only synthetic requests. OpenAI Codex (GPT-6.2-Sol High) prepared and reviewed the patch, ran the comparison, and drafted this description.
MamaLeVrai commented 2026-11-25 13:06:04 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by MamaLeVrai on 2026-11-25T12:23:39Z.


Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head c4dd786 into main f85101b in a throwaway tree (no conflict). cargo clippy --workspace --all-targets --locked -- -D warnings fails with the errors main itself has on this machine (placed_filler_twins, depth_written, a sort, and manual implementation of .is_multiple_of() at victory-gpu/src/shadow.rs:2675; PR #841 fixes the first three), also with --all-features; this PR adds none. (Correction: my first version of this report said that the is_multiple_of one was extra here. It is in main too: my first baseline run of main did not list it, and a run with --keep-going on a clean main does.) cargo test --workspace --locked: run 1: stopped at indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields (the one that fails on main itself most runs here (PR #849 and #847 fix its assertion)); run 2: 567 passed, 0 failed, 12 ignored (main alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data.

AI-assisted (Claude Code); no game data.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7162312611 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/836#issuecomment-7162312611). Originally posted by [MamaLeVrai](https://github.com/MamaLeVrai) on 2026-11-25T12:23:39Z. --- Test report on real hardware: AMD RX 6950 XT (RDNA2), Windows 11, Rust 1.98.1, with a GPU present. I merged this PR's head `c4dd786` into `main` `f85101b` in a throwaway tree (no conflict). `cargo clippy --workspace --all-targets --locked -- -D warnings` fails with the errors `main` itself has on this machine (`placed_filler_twins`, `depth_written`, a sort, and `manual implementation of .is_multiple_of()` at `victory-gpu/src/shadow.rs:2675`; PR #841 fixes the first three), also with `--all-features`; this PR adds none. (Correction: my first version of this report said that the `is_multiple_of` one was extra here. It is in `main` too: my first baseline run of `main` did not list it, and a run with `--keep-going` on a clean `main` does.) `cargo test --workspace --locked`: run 1: stopped at `indirect::tests::warp_budget_saturates_without_wraparound_and_preserves_draw_fields` (the one that fails on `main` itself most runs here (PR #849 and #847 fix its assertion)); run 2: 567 passed, 0 failed, 12 ignored (`main` alone: 555 passed, 0 failed, 11 ignored). The title was not run, so this says nothing about in-game effect. No game data. AI-assisted (Claude Code); no game data.
Filip722 commented 2026-11-25 22:07:23 +00:00 (Migrated from github.com)

Imported from fxceless/victory-fork. Originally posted by Filip722 on 2026-11-25T21:31:36Z.


I retested this PR on fork main c36971b in a local integration with #830. The Rust 1.98.1 Windows MSVC release test binary ran all three staging_bounds_ cases under GE-Proton 11-14. All three passed, including both combined-decode cases. The requests were synthetic. Codex (GPT-6.2-Sol High) ran the retest.

<!-- greyfinch-sync:fxceless/victory-fork:comment:7175194369 --> Imported from [fxceless/victory-fork](https://github.com/fxceless/victory-fork/pull/836#issuecomment-7175194369). Originally posted by [Filip722](https://github.com/Filip722) on 2026-11-25T21:31:36Z. --- I retested this PR on fork main `c36971b` in a local integration with #830. The Rust 1.98.1 Windows MSVC release test binary ran all three `staging_bounds_` cases under GE-Proton 11-14. All three passed, including both combined-decode cases. The requests were synthetic. Codex (GPT-6.2-Sol High) ran the retest.
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/836:upstream-pr/836'
git switch 'upstream-pr/836'

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