D3D12.X: clear illegal PC split-barrier flags on UAV and aliasing barriers #3236
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3236"
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 Kalmarv on 2026-11-28T23:37:38Z.
Clear illegal PC split-barrier flags (
BEGIN_ONLY/END_ONLY) onAliasing(Type == 1) andUAV(Type == 2) resource barriers, preserving them only onTransition(Type == 0) barriers.What is in it
crates/xcl/src/hle/d3d12x/list_x.rs: restrictallowed_flagstoif ty == 0 { PC_FLAGS } else { 0 }and extendresource_barrier_console_flags_*unit tests.Tested
rustc 1.99.0, DXC 1.9 (XCL_DXC_DIR), debug for unit tests and release forxcl-smoke.cargo test -p xcl --lib resource_barrier_console_flags -- --nocapture: 3 passed, 0 failed, 0 ignored.BISECT1, RTX 5070 Ti,XCL_DIRECT_DXIL=all):exit 0x0,1.69 fps(matching baseline),0removals,0crashes.Regression run
main (
f0e8fdd5c3942ddd399d5ee11384c8595c5aacff):PR head (
0dffe8a003611c70f96726e287d7ca18d0d3e075):Not tested
0xC00,COPY_SOURCE | COPY_DEST).AI use
xcl-smokeregression run.Imported from ivall/xcl. Originally posted by Foniass on 2026-11-29T14:57:30Z.
Merge-check run and written with Claude Code (Claude Opus 5.5): a test merge onto the base above, the full suite, and a 60 s
scripts/smoke.ps1run of a retail title against main on the same machine. The 4fuzz_validate_and_gpu_*failures happen on main on this machine too.Imported from ivall/xcl. Originally posted by fromthemoonx on 2026-12-01T18:36:01Z.
merge-check
base:
6bfb5c5153head:
0dffe8a003merge: clean
build: cargo build --workspace -> ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 -> 2904 passed, 0 failed, 51 ignored (base: 2904 passed, 0 failed, 51 ignored); SKIPPED: 25 (22 no wave64, 2 no heap windows, 1 no GPU_UPLOAD heaps), the same set as base; failing: none from this PR. The whole-suite run ended the lib binary with 0xc0000005 during
eh::tests::thread_dumps_while_threads_run_and_exit(#3586, on main too; this PR touches onlylist_x.rs). The counts are the lib binary run on its own (2756 passed, 0 failed, 31 ignored) plus the other binaries (148 passed, 0 failed, 20 ignored).review: read the whole diff (
list_x.rs, +12 -4). No correctness problem found.resource_barrier_xnow keepsBEGIN_ONLY/END_ONLYonly on transition barriers (type 0). UAV (2) and aliasing (1) barriers reach the PC with flags 0.resource_barrier_console_flags_*(3 tests): 3 of 3 runs passed.allowed_flags = PC_FLAGSfor every type (main's behaviour) failsresource_barrier_console_flags_keep_uav_ordering_and_aliasing. Good.performance: none measurable: one comparison per barrier; a split UAV / aliasing pair costs one extra barrier.
verdict: safe to merge
hardware / tool and model: RTX 3060 12 GB (610.88), Ryzen 7 5700X, Windows 11 Pro 26300 / Claude Code (Claude Opus 5.5)
Imported from ivall/xcl. Originally posted by Decodere on 2026-12-02T10:34:04Z.
merge-check
base:
1c8b551475head:
0dffe8a003merge: clean (trial-merge commit e289ce37db0ce29381c8fbf65411d03662e2eaef, git diff --check clean)
build: cargo build --workspace ok; cargo build --release -p xcl ok
tests: cargo test --workspace --no-fail-fast -- --test-threads=4 --nocapture (43 targets): 2908 passed, 1 failed, 51 ignored. All 4 targeted resource-barrier tests in hle::d3d12x::list_x::tests passed with 0 skips (resource_barrier_console_flags_keep_transition_and_split_bits, resource_barrier_console_flags_keep_uav_ordering_and_aliasing, resource_barrier_console_flags_leave_existing_filters_in_place, gpu_resource_barrier_console_hint_preserves_texture_copy), covering the 4 new BEGIN_ONLY/END_ONLY clearing assertions on UAV and aliasing barriers. The single failure is the pre-existing Issue #3441 flake in tests/gpu_two_pass_cache_e2e.rs::two_pass_driver_cache_reuses_both_passes_and_recovers_corrupt_blobs (line 584, left: 1, right: 0), reproduced identically on clean base
1c8b5514and unrelated to list_x.rs. 28 SKIPPED lines (host environment only: 22 no wave64, 2 no d3d12SDKLayers.dll, 1 no D3D12 debug layer, 2 no heap windows, 1 cannot disable the driver cache (Windows Developer Mode required)).review: Read the full merged diff (+12/-4 in crates/xcl/src/hle/d3d12x/list_x.rs::resource_barrier_x and tests). Sets
allowed_flags = if ty == 0 { PC_FLAGS } else { 0 }soD3D12_RESOURCE_BARRIER_FLAG_BEGIN_ONLYandEND_ONLYare preserved only on transition barriers (ty == 0) and cleared to 0 (with capped warn logging) on aliasing (ty == 1) and UAV (ty == 2) barriers, matching PC D3D12 validation rules while preserving console barrier ordering. Unit test assertions cover flags 1 and 2 on bothty == 2andty == 1. Minimal, exact, no scope creep or UB.performance: 60 s retail smoke (title: 29640639): 1652 frames (+13.0% vs
1c8b5514baseline 1462 frames), 14669 MB peak commit (-8.6% vs 16043 MB baseline), 0 device removals, 0 crashes.verdict: safe to merge
hardware / tool and model: NVIDIA GeForce RTX 4060 8 GB (driver 621.40), Intel Core i5-11400F, 32 GB RAM, Windows 11 Build 26200, Rust 1.100.1 MSVC, DXC 1.9.2602.17 / Antigravity (Gemini 4 Neon)