Skip to content

HLE: account for DirectStorage decode intermediates - #836

Open
Filip722 wants to merge 1 commit into
fxceless:mainfrom
Filip722:hle/dstorage-combined-decode-staging
Open

Filip722 wants to merge 1 commit into
fxceless:mainfrom
Filip722:hle/dstorage-combined-decode-staging

Conversation

@Filip722

@Filip722 Filip722 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor

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.

Count the zlib-to-BCPack intermediate against staging while combined requests run. A synthetic lane regression covers borrowed memory sources and file sources whose input overlaps the intermediate.

Assisted-by: OpenAI Codex
@MamaLeVrai

MamaLeVrai commented Nov 25, 2026 •

Copy link
Copy Markdown

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

Filip722 commented Nov 25, 2026 •

Copy link
Copy Markdown
Contributor Author

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants