DirectStorage: honor DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled in CreateQueue1 #1790

Open
github-bot wants to merge 1 commit from github-bot/gh-1790 into main AGit
Owner

@⁠certified-retart on GitHub · 2026-11-24 20:45 UTC · original
certified-retart:dstorage/auto-submit-disabled → main · +135 −11 · 1 files · 1 commits · open

Honor DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled (bit 0 of the u64 options field at +0x18 of DSTORAGE_QUEUE_DESC1) in IDStorageFactoryX2::CreateQueue1 instead of discarding it and auto-submitting at half capacity.

A retail Scarlett title calls CreateQueue1 with options = 0x1 (AutoSubmitDisabled). Previously factory_create_queue1 logged the extra qword and forwarded to factory_create_queue, so half-full queues auto-submitted inside EnqueueRequest before the title finished populating destination buffers/page arrays and calling Submit(), and Query() still reported a finite RequestCountUntilAutoSubmit.

What is in it

  • crates/xcl/src/hle/dstorage.rs: parse QUEUE_OPT_AUTO_SUBMIT_DISABLED (1 << 0) from DSTORAGE_QUEUE_DESC1 + 0x18 in factory_create_queue1 (logging unknown option bits once), store auto_submit_disabled on QueueInner, suppress half-full auto-submit in QueueInner::enqueue and QueueInner::enqueue_numbered, and report u16::MAX for RequestCountUntilAutoSubmit in queue_query when disabled.
  • crates/xcl/src/hle/dstorage.rs: add create_queue1_auto_submit_disabled_waits_for_submit covering disabled auto-submit past capacity / 2, late source mutation before Submit(), Close() resolving unsubmitted status slots with E_QUEUE_CLOSED, and the options == 0 auto-submit control case.

Tested

  • NVIDIA GeForce RTX 5070 (driver 32.0.16.1074), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 10 Pro 22H2 (19045.6466), rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smoke runs (XCL_D3D12_DIR Agility SDK v614).
  • cargo test -p xcl --lib hle::dstorage -- --nocapture: 18 passed, 0 failed, 0 ignored.
  • cargo test --workspace -- --test-threads=4: 892 passed, 0 failed, 42 ignored.
    • SKIPPED GPU tests: gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask (no wave64), gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware (no wave64), shaders::tests::pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache), heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows).
  • Retail Scarlett title (60 s smoke run): logs DirectStorage: CreateQueue1 (0x20 desc), options = 0x1 (auto_submit_disabled = true), 0 DirectStorage failures, 0 crashes, 0 device removals. Note: the main smoke run had a cold DXIL cache while the PR run ran with the warm cache from main, which accounts for the higher frame count (1685 vs 1185).

Regression run
main:

xcl-smoke v1
commit: 4178e888c0b5be50a2887eda45cdb832763b68a4
gpu: NVIDIA GeForce RTX 5070
title: game
seconds: 60
exit: 0x0
frames shown: 1185 (PresentX 1185)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 15105 MB

PR:

xcl-smoke v1
commit: 7a6f47a53975d3c1d5367a7742970bf53c547d33
gpu: NVIDIA GeForce RTX 5070
title: game
seconds: 60
exit: 0x0
frames shown: 1685 (PresentX 1685)
presents per 2 s (last 3): 60 60 60
device removals: 0
crashes: 0
peak commit: 14318 MB

Not tested

  • AMD / Intel GPUs and wave64-only GPU tests.
  • Longer world-load streaming runs past the title's startup/menu phase.

AI use

  • Antigravity with Gemini 4 Neon: wrote the implementation, unit test, and PR description; verified locally with the workspace test suite and retail title smoke runs.
**@⁠certified-retart** on GitHub · 2026-11-24 20:45 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790) `certified-retart:dstorage/auto-submit-disabled` → `main` · +135 −11 · 1 files · 1 commits · open Honor `DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled` (bit 0 of the `u64` options field at `+0x18` of `DSTORAGE_QUEUE_DESC1`) in `IDStorageFactoryX2::CreateQueue1` instead of discarding it and auto-submitting at half capacity. A retail Scarlett title calls `CreateQueue1` with `options = 0x1` (`AutoSubmitDisabled`). Previously `factory_create_queue1` logged the extra qword and forwarded to `factory_create_queue`, so half-full queues auto-submitted inside `EnqueueRequest` before the title finished populating destination buffers/page arrays and calling `Submit()`, and `Query()` still reported a finite `RequestCountUntilAutoSubmit`. **What is in it** - `crates/xcl/src/hle/dstorage.rs`: parse `QUEUE_OPT_AUTO_SUBMIT_DISABLED` (`1 << 0`) from `DSTORAGE_QUEUE_DESC1 + 0x18` in `factory_create_queue1` (logging unknown option bits once), store `auto_submit_disabled` on `QueueInner`, suppress half-full auto-submit in `QueueInner::enqueue` and `QueueInner::enqueue_numbered`, and report `u16::MAX` for `RequestCountUntilAutoSubmit` in `queue_query` when disabled. - `crates/xcl/src/hle/dstorage.rs`: add `create_queue1_auto_submit_disabled_waits_for_submit` covering disabled auto-submit past `capacity / 2`, late source mutation before `Submit()`, `Close()` resolving unsubmitted status slots with `E_QUEUE_CLOSED`, and the `options == 0` auto-submit control case. **Tested** - NVIDIA GeForce RTX 5070 (driver 32.0.16.1074), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 10 Pro 22H2 (19045.6466), `rustc 1.100.0 (0ef1bc386 2026-11-09)`, debug tests + release smoke runs (`XCL_D3D12_DIR` Agility SDK v614). - `cargo test -p xcl --lib hle::dstorage -- --nocapture`: 18 passed, 0 failed, 0 ignored. - `cargo test --workspace -- --test-threads=4`: 892 passed, 0 failed, 42 ignored. - `SKIPPED` GPU tests: `gpu::recomp::tests::gpu_geometry_wave32_prefix_count_over_a_mask` (`no wave64`), `gpu::recomp::tests::gpu_wave32_program_in_wave64_hardware` (`no wave64`), `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` (`cannot disable the driver cache`), `heap_window_out_of_memory_falls_back_to_the_switch_form` (`no heap windows`). - Retail Scarlett title (60 s smoke run): logs `DirectStorage: CreateQueue1 (0x20 desc), options = 0x1 (auto_submit_disabled = true)`, 0 DirectStorage failures, 0 crashes, 0 device removals. Note: the `main` smoke run had a cold DXIL cache while the PR run ran with the warm cache from `main`, which accounts for the higher frame count (1685 vs 1185). **Regression run** main: ``` xcl-smoke v1 commit: 4178e888c0b5be50a2887eda45cdb832763b68a4 gpu: NVIDIA GeForce RTX 5070 title: game seconds: 60 exit: 0x0 frames shown: 1185 (PresentX 1185) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 15105 MB ``` PR: ``` xcl-smoke v1 commit: 7a6f47a53975d3c1d5367a7742970bf53c547d33 gpu: NVIDIA GeForce RTX 5070 title: game seconds: 60 exit: 0x0 frames shown: 1685 (PresentX 1685) presents per 2 s (last 3): 60 60 60 device removals: 0 crashes: 0 peak commit: 14318 MB ``` **Not tested** - AMD / Intel GPUs and wave64-only GPU tests. - Longer world-load streaming runs past the title's startup/menu phase. **AI use** - Antigravity with Gemini 4 Neon: wrote the implementation, unit test, and PR description; verified locally with the workspace test suite and retail title smoke runs.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 05:05:21 +00:00
Author
Owner

@⁠futurepro62 on GitHub · 2026-11-24 21:29 UTC · original · edited 2026-11-24 21:49 UTC

Full-suite run, since this PR has no test report yet. Tested exact head 7a6f47a (on its base 4178e88).

Tested

  • NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed.
  • cargo build --workspace, then XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record: 890 passed, 0 failed, 42 ignored. SKIPPED (no wave64): gpu_geometry_wave32_prefix_count_over_a_mask, gpu_wave32_program_in_wave64_hardware.
  • The new tests ran and passed: create_queue1_auto_submit_disabled_waits_for_submit.
  • Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, XCL_ADAPTER=radeon), cargo test --workspace -- --test-threads=4: 892 passed, 0 failed, 42 ignored. SKIPPED: heap_window_out_of_memory_falls_back_to_the_switch_form (no heap windows), pso_measurement_compiles_an_exact_synthetic_record (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)).
  • Two tests were skipped with --skip on NVIDIA. Both fail on main 7f7e768 too, not because of this PR: under XCL_REQUIRE_GPU=mesh, runner::skip_test turns their skips into failures. heap_window_out_of_memory_falls_back_to_the_switch_form skips when XCL_HEAP_WINDOWS is unset (#1651), and shaders::tests::pso_measurement_compiles_an_exact_synthetic_record skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set XCL_REQUIRE_GPU, so there both just print SKIPPED.

Not tested

  • a release build, a game (test run only).

AI use

  • Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
**@⁠futurepro62** on GitHub · 2026-11-24 21:29 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790#issuecomment-7145001899) · edited 2026-11-24 21:49 UTC Full-suite run, since this PR has no test report yet. Tested exact head `7a6f47a` (on its base `4178e88`). **Tested** - NVIDIA GeForce RTX 5070 Ti 16 GB (Blackwell, 32-lane waves only, mesh shaders), driver 616.64, Ryzen 7 9800X3D, Windows 11 Home 26300, Rust 1.100.0 MSVC, DXC + dxil.dll 1.9.2602.17 (Windows SDK 10.0.26100), debug, D3D12 debug layer installed. - `cargo build --workspace`, then `XCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4 --skip heap_window_out_of_memory_falls_back_to_the_switch_form --skip pso_measurement_compiles_an_exact_synthetic_record`: **890 passed, 0 failed, 42 ignored**. SKIPPED (no wave64): `gpu_geometry_wave32_prefix_count_over_a_mask`, `gpu_wave32_program_in_wave64_hardware`. - The new tests ran and passed: `create_queue1_auto_submit_disabled_waits_for_submit`. - Same head on the AMD Radeon integrated GPU (iGPU) of the Ryzen 7 9800X3D (RDNA2, `XCL_ADAPTER=radeon`), `cargo test --workspace -- --test-threads=4`: **892 passed, 0 failed, 42 ignored**. SKIPPED: `heap_window_out_of_memory_falls_back_to_the_switch_form` (no heap windows), `pso_measurement_compiles_an_exact_synthetic_record` (cannot disable the driver cache (Windows Developer Mode is required): The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887A002D)). - Two tests were skipped with `--skip` on NVIDIA. Both fail on main `7f7e768` too, not because of this PR: under `XCL_REQUIRE_GPU=mesh`, `runner::skip_test` turns their skips into failures. `heap_window_out_of_memory_falls_back_to_the_switch_form` skips when `XCL_HEAP_WINDOWS` is unset (#1651), and `shaders::tests::pso_measurement_compiles_an_exact_synthetic_record` skips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not set `XCL_REQUIRE_GPU`, so there both just print SKIPPED. **Not tested** - a release build, a game (test run only). **AI use** - Claude Code (Claude Opus 5.5) ran the tests and wrote this report. I checked it before posting.
Author
Owner

@⁠DavidM1911 on GitHub · 2026-11-24 23:41 UTC · original

Verification on RTX 3060 Ti (Windows 11), branch merged with current main:

  • cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.

Thanks!

**@⁠DavidM1911** on GitHub · 2026-11-24 23:41 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790#issuecomment-7147693868) Verification on RTX 3060 Ti (Windows 11), branch merged with current `main`: - `cargo test -p xcl --lib`: all passed, 0 failed, ~23 ignored. Thanks!
Author
Owner

@⁠throny on GitHub · 2026-11-25 00:37 UTC · original

Two contributors checked independently and found that #1599 solves the same problem in a different way: #1607, group D59. You may want to compare them with the other author and agree on one, or say in the PR why both are needed.

This is a hint from the community triage in #1607, not a maintainer decision.

AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.

**@⁠throny** on GitHub · 2026-11-25 00:37 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790#issuecomment-7148713660) <!-- xcl-1607-hint:D59 --> Two contributors checked independently and found that #1599 solves the same problem in a different way: #1607, group D59. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table.
Author
Owner

@⁠certified-retart on GitHub · 2026-11-25 01:39 UTC · original

Thanks for the triage pointer. Comparing against #1599:

  • #1599 was opened earlier, adds full-queue blocking on \Enqueue*\ when \AutoSubmitDisabled\ is set (unblocked by \Submit/\CancelRequestsWithTag/\Close), and already has AMD RDNA2 verification showing \
**@⁠certified-retart** on GitHub · 2026-11-25 01:39 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790#issuecomment-7149796321) Thanks for the triage pointer. Comparing against #1599: - #1599 was opened earlier, adds full-queue blocking on \Enqueue*\ when \AutoSubmitDisabled\ is set (unblocked by \Submit\/\CancelRequestsWithTag\/\Close\), and already has AMD RDNA2 verification showing \
Author
Owner

@⁠JJAutoCompare on GitHub · 2026-11-25 03:08 UTC · original

PR #1790 — DirectStorage CreateQueue1 on Intel Arc A770

Tested 7a6f47a53975d3c1d5367a7742970bf53c547d33 on STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave range 8–32, DoublePrecisionFloatShaderOps=0), DXC/DXIL 1.9.2609.5, and Rust 1.100.0 (0ef1bc386). Unoptimized Cargo profiles with debug info disabled. cargo build --workspace and cargo test --workspace --no-run completed successfully.

cargo test -p xcl hle::dstorage::tests -- --nocapture reported 18 passed, 0 failed, 0 ignored. The new create_queue1_auto_submit_disabled_waits_for_submit test verified that requests and a status entry stayed pending past half capacity, Query reported 0xFFFF for entries until auto-submit, explicit Submit copied the expected bytes, and Close resolved an unsubmitted status with E_QUEUE_CLOSED. The options-zero control auto-submitted at half capacity. The synthetic title also logged a pass for the legacy CreateQueue file read, status, and D3D12 fence check.

cargo test --workspace --no-fail-fast -- --test-threads=4 ran once under the shared Arc lock and exited 101. Across 20 harness summaries, libtest reported 874 passed, 18 failed, 42 ignored. The 17 GPU unit failures comprised 13 compute pipeline creation errors (0x80070057) and four result mismatches involving FMA, texture LOD, packed f16, and pixel wave reduction. The synthetic-title integration test failed its D3D12.X dynamic depth-bias check.

The combined log contains exactly 4 SKIPPED lines. Two cite missing wave64, one cites unavailable driver-cache disabling, and one cites unavailable heap windows. These skips provide no coverage.

Not tested D3D12 debug-layer assertions (d3d12SDKLayers.dll absent, with the test's early return counted as OK by libtest and its skip message captured), retail-title smoke on either main or the PR head, and other GPUs. Main was not run for comparison, so the suite failures have no baseline from this verification.

T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against pr1790-suite.log and published this report.

**@⁠JJAutoCompare** on GitHub · 2026-11-25 03:08 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790#issuecomment-7151630607) # PR #1790 — DirectStorage `CreateQueue1` on Intel Arc A770 **Tested** `7a6f47a53975d3c1d5367a7742970bf53c547d33` on STOR-WINLAB, Windows 11 Enterprise Evaluation build 26200.9974, AMD Ryzen 7 3800X, Intel Arc A770 16 GiB (driver 32.0.101.9175, wave range 8–32, `DoublePrecisionFloatShaderOps=0`), DXC/DXIL 1.9.2609.5, and Rust 1.100.0 (0ef1bc386). Unoptimized Cargo profiles with debug info disabled. `cargo build --workspace` and `cargo test --workspace --no-run` completed successfully. `cargo test -p xcl hle::dstorage::tests -- --nocapture` reported **18 passed, 0 failed, 0 ignored**. The new `create_queue1_auto_submit_disabled_waits_for_submit` test verified that requests and a status entry stayed pending past half capacity, `Query` reported `0xFFFF` for entries until auto-submit, explicit `Submit` copied the expected bytes, and `Close` resolved an unsubmitted status with `E_QUEUE_CLOSED`. The options-zero control auto-submitted at half capacity. The synthetic title also logged a pass for the legacy `CreateQueue` file read, status, and D3D12 fence check. `cargo test --workspace --no-fail-fast -- --test-threads=4` ran once under the shared Arc lock and exited 101. Across 20 harness summaries, libtest reported **874 passed, 18 failed, 42 ignored**. The 17 GPU unit failures comprised 13 compute pipeline creation errors (0x80070057) and four result mismatches involving FMA, texture LOD, packed f16, and pixel wave reduction. The synthetic-title integration test failed its D3D12.X dynamic depth-bias check. The combined log contains exactly **4 `SKIPPED ` lines**. Two cite missing wave64, one cites unavailable driver-cache disabling, and one cites unavailable heap windows. These skips provide no coverage. **Not tested** D3D12 debug-layer assertions (`d3d12SDKLayers.dll` absent, with the test's early return counted as OK by libtest and its skip message captured), retail-title smoke on either main or the PR head, and other GPUs. Main was not run for comparison, so the suite failures have no baseline from this verification. T3 Code / Codex (`gpt-6.2-sol`, `reasoningEffort: high`) ran the build and verification. Coordinator #2 (T3 Code / Antigravity, `gemini-4-neon`) verified counts against `pr1790-suite.log` and published this report.
Author
Owner

@⁠Royalflamejlh on GitHub · 2026-11-26 02:55 UTC · original

Linux (Wine + vkd3d-proton) + NVIDIA, the title, 2 runs each of main b49be183 + #684 e56dbc3, with #1790 7a6f47a and with #1599 5b1518f: with #1790 the title had 0 failed DirectStorage requests in 2 of 2 runs (87,489 and 88,842 requests), against 238 and 1,281 on main; #1599 gave 0 and 0. The setup and the table for all three trees are in the comment on #1599.

  • One of the two #1790 runs, and both #1599 runs, did not exit within a minute of the 120 s end, with Wine logging RtlpWaitForCriticalSection … main process heap section twice; the same hang came on 2026-11-25 on a tree with neither fix, so 2 runs cannot say whether #1790 adds to it.
  • Read: unlike #1599, an enqueue into a full queue made with the option is not held: QueueInner::enqueue and enqueue_numbered let the queue grow past capacity. Query reports 0xFFFF as the requests left until the automatic submit. These runs do not show whether a queue reached capacity.

Not tested: a queue filled to capacity; Query's count; the world load past 120 s; the suite; Windows; AMD and Intel.

AI use: Claude Code (Claude Opus 5.5) ran the title and wrote this comment.

Posted without review by a person: the account owner was away and reads replies later.

**@⁠Royalflamejlh** on GitHub · 2026-11-26 02:55 UTC · [original](https://github.com/xcl-dev/xcl/pull/1790#issuecomment-7181239469) Linux (Wine + vkd3d-proton) + NVIDIA, the title, 2 runs each of `main` `b49be183` + #684 `e56dbc3`, with #1790 `7a6f47a` and with #1599 `5b1518f`: with #1790 the title had 0 failed DirectStorage requests in 2 of 2 runs (87,489 and 88,842 requests), against 238 and 1,281 on `main`; #1599 gave 0 and 0. The setup and the table for all three trees are in the comment on #1599. - One of the two #1790 runs, and both #1599 runs, did not exit within a minute of the 120 s end, with Wine logging `RtlpWaitForCriticalSection … main process heap section` twice; the same hang came on 2026-11-25 on a tree with neither fix, so 2 runs cannot say whether #1790 adds to it. - *Read:* unlike #1599, an enqueue into a full queue made with the option is not held: `QueueInner::enqueue` and `enqueue_numbered` let the queue grow past `capacity`. `Query` reports `0xFFFF` as the requests left until the automatic submit. These runs do not show whether a queue reached capacity. **Not tested:** a queue filled to capacity; `Query`'s count; the world load past 120 s; the suite; Windows; AMD and Intel. **AI use:** Claude Code (Claude Opus 5.5) ran the title and wrote this comment. Posted without review by a person: the account owner was away and reads replies later.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/1790/head:github-bot/gh-1790'
git switch 'github-bot/gh-1790'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-1790'
git switch 'github-bot/gh-1790'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-1790'
git switch 'github-bot/gh-1790'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-1790'
git switch 'main'
git merge --squash 'github-bot/gh-1790'
git switch 'main'
git merge --ff-only 'github-bot/gh-1790'
git switch 'main'
git merge 'github-bot/gh-1790'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.