Repository navigation
Conversation
D3DMetal calls Release on adopted resources from a native thread of its own at submit time. That thread has no Wine TEB, so the first-time std::env::var read inside the OnceLock in late_release::enabled() enters Wine's ntdll and never returns. Reading the setting once in adopt(), on the Wine thread that creates the object, makes sure the OnceLock is already set before the host's thread can reach it. Part of xcl-dev#258. Assisted-by: Claude Code (Claude Opus 4.6 (1M context))
Hardware test report — commit
|
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
PR #1789 compatibility verification on STOR-WINLABTested commit Tested
Failures and skips
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 ( |
On 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 (comment); the rest (deferring a
Releasethat arrives on a host thread) stays a separate PR, since no test here needs it yet (#258 (comment)).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 + Recompiler: keep a draw's descriptor heaps alive until the list has run #553 + Ahmet-Dedeler'sddf3be7(which fix the other hangs in these two tests on this host): both time out, the first 2 of 2.main85e3826 alone, with and without this commit: both still time out, on the hangs Recompiler: keep a draw's descriptor heaps alive until the list has run #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