D3D12.X: hold BASES lock across DEPTH_BIAS_PSOS in depth_bias_pso and forget_base #1331
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!1331
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1331"
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?
@b3IKK on GitHub · 2026-11-24 14:50 UTC · original
b3IKK:d3d12x/depth-bias-pso-race→main· +87 −43 · 1 files · 1 commits · openIn
depth_bias_pso, the temporaryMutexGuardfromBASES.lock()was dropped at the semicolon before acquiringDEPTH_BIAS_PSOS.lock(), andforget_baselikewise droppedBASESbefore lockingDEPTH_BIAS_PSOS. Ifforget_baseran between those two locks, it removedbasefromBASESand scanned an emptyDEPTH_BIAS_PSOS, after whichdepth_bias_psoinserted the derived PSO under stalealive == trueÔÇöleaking the derived PSO permanently and risking stale cache hits if the base COM address is later reused.This holds both locks in consistent
BASES -> DEPTH_BIAS_PSOSorder incache_depth_bias_psoandforget_base_entries(still releasing PSOs outside the locks).What is in it
crates/xcl/src/hle/d3d12x/device_x.rs: extractcache_depth_bias_psoandforget_base_entriesholdingBASESacrossDEPTH_BIAS_PSOS; add 200-iteration concurrent testconcurrent_depth_bias_cache_and_forget_base_never_orphans_pso.Since the last push: rebased onto
main06c9f55; the only conflict wasuav_format_promotion_and_linearization, a testmainhad added at the same place, and both are kept.Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2609.5, debug (scripts/test.ps1) and release (scripts/smoke.ps1).\scripts\test.ps1(cargo build --workspace+cargo test --workspace -- --test-threads=4): 1266 passed, 0 failed, 46 ignored (SKIPPED: the wave64 / direct-DXIL per-lane tests that need 64-lane hardware or a semantics mode this adapter refuses,no heap windows, andcannot disable the driver cache (Windows Developer Mode is required))cargo test -p xcl --lib concurrent_depth_bias_cache_and_forget_base_never_orphans_pso: 1 passed, 0 failedRegression run
main (
426a5a7, clean tree, no local changes):PR (
e860e83, clean tree, no local changes):(The main block is
426a5a7, an ancestor of the currentmain, from the same machine and data folder.)Not tested
AI use
main06c9f55, resolved the conflicts, ran the suite and thescripts/smoke.ps1pair at the head above.@futurepro62 on GitHub · 2026-11-24 14:55 UTC · original · edited 2026-11-24 14:58 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
bf129cf(on its base930e8b4).Tested
cargo build --workspace, thenXCL_REQUIRE_GPU=mesh cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.concurrent_depth_bias_cache_and_forget_base_never_orphans_pso.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 752 passed, 0 failed, 41 ignored, no skips.Not tested
AI use
@DavidM1911 on GitHub · 2026-11-24 15:10 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: 707 passed, 1 failed (coherent_buffer_sanitizes_console_flags_and_state— the known flake from #913; passes standalone), 21 ignored.Thanks!
@DavidM1911 on GitHub · 2026-11-24 15:58 UTC · original
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib -- --test-threads=1: all passed, 0 failed, 21 ignored. (Parallel runs intermittently abort with 0xc0000005 — same harness flake seen on unmodifiedmain.)Thanks!
@DavidM1911 on GitHub · 2026-11-26 04:53 UTC · original
Re-verification on RTX 3060 Ti (Windows 11): still a merge conflict with current
mainon the new head — needs another rebase before it can be tested.View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.