D3D12.X: read the late-release setting at adoption, not at first release #1789
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!1789
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1789"
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?
@vakaobr on GitHub · 2026-11-24 20:44 UTC · original
vakaobr:d3d12x/late-release-read-at-adoption→main· +14 −0 · 2 files · 1 commits · openOn a Mac (CrossOver, D3DMetal), D3DMetal releases the resources of an executed command list from a native thread of its own, which has no Wine TEB. The first
Releasethere callslate_release::enabled(), whoseOnceLockreadsXCL_LATE_RELEASEfrom the environment for the first time, and that read never returns on that thread. This reads the setting inreal::adopt, on the Wine thread that creates the object, so theOnceLockis set before the host's thread can reach it. Nothing changes on Windows: the same value is read once, only earlier.Part of #258. It is the first commit of the series Ahmet-Dedeler reviewed in #258; the rest (deferring a
Releasethat arrives on a host thread) stays a separate PR, since no test here needs it yet (#258).What is in it
crates/xcl/src/hle/d3d12x/late_release.rs:init(), which forces the one-time read.crates/xcl/src/hle/d3d12x/real.rs:adoptcalls it for every adopted object.Tested
x86_64-pc-windows-gnu(mingw-w64 GCC 16.2.0), debug, DXC 1.9.2609. Each test in its own process (<test exe> --exact <test> --test-threads=1 --nocapture, 90 to 120 s timeout).console_wave64_compute_through_the_pso_hook_dispatch_and_read_back(tests/gpu_compute_e2e.rs) andhle::d3d12x::title_textures::tests::gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes:main85e3826+ #553 + Ahmet-Dedeler'sddf3be7(which fix the other hangs in these two tests on this host): both time out, the first 2 of 2.main85e3826alone, with and without this commit: no run passes; each times out or ends without a result, on the hangs #553 andddf3be7fix.late_releaseunit tests (a_held_resource_goes_when_the_queue_is_past_its_batch,without_queues_a_batch_goes_at_once): pass.Regression run
This changes runtime files, so it needs an
xcl-smokepair from someone with a title; I have none.Not tested
XCL_LATE_RELEASEearlier.AI use
@eizispark on GitHub · 2026-11-24 21:04 UTC · original
Hardware test report — commit
2e85970Verified
2e85970aa5f53c8617985b380e4f35920e6d041c(clean merge withmainea683a0): pass.Tested
32.0.32015.16001), AMD Ryzen 7 9800X3D, 32 GB RAM, Windows 11 x64 (stable-x86_64-pc-windows-msvc,rustc 1.100.0 (0ef1bc386 2026-11-09)), debug tests + release smokecargo test --workspace --no-fail-fast -- --test-threads=4:875 passed, 0 failed, 42 ignored(2 skipped:shaders::tests::pso_measurement_compiles_an_exact_synthetic_record— Windows Developer Mode required (0x887A002D);heap_window_out_of_memory_falls_back_to_the_switch_form: no heap windows)hle::d3d12x::late_release::tests(a_held_resource_goes_when_the_queue_is_past_its_batch,without_queues_a_batch_goes_at_once),hle::d3d12x::title_textures::tests::gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes,console_wave64_compute_through_the_pso_hook_dispatch_and_read_back, and both native RDNA4 wave64 GPU tests (gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware) passed cleanly on Windows 11 MSVCRegression run (
scripts/smoke.ps1, 60 s, warm shader/driver cache)main(85e38262ff94aecd75d6f83fa8156a8b7697bd13):PR (
2e85970aa5f53c8617985b380e4f35920e6d041c):Not tested
XCL_D3D12_DEBUG=1retail run, gameplay past the menusAI use
@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!
@JJAutoCompare on GitHub · 2026-11-25 03:20 UTC · original
PR #1789 compatibility verification on STOR-WINLAB
Tested commit
2e85970aa5f53c8617985b380e4f35920e6d041c. The diff initializes the cachedXCL_LATE_RELEASEvalue during D3D12.X object adoption, before the release hook can read it.Tested
DoublePrecisionFloatShaderOps=0, andd3d12SDKLayers.dllabsent. Rust 1.100.0, DXC and DXIL 1.9.2609.5, unoptimized builds with debug info disabled.cargo build --workspaceandcargo test --workspace --no-runsucceeded.cargo test -p xcl late_release -- --nocapturereturned 2 passed, 0 failed, 0 ignored, 0 skips. The existing tests verified that a held resource drains after the queue passes its fence and that a batch drains immediately when there are no queues. Both also passed in the workspace run.cargo test --workspace --no-fail-fast -- --test-threads=4ran once under the shared Arc lock and returned exit code 101. Across 20 libtest summaries, including doctests, the totals were 857 passed, 18 failed, 42 ignored. The log contains 4SKIPPEDlines. Those skipped paths supply no coverage even where libtest reports the enclosing test as passed.Failures and skips
CreateComputePipelineStateerror0x80070057, including FP64 tests. Four reported assertion mismatches in fused F32 overflow, implicit texture LOD, F16 high-half preservation, and pixel-shader wave reductions.RSSetDepthBiasX(-1000.5)left the top-right pixel blue when the test expected green.Not tested
Wine/D3DMetal and the native release thread without a Wine TEB, a main-branch baseline, retail-title smoke runs, sample-dependent paths, and other GPU vendors. This run establishes Windows behavior for the tested head. A baseline would be needed to attribute the suite failures to the PR.
AI use
T3 Code / Codex (
gpt-6.2-sol,reasoningEffort: high) ran the build and verification. Coordinator #2 (T3 Code / Antigravity,gemini-4-neon) verified counts againstpr1789-suite.logand published this report.View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.