Repository navigation
D3D12.X: add depth+UAV color twins, format-aliased placed texture copies, and dual-twin UAV barriers - #1989
D3D12.X: add depth+UAV color twins, format-aliased placed texture copies, and dual-twin UAV barriers#1989raylitebull wants to merge 1 commit into
Conversation
|
Technical review findings: Blocking
Major
|
|
Full-suite run, since this PR has no test report yet. Tested exact head Tested
Not tested
AI use
|
|
Regression run for this PR: head main this PR: No device removals or crashes; 100 % of main's frames, 104 % of its peak commit. Not tested: the whole suite; world loading; whether the title reaches all of the changed code in these 60 s (default settings: Written with Claude Code (Claude Opus 5.5) from runs on this machine. |
3443fd3 to
39d08cc
Compare
|
Thanks for the exhaustive review and every single catch, Updated
Compiled cleanly in release ( |
39d08cc to
197b104
Compare
|
Fixed the
|
PR #1989 GPU verificationPR head
Tested
SKIPPED output Not tested
AI use T3 Code / Codex (gpt-6.2-sol) ran the build and tests and drafted this report. Coordinator #2 handles verification and publication. Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified the counts against |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Regression run of Against the limits in CONTRIBUTING.md: 101 % of AMD Radeon RX 9070 (RDNA4, driver 32.0.32029.2010), Ryzen 7 7800X3D, 32 GB, Windows 11 build 26300, Rust 1.100.0, AI use: Claude Code (Claude Opus 5.5) built both trees and ran |
|
A test of this PR in the retail title's world, on the case that matters most there: a 2560 × 1440 D24S8 target that a compute program writes through its two UAVs and that the title's tiled lighting then tests with EQUAL. Full write-up, setup and numbers on #970: #970 (comment) Setup in short:
AI use: Claude Code (Claude Fable 5.2 coordinating, Claude Opus 5.5 for the merge and the runs) did this and drafted the comment. |
197b104 to
3c86172
Compare
|
Thanks so much for catching the D24S8 Enhanced Barriers sync issue on RTX 3090, Rebased
Verified on WARP ( |
3c86172 to
51ee197
Compare
|
Fixed the
Pushed |
Adds two D3D12.X translation layers for console texture behaviors not natively allowed on PC D3D12:
depth_uav.rs): tracks console depth-stencil textures created withALLOW_UNORDERED_ACCESS(includingCreatePlacedResource#29viadev_create_placed_resource_x), creates typeless/UAV-compatible color (and optional stencil) twin resources (TwinPlan,plan_for_console_format), redirectsCreateUnorderedAccessViewto the twin (resolve_uav, integratinguav_companion_srv+null_uav_descand pointingslot.pc_srvat the twin resource), synchronizes dirty per-subresource planes across both legacyResourceBarrier(filter_transition,on_uav_barrier), Enhanced Barriers (#146D3D12_BARRIER_GROUPtexture & global barriers infilter_enhanced_barriers), wildcard global UAV barriers (on_global_uav_barrier), and DSV binds/clears (before_bind_dsv,on_clear_dsv, keepingSTATE_COMMONtargets in legalDEPTH_READ/DEPTH_WRITEvianote_dsvflags and unifyingRowPitch = max(src_pitch, dst_pitch)across 2-planecopy_plane_through_buffer), emits post-DepthToTwinUAV barriers, and restores internal-pass graphics/compute root signatures, PSO state, and dynamic depth bias (restore_after_internal_pass).format_alias.rs): tracks aliased placed textures at overlapping GPU addresses with per-subresource state tracking (COMPUTE_VALID_STATES = 0xC48), copies/synchronizes between incompatible formats via RAIIOwnedCopyLocbuffer-through passes (copy_one_subresource_through_bufferwithmax(src_pitch, dst_pitch)pitch alignment,try_copy_texture_region), and routes evicted/orphaned descriptors and heaps throughlate_release::hold(is_adopted-guarded).Part of #1833.
What is in it
crates/xcl/src/hle/d3d12x/depth_uav.rs&mod.rs:TwinPlan/DepthSyncKind/PlaneMask/SyncOpper-subresource state machine (filter_enhanced_barriers,on_global_uav_barrier,note_dsv,pc_states_depth,pc_states_stencil,split_uav_*,copy_direct_subs,transition_plane_subs,on_uav_barrier), post-DepthToTwinUAV barrier,late_release::holdteardown, plus unit & WARP GPU tests (depth_uav::tests, includingenhanced_barriers_handle_texture_subresources_uav_and_discardandgpu_d24s8_and_d16s8_enhanced_barrier_twin_sync_passes_equal_depth_test).crates/xcl/src/hle/d3d12x/format_alias.rs: placed texture alias tracking (list_reset), RAIIOwnedCopyLocbuffer-through sync (max(src_pitch, dst_pitch)),COMPUTE_VALID_STATES = 0xC48, element byte width / block-scaled dimension checks intry_copy_texture_region, and unit tests informat_alias::tests.crates/xcl/src/hle/d3d12x/bind.rs,device_x.rs,late_release.rs,list_x.rs,real.rs:rs_cs+rs_gfxrestoration (restore_after_internal_pass),is_adopted-guardedlate_release::drain_known,dev_create_placed_resource_x+dev_create_uav_xintegration (#1914companion SRV +slot.pc_srvtwin SRV), and Enhanced Barrier (#146) / UAV (#26) routing inlist_x.rs.Tested
rustc 1.99.1 (58cf8f9c3 2026-10-13), WARP (XCL_ADAPTER=warp,XCL_D3D12_DEBUG=1), rebased cleanly onto96331383(51ee197c).XCL_ADAPTER=warp cargo test -p xcl --lib "hle::d3d12x::" -- --test-threads=4 --skip pc_resource_desc_strips_uav_on_unsupported_formats_and_msaa(2 consecutive runs): 214 passed, 0 failed, 2 ignored (--skipexcludes only pre-existingmaintest conflict fixed separately in Tests: align device_x UAV strip and pso cache marker tests with main #2233).XCL_ADAPTER=warp XCL_D3D12_DEBUG=1 cargo test -p xcl --lib -- --nocapture --test-threads=1 "hle::d3d12x::depth_uav" "hle::d3d12x::format_alias": 9 passed, 0 failed (0.09s,0D3D12 debug errors, includingenhanced_barriers_handle_texture_subresources_uav_and_discardandgpu_d24s8_and_d16s8_enhanced_barrier_twin_sync_passes_equal_depth_test).Regression run
scripts/smoke.ps1pair on51ee197cvs96331383has not been run yet. AMD and NVIDIA reviewers are invited to test on51ee197cvs96331383(includingscripts/smoke.ps1,depth_uav/format_aliasGPU tests, and world lighting/depth-UAV workloads) and post results in the comments.Not tested
scripts/smoke.ps1pair on51ee197c, fullcargo test --workspacesuite on51ee197c, runtime GPU execution across AMD / NVIDIA / Intel hardware, and Linux/Wine/vkd3d-proton.AI use
96331383, and unit/GPU tests; the author reviewed the diff and test output.