perf(dstorage): add native file read staging #2761

Open
wrq2007 wants to merge 1 commit from upstream-pr/2761 into main
wrq2007 commented 2026-11-29 16:56:17 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wrq2007 on 2026-11-29T16:56:17Z.


Summary

  • Add an optional Windows DirectStorage native file-read path for representable console requests.
  • Read uncompressed destinations directly and use bounded staging for compressed or page destinations; the existing zlib/BCPack decoders remain in the HLE.
  • Preserve ordering, completion status, staging limits, and file lifetime, including title-side file release while reads are queued.
  • Fall back to the existing HLE read path when the runtime, API, request shape, or backing is unsupported.
  • Correct the DirectStorage COM vtable slots and pin them with layout/slot tests.

This is complementary to #2157, #2441, #2332, and #2331.

Test plan

  • cargo test --locked -p victory-gpu --lib dstorage::tests
  • cargo test --locked -p victory-hle --lib modules::dstorage::tests
  • cargo clippy --locked -p victory-gpu --all-targets
  • cargo clippy --locked -p victory-hle --all-targets
  • cargo xtask policy --staged
  • Short real-game fallback smoke test with ray tracing enabled
  • Static real-game A/B on a host with the DirectStorage runtime installed

The ignored native-runtime smoke test cannot run on the current host because dstorage.dll is not installed; the fallback path remains covered by the HLE tests.

No game assets, screenshots, logs, executables, or local paths are included.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5552956950 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2761). Originally posted by [wrq2007](https://github.com/wrq2007) on 2026-11-29T16:56:17Z. --- ## Summary - Add an optional Windows DirectStorage native file-read path for representable console requests. - Read uncompressed destinations directly and use bounded staging for compressed or page destinations; the existing zlib/BCPack decoders remain in the HLE. - Preserve ordering, completion status, staging limits, and file lifetime, including title-side file release while reads are queued. - Fall back to the existing HLE read path when the runtime, API, request shape, or backing is unsupported. - Correct the DirectStorage COM vtable slots and pin them with layout/slot tests. This is complementary to #2157, #2441, #2332, and #2331. ## Test plan - [x] `cargo test --locked -p victory-gpu --lib dstorage::tests` - [x] `cargo test --locked -p victory-hle --lib modules::dstorage::tests` - [x] `cargo clippy --locked -p victory-gpu --all-targets` - [x] `cargo clippy --locked -p victory-hle --all-targets` - [x] `cargo xtask policy --staged` - [x] Short real-game fallback smoke test with ray tracing enabled - [ ] Static real-game A/B on a host with the DirectStorage runtime installed The ignored native-runtime smoke test cannot run on the current host because `dstorage.dll` is not installed; the fallback path remains covered by the HLE tests. No game assets, screenshots, logs, executables, or local paths are included.
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/2761:upstream-pr/2761'
git switch 'upstream-pr/2761'

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/2761'
git switch 'upstream-pr/2761'
git rebase 'main'
git switch 'main'
git merge --ff-only 'upstream-pr/2761'
git switch 'upstream-pr/2761'
git rebase 'main'
git switch 'main'
git merge --no-ff 'upstream-pr/2761'
git switch 'main'
git merge --squash 'upstream-pr/2761'
git switch 'main'
git merge --ff-only 'upstream-pr/2761'
git switch 'main'
git merge 'upstream-pr/2761'
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
trustno1-coder/VIctory-NVIDIA!2761
No description provided.