Repository navigation
D3D12.X: count the barriers that use a depth buffer as a UAV (#970) - #1027
IvyNotFound wants to merge 1 commit into
Conversation
|
Independent verification, merged onto current Machine: Windows 11, Ryzen 9 7900X + RTX 3060 Ti + Radeon iGPU; Rust stable MSVC, debug.
AI use: test runs by Devin (Cognition, SWE-2); no code changes. |
ba8d356 to
fb7c2f0
Compare
…#970) A console depth buffer that shaders write too has no ALLOW_UNORDERED_ACCESS on the PC (pc_resource_desc drops it) and its UAVs are null views, so the writes are lost. The title's barriers that use such a resource as a UAV are now counted and logged (the first 8, then every power of two): - transitions from or to UNORDERED_ACCESS and UAV barriers naming it, both for PC-format lists (resource_barrier_x) and console-recorded ones (console_list replay); - enhanced texture barriers (xcl-dev#146, D3D12_BARRIER_GROUP) with the UNORDERED_ACCESS layout or access. XCL still turns xcl-dev#146 into one global UAV barrier; only the description is read here. The null-view warning gives its total instead of stopping at 4. Measured on the retail title of xcl-dev#505 (RTX 5080, 300 s runs, A at 15 s): no legacy barrier touches these resources; enhanced barriers move D16 shadow maps (768x768x6, 1024x1024, 512x512) into or out of the UNORDERED_ACCESS layout once the world starts loading (62-64 s; 12 in a run with every one logged). No behaviour change: every barrier goes to the PC as before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
fb7c2f0 to
d9d11f5
Compare
Empirical test report (d9d11f5)Hardware / environment
Commands and results
Observed behavior
Not tested The full GPU workspace suite and game smoke runs were omitted. The fixtures cover CPU-side flag and barrier classification. Live barrier counting, warning cadence, and dispatch to a D3D12 device were outside the focused run. AI use Verified with T3 Code / Codex (gpt-6.2-sol, reasoningEffort: high). Coordinator #2 (T3 Code / Antigravity, gemini-4-neon) verified counts against |
|
NVIDIA test report for
AI-assisted (Claude Code, Claude Opus 5.5). Synthetic tests only; no title run. |
|
Nothing has happened on this PR for 3 days, so it is marked |
|
#1063 is stacked on this PR, and both target #970. Main has since fixed #970 differently: AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human. |
|
Closing as superseded: this change is already on Two independent checks found this: Foniass's close list on #1607 and ours against current AI use: Claude Code (Claude Opus 5.5); the per-PR comparison was done by Claude Sonnet 5.5 sub-agents. |
Part of #970: diagnostics only, the first of the four steps planned there. Replaces #1021, closed when its fork was deleted (same commit).
A console depth buffer that shaders write too has no
ALLOW_UNORDERED_ACCESSon the PC (device_x::pc_resource_descdrops it) and its UAVs are null views (real::dev_create_uav_x), so what shaders write through them is lost. This counts and logs the title's barriers that use such a resource as a UAV, so the effect can be measured before anything changes. No behaviour change: every barrier still goes to the PC as before.On the retail title of #505 no legacy barrier touches these resources: its texture transitions come through #146 (enhanced barriers,
D3D12_BARRIER_GROUP), whose description XCL does not read (it emits one global UAV barrier – HANDOFF lists the #146 description as "not yet"). There, D16 shadow maps (768x768x6, 1024x1024, 512x512) go into or out of theUNORDERED_ACCESSlayout once the world starts loading (62–64 s; 12 barriers in a run with every one logged).What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:depth_without_uav(ALLOW_DEPTH_STENCIL without ALLOW_UNORDERED_ACCESS) andnote_depth_uav_barrier(counted; the first 8 and every power of two logged), called for transitions from / toUNORDERED_ACCESSand UAV barriers naming the resource inresource_barrier_x;note_depth_uav_barrier_groupsreads the texture barriers of Compute dispatches: a shader takes no more arguments from user SGPRs than it has (XboxBvhBuilder builds empty BLAS / TLAS) #146 (uav_barrier_x) and counts those with theUNORDERED_ACCESSlayout or access (barrier_uses_uav). Tests:a_depth_buffer_without_unordered_access_is_one_with_null_uavs,an_enhanced_barrier_into_or_out_of_unordered_access_is_a_uav_use.crates/xcl/src/hle/d3d12x/console_list.rs: the same for console-recorded lists (their replayed transitions and their Compute dispatches: a shader takes no more arguments from user SGPRs than it has (XboxBvhBuilder builds empty BLAS / TLAS) #146 calls).crates/xcl/src/hle/d3d12x/real.rs: the null-view warning gives its total instead of stopping at 4.Tested
cargo test --workspace --no-fail-fast -- --test-threads=4atd9d11f5(rebased ontomainb7aa9f3) withXCL_SAMPLE_RPF,_DLLS,_TTPF,_BVH4,_BK2,_AWCset: 772 passed, 0 failed, 41 ignored;SKIPPED(no wave64):gpu_geometry_wave32_prefix_count_over_a_mask,gpu_wave32_program_in_wave64_hardware. Before the rebases, one run of the same change had the Tests: placed_title_textures_share_vram_and_preserve_pixels fails now and then at its cubemap reuse check (main 9ce2070) #718 flake (715 passed, 3 failed).scripts/smoke.ps1,XCL_PRESS_A_AT=15: the regression runs below (60 s, menus and the start of world loading;mainb7aa9f3and this headd9d11f5, after the rebase), and a 300 s run of this branch for the numbers above (it ends in the title's "GPU Loc Sig" abort at ~92 s, asmaindoes).Regression run
main:
this PR:
Not tested
AI use
🤖 Generated with Claude Code