GPU: port DirectStorage staging and indirect draw improvements #2630

Open
Lkxex wants to merge 5 commits from upstream-pr/2632 into main
Lkxex commented 2026-11-25 17:14:40 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Lkxex on 2026-11-25T17:14:40Z.


This ports DirectStorage queue staging, console texture formats 189–191, offline shader signature deduplication, and an opt-in single-record indirect clamp. Larger batches keep the existing tiled clamp.

Validation: Windows cargo check passed on the port. In-game behavior and FPS have not been measured.

<!-- greyfinch-sync:Marvisak/VIctory:issue:6609768375 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2632). Originally posted by [Lkxex](https://github.com/Lkxex) on 2026-11-25T17:14:40Z. --- This ports DirectStorage queue staging, console texture formats 189–191, offline shader signature deduplication, and an opt-in single-record indirect clamp. Larger batches keep the existing tiled clamp. Validation: Windows cargo check passed on the port. In-game behavior and FPS have not been measured.
kotekompotek commented 2026-11-25 18:02:53 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by kotekompotek on 2026-11-25T17:52:49Z.


Reviewed: keying dedup on (DXIL hash + ISG1/OSG1/PSG1/PSV0/RTS0 part hashes) fixes a real silent-skip: shared shader bodies with different signatures were previously dropped as duplicates, losing pipeline variants in --pipelines runs. The synthetic two-part container test proves the case. CI green.

<!-- greyfinch-sync:Marvisak/VIctory:comment:7170128506 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2632#issuecomment-7170128506). Originally posted by [kotekompotek](https://github.com/kotekompotek) on 2026-11-25T17:52:49Z. --- Reviewed: keying dedup on (DXIL hash + ISG1/OSG1/PSG1/PSV0/RTS0 part hashes) fixes a real silent-skip: shared shader bodies with different signatures were previously dropped as duplicates, losing pipeline variants in `--pipelines` runs. The synthetic two-part container test proves the case. CI green.
Marvisak commented 2026-11-25 23:06:13 +00:00 (Migrated from github.com)

Imported from Marvisak/VIctory. Originally posted by Marvisak on 2026-11-25T22:21:36Z.


Automated triage for the maintainers.

Merges cleanly, but this is five unrelated changes in one PR, validated only by cargo check, and two of them change emulation behaviour without stated evidence:

  • crates/victory-formats/src/texture.rs: console texture formats 189 and 190 are given RGBA8-like and R8-like layouts (4 and 1 bytes per texel). What these formats are, and why those layouts, needs a source (public documentation, or the title's own use observed in a run), not just the size match the test asserts.
  • crates/victory-hle/src/modules/dstorage.rs: the read scheduler in Lanes::start is rewritten (a staging reservation that lets one other queue's head use spare space). That changes ordering and fairness for every title, with no test of the new behaviour and no measurement. It also touches the same code as #2617.
  • crates/victory-gpu/src/indirect.rs: an opt-in one-thread clamp (VICTORY_INDIRECT_SINGLE), with no measurement of what it gains.
  • apps/victory/src/translate.rs: offline dedup keyed on DXIL plus signature parts. This one is plausible on its own and has a test.

The description says "ports" but does not name where they come from. Please split these into separate PRs, credit the source, and for each say what was measured (a test that fails on main, a run, or a reference for the formats). The translate dedup change could go first on its own.


Generated by Claude Code

<!-- greyfinch-sync:Marvisak/VIctory:comment:7176263883 --> Imported from [Marvisak/VIctory](https://github.com/Marvisak/VIctory/pull/2632#issuecomment-7176263883). Originally posted by [Marvisak](https://github.com/Marvisak) on 2026-11-25T22:21:36Z. --- <!-- victory-triage v1 head=091cdc77760809b9e6a88501cd2ae9fcd682cdaf verdict=needs-work at=2026-11-25T22:23:00Z --> Automated triage for the maintainers. Merges cleanly, but this is five unrelated changes in one PR, validated only by `cargo check`, and two of them change emulation behaviour without stated evidence: - `crates/victory-formats/src/texture.rs`: console texture formats 189 and 190 are given RGBA8-like and R8-like layouts (4 and 1 bytes per texel). What these formats are, and why those layouts, needs a source (public documentation, or the title's own use observed in a run), not just the size match the test asserts. - `crates/victory-hle/src/modules/dstorage.rs`: the read scheduler in `Lanes::start` is rewritten (a staging reservation that lets one other queue's head use spare space). That changes ordering and fairness for every title, with no test of the new behaviour and no measurement. It also touches the same code as #2617. - `crates/victory-gpu/src/indirect.rs`: an opt-in one-thread clamp (`VICTORY_INDIRECT_SINGLE`), with no measurement of what it gains. - `apps/victory/src/translate.rs`: offline dedup keyed on DXIL plus signature parts. This one is plausible on its own and has a test. The description says "ports" but does not name where they come from. Please split these into separate PRs, credit the source, and for each say what was measured (a test that fails on `main`, a run, or a reference for the formats). The translate dedup change could go first on its own. --- _Generated by [Claude Code](https://claude.ai/code)_
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/2632:upstream-pr/2632'
git switch 'upstream-pr/2632'

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