DirectStorage: honor DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled in CreateQueue1 #1780
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/1790"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by certified-retart on 2026-11-24T20:45:29Z.
Honor
DSTORAGE_QUEUE_OPTIONS::AutoSubmitDisabled(bit 0 of theu64options field at+0x18ofDSTORAGE_QUEUE_DESC1) inIDStorageFactoryX2::CreateQueue1instead of discarding it and auto-submitting at half capacity.A retail Scarlett title calls
CreateQueue1withoptions = 0x1(AutoSubmitDisabled). Previouslyfactory_create_queue1logged the extra qword and forwarded tofactory_create_queue, so half-full queues auto-submitted insideEnqueueRequestbefore the title finished populating destination buffers/page arrays and callingSubmit(), andQuery()still reported a finiteRequestCountUntilAutoSubmit.What is in it
crates/xcl/src/hle/dstorage.rs: parseQUEUE_OPT_AUTO_SUBMIT_DISABLED(1 << 0) fromDSTORAGE_QUEUE_DESC1 + 0x18infactory_create_queue1(logging unknown option bits once), storeauto_submit_disabledonQueueInner, suppress half-full auto-submit inQueueInner::enqueueandQueueInner::enqueue_numbered, and reportu16::MAXforRequestCountUntilAutoSubmitinqueue_querywhen disabled.crates/xcl/src/hle/dstorage.rs: addcreate_queue1_auto_submit_disabled_waits_for_submitcovering disabled auto-submit pastcapacity / 2, late source mutation beforeSubmit(),Close()resolving unsubmitted status slots withE_QUEUE_CLOSED, and theoptions == 0auto-submit control case.Tested
rustc 1.100.0 (0ef1bc386 2026-11-09), debug tests + release smoke runs (XCL_D3D12_DIRAgility 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.SKIPPEDGPU 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).DirectStorage: CreateQueue1 (0x20 desc), options = 0x1 (auto_submit_disabled = true), 0 DirectStorage failures, 0 crashes, 0 device removals. Note: themainsmoke run had a cold DXIL cache while the PR run ran with the warm cache frommain, which accounts for the higher frame count (1685 vs 1185).Regression run
main:
PR:
Not tested
AI use
Imported from ivall/xcl. Originally posted by futurepro62 on 2026-11-24T21:29:35Z.
Full-suite run, since this PR has no test report yet. Tested exact head
7a6f47a(on its base4178e88).Tested
cargo build --workspace, thenXCL_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.create_queue1_auto_submit_disabled_waits_for_submit.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)).--skipon NVIDIA. Both fail on main7f7e768too, not because of this PR: underXCL_REQUIRE_GPU=mesh,runner::skip_testturns their skips into failures.heap_window_out_of_memory_falls_back_to_the_switch_formskips whenXCL_HEAP_WINDOWSis unset (#1651), andshaders::tests::pso_measurement_compiles_an_exact_synthetic_recordskips because Developer Mode is off on this PC (it cannot disable the driver cache). The AMD run does not setXCL_REQUIRE_GPU, so there both just print SKIPPED.Not tested
AI use
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-24T23:41:52Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~23 ignored.Thanks!
Imported from ivall/xcl. Originally posted by throny on 2026-11-25T00:37:51Z.
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.
Imported from ivall/xcl. Originally posted by certified-retart on 2026-11-25T01:39:05Z.
Thanks for the triage pointer. Comparing against #1599:
Imported from ivall/xcl. Originally posted by JJAutoCompare on 2026-11-25T03:08:33Z.
PR #1790 — DirectStorage
CreateQueue1on Intel Arc A770Tested
7a6f47a53975d3c1d5367a7742970bf53c547d33on 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 --workspaceandcargo test --workspace --no-runcompleted successfully.cargo test -p xcl hle::dstorage::tests -- --nocapturereported 18 passed, 0 failed, 0 ignored. The newcreate_queue1_auto_submit_disabled_waits_for_submittest verified that requests and a status entry stayed pending past half capacity,Queryreported0xFFFFfor entries until auto-submit, explicitSubmitcopied the expected bytes, andCloseresolved an unsubmitted status withE_QUEUE_CLOSED. The options-zero control auto-submitted at half capacity. The synthetic title also logged a pass for the legacyCreateQueuefile read, status, and D3D12 fence check.cargo test --workspace --no-fail-fast -- --test-threads=4ran 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
SKIPPEDlines. 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.dllabsent, 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 againstpr1790-suite.logand published this report.Imported from ivall/xcl. Originally posted by Royalflamejlh on 2026-11-26T02:55:32Z.
Linux (Wine + vkd3d-proton) + NVIDIA, the title, 2 runs each of
mainb49be183+ #684e56dbc3, with #17907a6f47aand with #15995b1518f: 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 onmain; #1599 gave 0 and 0. The setup and the table for all three trees are in the comment on #1599.RtlpWaitForCriticalSection … main process heap sectiontwice; the same hang came on 2026-11-25 on a tree with neither fix, so 2 runs cannot say whether #1790 adds to it.QueueInner::enqueueandenqueue_numberedlet the queue grow pastcapacity.Queryreports0xFFFFas 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.
Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:30:39Z.
merge-check claim
head:
7a6f47a539Imported from ivall/xcl. Originally posted by throny on 2026-11-28T02:45:22Z.
merge-check
base:
753e8b1ahead:
7a6f47a539merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 1513 passed, 0 failed, 47 ignored (26 SKIPPED lines); base alone: 1512 passed, 0 failed, 47 ignored
review: correct as written; its one QueueInner literal is updated. Limits: a queue with the option grows past its capacity without blocking, and Query reports the maximum count until a submit (neither checked against the PC API here). Against #1599, which solves the same problem and has my safe check: both read the option at the same place and stop the half-full auto-submit; #1599 also holds an enqueue on a full queue until Submit, cancel or Close, so it is the more complete one, while this one has no back-pressure but cannot block. They conflict textually (same create function, struct and enqueue conditions), so only one can land.
performance: a title that sets the option loads only at its Submit, as the option says; pending entries are unbounded if the title never submits (reasoned).
verdict: not yet: a choice between this and #1599 by the maintainer; nothing is wrong with this one on its own.
hardware / tool and model: RTX 4080 16 GB (621.40), i9-12900K, Windows 11 26300, Rust 1.100.0, debug. Claude Code; merge, build and suite run by Claude Fable 5.2, diff review by Claude Opus 5.5 (every hunk read; nothing run on the GPU beyond the suite).
Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T10:05:23Z.
merge-check claim
head:
7a6f47a539Imported from ivall/xcl. Originally posted by KOLESNiii on 2026-11-28T11:37:44Z.
merge-check
base:
e429936c10head:
7a6f47a539merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2127 passed, 9 failed, 48 ignored, 25 SKIPPED: 21 no wave64, 3 per-lane f16/f32 forms refused (#1426 semantics), 1 no heap windows; failing: gpu::dxil::module::split::tests::dispatch_chain_oversized_loop_matches_whole, gpu::dxil::module::split::tests::dispatch_chain_wave32_live_loops, gpu::dxil::module::split::tests::dispatch_chain_wave64_live_loops_and_exchange, gpu::recomp::heap_window_tests::gpu_heap_flat_reads_match_guarded_and_root_output, gpu::recomp::tests::gpu_compute_mode_dispatch_abi, gpu::recomp::tests::gpu_float_cas_uses_ieee_equality, test_title_draws_with_a_root_signature_under_the_debug_layer, test_title_runs_and_game_folder_is_untouched, test_title_runs_under_the_debug_layer_with_dred: these 9 fail on the base too (the base e429936c's suite, run alone on this PC with the same command: 2126 passed, 9 failed, 48 ignored, 25 SKIPPED, these same 9 failing), and each also failed when rerun alone on this merge (the two debug-layer e2e tests stop on the D3D12 debug layer rejecting a pixel shader as corrupt or unsigned, and test_title_runs_and_game_folder_is_untouched on the test title's console command list memory-methods check, "post-Wait32/64 write failed"); not caused by this PR. The suite ran on this PC at the same time as 3 other PRs' suites, in one queued job.
review: none. Whole diff read (dstorage.rs: CreateQueue1 reads the options u64 at desc + 0x18 and passes it on; bit 0 AutoSubmitDisabled stops the half-full auto-submit in both enqueue paths and QueryQueue reports u16::MAX until auto-submit; other bits are logged once and ignored; CreateQueue and options = 0 behave as before; 1 test with an options = 0 control). With auto-submit disabled the pending list is a Vec, so enqueuing past capacity grows it rather than blocking or dropping (QueryQueue's empty count saturates at 0); Close still resolves unsubmitted status entries as before.
performance: reasoned, not measured: one bool test per enqueue; no change for queues created without the option.
verdict: safe to merge
hardware / tool and model: Windows 11 build 26300.9974, NVIDIA GeForce RTX 2070 SUPER 8 GB (driver 621.40, wave32 only), AMD Ryzen 5 3600XT; rustc 1.100.1 (20ddd0171 2026-11-25) x86_64-pc-windows-msvc, debug test profile; trial merge e318a7e3f888ed25852aaa836b3722a7208ae0fb (local, not pushed). Claude Code: Claude Opus 5.5 (coordination, full-diff review, draft).
correction (2026-11-28): the base counts above were first given as 2128 passed: that base run reused this PC's merge test binary (one cargo target dir for both sides). The base was rerun with its own target dir; the same 9 tests fail on it, so the classification and the verdict stand.
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T06:47:51Z.
Triage (#1607) – head
7a6f47a#1599, merged as
f862f5f9, makes the same change:factory_create_queue1on main reads the options u64 at +0x18, warns on unknown bits, andcreate_queue(..., auto_submit)skips the capacity/2 auto-submit forAutoSubmitDisabled(testa_queue_with_auto_submit_disabled_waits_for_submit). Main goes further: a full queue holds the next enqueue until Submit. This PR now conflicts with that code. The one extra here isqueue_queryreportingu16::MAXfor the until-auto-submit count, which main does not do. If that matters, it can go in a small PR of its own.Recommendation: close (superseded by #1599 / main commit
f862f5f).AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
Imported from ivall/xcl. Originally posted by throny on 2026-12-01T12:48:03Z.
Closing as superseded: this change is already on
main(f862f5f9). #1599 merged asffdcd331/f862f5f9: CreateQueue1 reads DSTORAGE_QUEUE_OPTIONS, auto_submit off for AutoSubmitDisabled, enqueue at capacity waits for Submit, with tests; only leftover: PR also makes QueryInfo report u16::MAX requests-until-auto-submit for such a queue (main still reports capacity/2 there), speculativeTwo independent checks found this: Foniass's close list on #1607 and ours against current
main. If something here is still missing onmain, say so and reopen it, or ask and I will.AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents.
Pull request closed