hle(dstorage): honor DSTORAGE_QUEUE_OPTIONS AutoSubmitDisabled — no auto-submit, E_QUEUE_CLOSED on Close #645

Closed
opened 2026-11-28 21:34:36 +00:00 by AnastasisKon · 3 comments
AnastasisKon commented 2026-11-28 21:34:36 +00:00 (Migrated from github.com)
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T21:34:36Z.


What

Our DirectStorage lanes auto-submit at half capacity (crates/victory-hle/src/modules/dstorage.rs, submit_as(id, explicit) — "explicit false when a half-full queue submits"), and nothing reads the console's AutoSubmitDisabled option: grep AutoSubmitDisabled crates/ has no hits. A title that creates its queue with that option set gets auto-submits it never asked for, and different completion semantics on close.

XCL #1790 implemented the console behaviour, with the spec readable in their tests: a queue with AutoSubmitDisabled must not auto-submit even past capacity/2 and waits for the title's explicit Submit (their test: "AutoSubmitDisabled must not auto-submit past capacity/2"), and an unsubmitted status entry on such a queue resolves to E_QUEUE_CLOSED on Close() (their test: "An unsubmitted status entry on an AutoSubmitDisabled queue resolves to E_QUEUE_CLOSED on Close()"). In their layout the flag is the u64 at DSTORAGE_QUEUE_DESC1 + 0x18.

What this changes

  • parse the option in QueueDesc (dstorage.rs:275);
  • gate the half-capacity auto-submit on it;
  • resolve unsubmitted entries to E_QUEUE_CLOSED on Close when it is set.

How it was tested

  • unit tests on the lane state machine naming the two behaviours above (no game data needed);
  • a game run once the data finishes downloading, watching whether the title sets the flag (VICTORY_TRACE_DSTORAGE line if one is needed).

Sources: MacBox crates/xcl/src/hle/dstorage.rs:113, :2464, :2481; XCL #1790.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:issue:6671404311 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/645). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T21:34:36Z. --- ## What Our DirectStorage lanes auto-submit at half capacity (crates/victory-hle/src/modules/dstorage.rs, `submit_as(id, explicit)` — "explicit false when a half-full queue submits"), and nothing reads the console's AutoSubmitDisabled option: `grep AutoSubmitDisabled crates/` has no hits. A title that creates its queue with that option set gets auto-submits it never asked for, and different completion semantics on close. XCL #1790 implemented the console behaviour, with the spec readable in their tests: a queue with AutoSubmitDisabled must not auto-submit even past capacity/2 and waits for the title's explicit Submit (their test: "AutoSubmitDisabled must not auto-submit past capacity/2"), and an unsubmitted status entry on such a queue resolves to E_QUEUE_CLOSED on Close() (their test: "An unsubmitted status entry on an AutoSubmitDisabled queue resolves to E_QUEUE_CLOSED on Close()"). In their layout the flag is the u64 at DSTORAGE_QUEUE_DESC1 + 0x18. ## What this changes - parse the option in QueueDesc (dstorage.rs:275); - gate the half-capacity auto-submit on it; - resolve unsubmitted entries to E_QUEUE_CLOSED on Close when it is set. ## How it was tested - unit tests on the lane state machine naming the two behaviours above (no game data needed); - a game run once the data finishes downloading, watching whether the title sets the flag (VICTORY_TRACE_DSTORAGE line if one is needed). Sources: MacBox crates/xcl/src/hle/dstorage.rs:113, :2464, :2481; XCL #1790.
AnastasisKon commented 2026-11-28 21:36:06 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T21:36:06Z.


/claim

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7246136795 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/645#issuecomment-7246136795). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T21:36:06Z. --- /claim
github-actions[bot] commented 2026-11-28 21:36:17 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by github-actions[bot] on 2026-11-28T21:36:17Z.


Claimed by @AnastasisKon. Open a draft pull request with Refs #645 in its description within 24 hours, or the claim expires.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7246139044 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/645#issuecomment-7246139044). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-28T21:36:17Z. --- Claimed by @AnastasisKon. Open a draft pull request with `Refs #645` in its description within 24 hours, or the claim expires.
AnastasisKon commented 2026-11-28 21:53:07 +00:00 (Migrated from github.com)
Author
Contributor

Imported from LakshanSivakumar/Native-Victory-macOS. Originally posted by AnastasisKon on 2026-11-28T21:53:07Z.


Done — landed on the fork's main as commit 800ad933 (hle(dstorage): honor DSTORAGE_QUEUE_OPTIONS AutoSubmitDisabled).

  • The options word at QueueDesc + 0x18 (the field this module logged as 'unknown', which Grand Theft Auto VI sets to 1) is DSTORAGE_QUEUE_OPTIONS; bit 0 is AutoSubmitDisabled. A queue with it set no longer submits itself at half capacity: every command waits for the title's Submit. Queues without the option auto-submit as before.
  • Close() resolves every status entry the queue still holds (unsubmitted, held, or submitted but not yet written) to E_QUEUE_CLOSED (0x89240010, dstorageerr.h) instead of leaving it pending.

Gate green in isolation: cargo test -p victory-hle -p victory -p victory-shader -p victory-gpu -p xtask (--test-threads=1, 729 passed total incl. three new tests: no auto-submit past half capacity; the control without the option; Close without Submit resolves E_QUEUE_CLOSED), clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -D warnings, cargo xtask policy, all tools/macos/tests/*.sh. Game run: not possible yet (data still downloading); on the next run the 'a queue half full submitted itself' line should no longer appear for the title's queue.

<!-- greyfinch-sync:LakshanSivakumar/Native-Victory-macOS:comment:7246343497 --> Imported from [LakshanSivakumar/Native-Victory-macOS](https://github.com/LakshanSivakumar/Native-Victory-macOS/issues/645#issuecomment-7246343497). Originally posted by [AnastasisKon](https://github.com/AnastasisKon) on 2026-11-28T21:53:07Z. --- Done — landed on the fork's main as commit 800ad933 (hle(dstorage): honor DSTORAGE_QUEUE_OPTIONS AutoSubmitDisabled). - The options word at QueueDesc + 0x18 (the field this module logged as 'unknown', which Grand Theft Auto VI sets to 1) is DSTORAGE_QUEUE_OPTIONS; bit 0 is AutoSubmitDisabled. A queue with it set no longer submits itself at half capacity: every command waits for the title's Submit. Queues without the option auto-submit as before. - Close() resolves every status entry the queue still holds (unsubmitted, held, or submitted but not yet written) to E_QUEUE_CLOSED (0x89240010, dstorageerr.h) instead of leaving it pending. Gate green in isolation: cargo test -p victory-hle -p victory -p victory-shader -p victory-gpu -p xtask (--test-threads=1, 729 passed total incl. three new tests: no auto-submit past half capacity; the control without the option; Close without Submit resolves E_QUEUE_CLOSED), clippy --workspace --all-targets --locked --target x86_64-pc-windows-gnullvm -D warnings, cargo xtask policy, all tools/macos/tests/*.sh. Game run: not possible yet (data still downloading); on the next run the 'a queue half full submitted itself' line should no longer appear for the title's queue.
Sign in to join this conversation.
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
LakshanSivakumar/Native-Victory-macOS#645
No description provided.