D3D12.X: a split barrier's begin is not a completed transition #1746
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!1746
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/1746/head"
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 20:10 UTC · original
b3IKK:d3d12x/split-barrier-begin-not-complete→main· +30 −2 · 1 files · 1 commits · closed without mergingAddresses
XCL-BT-032from #1488.resource_barrier_xpassed every transition it forwarded totitle_textures::note_transitions, which takes theStateAfteras the state the texture is in once the list has run. A split barrier'sBEGIN_ONLY(D3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLY) only starts its transition: the resource is not in the new state — and must not be used — until the matchingEND_ONLYcompletes it. The state an upload into a kept-in-step texture started from could therefore belong to a transition that had not finished.This records a transition for the barriers that complete one (flags
NONEorEND_ONLY), not for aBEGIN_ONLY.END_ONLYkeeps itsStateAfter(the console repeats it in the pair).What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:completed_transitions()filters the barriers handed totitle_textures::note_transitions(type TRANSITION, flags ≠ BEGIN_ONLY); add testa_split_barriers_begin_is_not_a_completed_transition(NONE + BEGIN_ONLY + END_ONLY → 2 records; a UAV barrier is none). Fails with the filter removed:left: 3, right: 2.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): 960 passed, 0 failed, 43 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 list_x: 29 passed, 0 failedRegression run
main (
c4d37be, clean tree, no local changes):PR (
76cdd13, clean tree, no local changes):Not tested
AI use
XCL-BT-032againstnote_transitionsand the D3D12 split-barrier rules, wrote the fix and test (and confirmed it fails without the filter), rebased ontoc4d37be, ran the test suite andscripts/smoke.ps1regression runs with #677's title hashing, and drafted this PR description.@b3IKK on GitHub · 2026-11-24 21:35 UTC · original
Rebased onto
c4d37beand re-ran both with the current scripts/smoke.ps1 (#677's hashed itle: line): 960 passed, 0 failed, 43 ignored.@futurepro62 on GitHub · 2026-11-24 21:17 UTC · original · edited 2026-11-24 21:59 UTC
Full-suite run, since this PR has no test report yet. Tested exact head
4ab9be9(on its basec160d86).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: 858 passed, 0 failed, 42 ignored. SKIPPED (no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware.a_split_barriers_begin_is_not_a_completed_transition.XCL_ADAPTER=radeon),cargo test --workspace -- --test-threads=4: 859 passed, 0 failed, 42 ignored. SKIPPED:heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).--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
@DavidM1911 on GitHub · 2026-11-24 22:55 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. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling; clean on single-threaded rerun — same flake seen on unmodifiedmain.)Thanks!
@b3IKK on GitHub · 2026-11-25 00:03 UTC · original
Closing in favour of #1654, which came first and makes the same change (#1607, group D53): a
BEGIN_ONLYsplit barrier is not recorded as a completed transition. #1654 tests the flag bit, which is the better form; this one compared the whole flags word. AI use: OpenCode, Claude Fable 5.2.github-bot referenced this pull request2026-11-26 06:18:31 +00:00
Pull request closed