Skip to content

DirectStorage: honor DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled in CreateQueue1 - #1790

Open
certified-retart wants to merge 1 commit into
xcl-dev:mainfrom
certified-retart:dstorage/auto-submit-disabled
Open

certified-retart wants to merge 1 commit into
xcl-dev:mainfrom
certified-retart:dstorage/auto-submit-disabled

Conversation

@certified-retart

Copy link
Copy Markdown
Contributor

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.

@futurepro62

futurepro62 commented Nov 24, 2026 •

Copy link
Copy Markdown

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 (Tests: heap_window_out_of_memory_falls_back_to_the_switch_form fails under XCL_REQUIRE_GPU=mesh (opt-in skip counted as missing coverage) #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.

@DavidM1911

Copy link
Copy Markdown
Contributor

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

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

Thanks!

@throny

throny commented Nov 25, 2026

Copy link
Copy Markdown
Collaborator

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.

@certified-retart

Copy link
Copy Markdown
Contributor Author

Thanks for the triage pointer. Comparing against #1599:

@JJAutoCompare

Copy link
Copy Markdown

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.

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

Labels

goal:world-load Bears on the retail title getting past world loading

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants