Repository navigation
Conversation
|
Full-suite run, since this PR has no test report yet: the new test fails on both GPUs here, on its expected clear colour. Tested exact head Tested
Not tested
AI use
|
|
A regression run under Wine on Linux, on a retail title. Tested
Regression run main (first run): this PR: The last Not tested
AI use
|
|
GPU run of Tested
What this adds: the same 127 versus 128 is already reported on an RTX 5070 Ti and a Radeon iGPU. A third driver family on a different architecture shows it, which points at the test comparing an exact tie, not at a driver bug. A clear value that is not a tie (for example 0.502) or a tolerance of one would make the test independent of the driver's tie-breaking. I have not run that change. Not tested
AI use
|
39c1824 to
ebdbae3
Compare
|
Thanks @futurepro62 for running with the D3D12 debug layer enabled and catching the Updated AI use: Antigravity (Gemini 4 Carbon) |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Retest of the new head
AI use
|
ebdbae3 to
bb12dd7
Compare
|
Test report: on a retail title with the D3D12 debug layer, this PR removes the id 1422 errors (render and depth targets used before they are initialised). The title still ends at the same later device removal, which is not this PR's. Setup: RTX 5070 Ti 16 GB (driver 610.88), Ryzen 7 9700X, 32 GB, Windows 11 Pro 26300, rustc 1.97.0, release. Retail title, Series S profile ( Tree: a local integration branch on
Not tested: AI use: Claude Code (Claude Opus 5.5) resolved the cherry-pick, ran the runs and tests on the machine above and wrote this report. |
D3D12 placed and reserved resources created with ALLOW_RENDER_TARGET or ALLOW_DEPTH_STENCIL start uninitialized; using or transitioning them before a DiscardResource, Clear*View, or Copy* triggers debug-layer error 1422 (RENDER_TARGET_OR_DEPTH_STENCIL_RESOURCENOTINITIALIZED) and leaves target compression metadata uninitialized. Track whether a placement in vram::Pages::bind or vram::Arenas::take allocated exclusively fresh backing rather than sharing existing live or idle pages or an existing arena. When a render-target or depth-stencil placement is freshly backed, synchronously submit DiscardResource on an internal direct queue (after waiting on the tile-mapping fence for reserved placements) while preserving the resource's initial state and leaving aliased placements untouched. Part of xcl-dev#940. Assisted-by: Antigravity (Google DeepMind, Gemini 4 Carbon)
bb12dd7 to
4573144
Compare
|
Rebased onto
On the RX 9070 XT: |
D3D12 resources created with
CreatePlacedResourceorCreateReservedResourceandALLOW_RENDER_TARGETorALLOW_DEPTH_STENCILstart uninitialized; transitioning or using them before aDiscardResource,Clear*View, orCopy*triggers debug-layer error 1422 (RENDER_TARGET_OR_DEPTH_STENCIL_RESOURCENOTINITIALIZED, #940) and leaves target compression metadata uninitialized. Placements that alias existing live or< 2 sidle memory at the same title address (vram::Arenasreusing an arena orvram::Pagessharing any existing 64 KiB page) must keep earlier GPU writes intact and must not be discarded.Part of #940 (handles message 1422 on newly backed placed and reserved render targets and depth-stencil buffers; messages 538 and 824 remain separate).
What is in it
crates/xcl/src/hle/d3d12x/vram.rs: return afreshflag fromArenas::take(true only when a new arena heap is created) andPages::bind(true only when none of the target's tiles reused an existingpagesorextra_pagesentry). When a freshly backed placement carriesALLOW_DEPTH_STENCILorALLOW_RENDER_TARGET, synchronously submitDiscardResourceon a per-device internal direct queue insidetitle_textures::own_work(after waiting on thePagestile-mapping fence for reserved placements), transitioning toDEPTH_WRITEorRENDER_TARGETand restoring the initial state beforeplacereturns.crates/xcl/src/hle/d3d12x/vram.rs(tests): addfresh_targets_need_discard_once_and_aliased_arenas_do_not(unit test forArenas::takefreshness across live,< 2 sidle, and swept arenas plusdiscard_target_state) andfresh_placed_and_reserved_targets_discard_without_wiping_aliases(GPU test verifying fresh arenaD32S8and fresh reservedR8G8B8A8_UNORMtargets discard once, preserve non-target initial states across the discard, and do not discard or overwrite pixels when aliased at the same title address).Tested
32.0.32015.16001),rustc 1.100.0 (0ef1bc386 2026-11-09), debug and release.cargo test --workspace --no-fail-fast -- --test-threads=4on the head, rebased ontomain426a5a7: 1242 passed, 3 failed –gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,fuzz_validate_and_gpu_3andgpu::recomp::tests::gpu_image_get_resinfo_past_last_level, which fail the same way on a cleanmain426a5a7on this adapter; 46 ignored.cargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=4, 3 consecutive runs: 17 passed, 0 failed, 1 ignored on each run.fresh_placed_and_reserved_targets_discard_without_wiping_aliasesfailed beforediscard_freshwas wired in:discards()stayed 0.Regression run
main:PR head:
Not tested
XCL_SAMPLE_*sample-data tests.AI use
main426a5a7(keptcanonical_vanext to the discard helpers and updated the new arena tests to the 4-fieldArenas::takeresult), and reran the suite and the smoke pair.