Repository navigation
D3D12.X: console UAV clears (#53 / #54) get the slots' PC descriptors - #1291
Conversation
|
Independent native NVIDIA float clear check on I adapted the WARP fixture to use an Synthetic buffer and handler coverage only. AI-assisted. Codex (GPT-6, exact variant unavailable) adapted and ran the scratch fixture and drafted this report. Recheck on current head 1a1a07f on the same RTX 3080 Ti. The clean workspace built and reported 1,253 passed, 0 failed, 46 ignored, including 25 reported skips (20 without wave64, 3 unsupported per-lane forms, 1 driver-cache toggle and 1 heap-window test). All three stock UAV tests passed, including the WARP readback. I also ran the unsigned-integer clear on the RTX 3080 Ti with separate CPU-only and shader-visible heaps, a buffer created in COMMON and transitioned to UAV, and D3D12 debug and GPU-based validation enabled. All 64 elements matched. The device stayed healthy, with zero validation warnings or errors. The native check changed only the test fixture. No retail or shared-heap coverage in this recheck. AI-assisted. Codex (GPT-6, exact variant unavailable) ran the suite, adapted the native fixture and drafted this update. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
Thanks for running this. Is retail-title the actual folder name, or did you anonymize the title? I’m trying to reproduce the smoke test—could you share the title name and confirm it was an authorized, unpacked Xbox build? I am very confused as to how to run the smoke test. No game files needed. @emirduran707 |
|
Full-suite run on NVIDIA and AMD (the checks above are NVIDIA only). Tested exact head Tested
Not tested
AI use
|
…cl-dev#1286-xcl-dev#1291, xcl-dev#1294, xcl-dev#1296-xcl-dev#1297, xcl-dev#1300 Prevent background shader preloading and concurrent DXC/RADV compiles from exhausting host RAM under Wine, and integrate 11 open upstream PRs: - dxc.rs & real.rs: check free physical RAM (ullAvailPhys.min(ullAvailPageFile)) under Wine instead of swap-inclusive ullAvailPageFile, avoid bypassing the guard after 60 s under Wine, and serialize giant (>= 4 MiB DXIL) driver compiles with BIG_COMPILES under Wine. - pso_async.rs: cap background preload workers to 1 under Wine. - title_textures.rs: use real::create_raw_fence in submit_on_title_queue and read coherent-window hash bytes safely via with_title_bytes. - Integrate upstream PRs xcl-dev#968 (sparse::queue lock-free for late_release), xcl-dev#1286 (v_dot2_f32_f16 NEG_HI abs), xcl-dev#1287 (XMA >8 channels), xcl-dev#1288 (Sleep pauses during PSO bind waits), xcl-dev#1289 (pipeline stream bounds check), xcl-dev#1290 (root signature MAX_ARGS cap), xcl-dev#1291 (console UAV clears xcl-dev#53/xcl-dev#54), xcl-dev#1294 (shadowed PENDING accuracy), xcl-dev#1296 (16-bit compare low halves), xcl-dev#1297 (fence_x pre-cell signal arming), xcl-dev#1300 (log driver compute PSO refusal). Verified on RX 9060 XT under GE-Proton11-14 (MemoryMax=12G, 80 s): committed RAM stays flat at 4830 MB (down from 27.6 GB OOM), 1493 frames shown, exit 0x0. Assisted-by: Antigravity (Google DeepMind)
|
Retail title check on AMD RDNA2: the upscaler's UAV clears no longer fault in the driver This covers the "Not tested: a title's own UAV clears on hardware" point, with the retail title (1.0.2.1). Setup: AMD Radeon RX 6700 XT 12 GB (RDNA2), driver 32.0.21045.29003, Ryzen 5 5600X, 16 GB RAM, Windows 10 Pro 22H2 (19045.6466), Agility SDK 1.620.2, Rust 1.90.0, release build. Without the change ( With it, exact head An equivalent change of mine (same slots, same translation through Not tested: NVIDIA / Intel with the retail title; whether the clears give the right values (nothing on screen to check yet – the title is still on its loading art at that point here). AI use: Claude Code, Claude Opus 5.5 ran the builds and runs on my PC and wrote this report. Counts, times and offsets only. |
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
|
@WASDeKeys
For a PR, run it once on a build of Written with Claude Code (Claude Opus 5.5). |
Series S: BTP 6 runs AMD's FidelityFX upscaler (FSR4), whose console compute programs XTP cannot translate (20 refused, "no DXIL part"); with its DLLs refused the title divides by zero at title+0x28f03e8. xtp-hle `ffx` stands in for amd_fidelityfx_loader_xbox.dll and amd_fidelityfx_upscaler_xbox.dll unless XTP_FSR4=1. From the title's own calls (title+0x28ef2cc, +0x28ef30f, +0x28ef625, +0x28f03db, +0x28f0651): - create (upscale 0x10000 + console backend + version chain): a context; - query 0x10004: the jitter phase count, 8 x (display / render)^2, 18 for 720p -> 1080p (the divisor at title+0x28f03e8); - query 0x10005: AMD's Halton (2, 3) jitter offsets, written into the title's uninitialised locals; - query 0x10008: the upscaler's GPU memory, 0 (the title adds it to a memory total, again from uninitialised locals); - dispatch 0x10001: xtp_gpu::list::upscale, a bilinear compute pass of XTP's own from the colour input to the output, the jitter taken back as FidelityFX places its samples, clamped to the rendered region. No AMD code runs. xtp-gpu list slots 0x1a8/0x1b0, ClearUnorderedAccessViewUint/Float. The two handles are console descriptor slots holding XTP's view records; the host gets its own descriptors of the same view: a dynamic slot of XTP's view heap (bound for the clear) and a CPU-only slot. Texture views move to unordered access, buffer views write their host copy, copied back to title memory after the submission. Float clears of raw and structured buffer views are refused, as the host would (#948's review). Outside the task's files, granted by the orchestrator: - draw.rs: State::forget_host, so the title's pipeline, root signature and heaps go back on the host list after the upscale or a clear; - descriptor/host.rs: make_view (a view into a CPU-only heap) and make_at says whether it made the view. Mechanical: modules/mod.rs, the `ffx` module line and its registration. Tests: phase count, Halton offsets, the three queries and the create chain as the title lays them out, a dispatch description read at the title's offsets; on WARP, the upscale (bilinear, jitter, regions) and UAV clears of a texture and a buffer through console handles. Ported from Marvisak/VIctory#1284 (head f96ad82) by AwkGrep256: the module standing in for both DLLs, its exports, the description layouts, unknown types logged once. Not taken: its passing on to AMD's PC loader, the picker and scale patches (Series X diagnostics). UAV clears after Marvisak/VIctory#948 (head 35802af) by Sakura-Byte, reimplemented on XTP's descriptors; the handle translation is the idea of xcl-dev/xcl#1291 (GPL-2.0-only, no code taken). Co-authored-by: AwkGrep256 <AwkGrep256@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Test report: on a retail title, this PR removes a GPU hang at the first frame of the world. DRED put the hang at a 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
What still ends the run (not this PR): the Not tested: AI use: Claude Code (Claude Opus 5.5) ran the runs on the machine above, read the DRED output and wrote this report. |
|
@emirduran707 I have a retail-title, I was just wondering if there's a specific title I need to run the smoke test on or if any xbox series unencrypted title would do. |
|
@WASDeKeys Any unpacked Xbox Series (GDK) title you own works; there is no specific one. What matters is that you run the same title twice: once with an Written with Claude Code (Claude Opus 5.5). |
|
Thanks a ton, this has cleared a big confusing part for me. Also could you tell me if there is a list of things that need work right now, like improvement issues that need fixing and testing or really anything you would point a new contributor towards? Also is there a chat room/community like in discord yo coordinate with other devs? Thanks! |
…PC descriptors The command list's console xcl-dev#53 / xcl-dev#54 (ClearUnorderedAccessViewUint / Float) were remapped straight to PC xcl-dev#49 / xcl-dev#50 (`console_remap`) with no override, so a title's call reached the PC method with its handles as they were. Console code takes its descriptor handles from heap xcl-dev#9 / xcl-dev#10, which give it the address of its console heap slots in unified memory (`console_heap::start`), not PC descriptor handles: the PC clear got a GPU handle outside the bound shader-visible heap and a CPU handle pointing at T# words. Only the opt-in console-list replay (XCL_CONSOLE_LISTS=1) translated them. (same arguments as the PC methods): two console slots become their PC UAVs (GPU: `pc_gpu_uav`, in the heap lists bind; CPU: `pc_uav`, in the title's CPU-only heap), as the replay does; two PC handles go through as they are; a mix, or a slot without a shader-visible UAV, is skipped and logged once. Test on WARP: an R32_UINT buffer UAV in a CPU-only and a shader-visible console heap, xcl-dev#53 with the console handles and 0xDEADBEEF. With the handles passed through (the old path) the test process dies with STATUS_ACCESS_VIOLATION in the PC clear; with the translation the buffer reads back 0xDEADBEEF. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
0fd1b66 to
1a1a07f
Compare
|
Two contributors checked independently and found that #2329 solves the same problem (for #675) in a different way: #1607, group D80. You may want to compare them with the other author and agree on one, or say in the PR why both are needed. This is a hint from the community triage in #1607, not a maintainer decision. AI use: Claude Code (Claude Opus 5.5), posted by a script from the #1607 table. |
|
A second NVIDIA card for the retail-title result above, and a correction on my side: #2329 is my duplicate of this PR (the triage hint above, group D80). This one was first, so I am closing #2329 in its favour. I found the same hang independently today and missed this PR in my search. The measurements, made with the same handle translation as here ( Setup: RTX 5080 16 GB (driver 610.47, 32-lane waves), i7-7700K, 16 GB RAM, Windows 10 22H2, release. The newer retail title (my own copy),
The one difference between the two PRs, for you to judge: when the GPU slot's UAV is in the shared heap, #2329 calls Not tested: this head itself. When this machine is free I will run this PR's three tests on the RTX 5080 and post the counts here. AI use: Claude Code with Claude Fable 5.2 ran the title on the machine above and wrote this. |
Console command lists'
ClearUnorderedAccessViewUint/Float(#53 / #54) went straight to the PC's #49 / #50 (console_remap). No XCL code ran on them, so the console's descriptor handles reached the PC unchanged. Console code gets those handles from heap #9 / #10, which return console heap slot memory in unified memory, not PC descriptors. So the GPU handle was not in the bound shader-visible heap, and the CPU handle pointed at the console's T# words. Microsoft's documentation ofClearUnorderedAccessViewUint: the GPU handle "must be in a shader-visible descriptor heap, which must be set on the command list via SetDescriptorHeaps", and the CPU handle must be "in a non-shader visible descriptor heap that references an initialized descriptor". Only the opt-in console-list replay (XCL_CONSOLE_LISTS=1) translated them.clear_uav_uint_x/clear_uav_float_xnow take #53 / #54:What is in it
crates/xcl/src/hle/d3d12x/list_x.rs:uav_clear_handles;uav_clear_handles_translate_console_slots, with no device;clear_uav_with_console_handles_clears_the_slots_viewon WARP. It registers an R32_UINT buffer UAV in a console heap, clears it with the console handles and 0xDEADBEEF, and reads it back.crates/xcl/src/hle/d3d12x/real.rs: slots 53 / 54 inconsole_slots(Kind::CommandList), and testconsole_clear_uav_slots_translate_handles.Tested
cargo build --workspace, thencargo test --workspace --no-fail-fast -- --test-threads=4on 1a1a07f (rebased ontomain1a0bbe3): 1251 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpu;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record)gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1,gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_3) fail identically on unmodifiedmain1a0bbe3on this GPU (seeds 722 and 1599).console_slots,console_clear_uav_slots_translate_handlesfails; with a pass-through decision (what the default path did), the WARP test ends the test process withSTATUS_ACCESS_VIOLATIONinside the PC clear; with the change all three passRegression run
main:
this PR:
Not tested
AI use
main1a0bbe3(a conflict in the tests ofcrates/xcl/src/hle/d3d12x/list_x.rs; both tests kept) and reran the suite and smoke runs above.🤖 Generated with Claude Code