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
|
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)
ebdbae3 to
bb12dd7
Compare
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=4: 961 passed, 0 failed, 43 ignored, 8SKIPPEDlines (6per-lanef16subcases ingpu::recomp::lower_dxil::tests::{f16_programs_on_the_gpu, f32_programs_on_the_gpu},shaders::tests::pso_measurement_compiles_an_exact_synthetic_recordrequiring Windows Developer Mode, andheap_window_out_of_memory_falls_back_to_the_switch_form; the 2 optionald3d12SDKLayers.dlltests return early because Windows Graphics Tools is not installed on this host).cargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=4andcargo test -p xcl --lib hle::d3d12x::vram -- --test-threads=1:fresh_placed_and_reserved_targets_discard_without_wiping_aliasesfailed before wiringdiscard_fresh(discards()stayed 0); 12 passed, 0 failed, 1 ignored after wiring it.Regression run
main:PR head:
Not tested
d3d12SDKLayers.dll) message count check on a retail run on this host (Windows Graphics Tools is not installed locally).XCL_SAMPLE_*sample-data tests.AI use
3bc7143), and ran the test suite and 60 s smoke check.