Repository navigation
D3D12.X: console UAV clears (#53 / #54) get the slots' PC descriptors - #1291
emirduran707 wants to merge 1 commit into
Conversation
…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. xcl-dev#53 / xcl-dev#54 now go to `list_x::clear_uav_uint_x` / `clear_uav_float_x` (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>
|
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. |
|
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
|
…vall#1286-ivall#1291, ivall#1294, ivall#1296-ivall#1297, ivall#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 ivall#968 (sparse::queue lock-free for late_release), ivall#1286 (v_dot2_f32_f16 NEG_HI abs), ivall#1287 (XMA >8 channels), ivall#1288 (Sleep pauses during PSO bind waits), ivall#1289 (pipeline stream bounds check), ivall#1290 (root signature MAX_ARGS cap), ivall#1291 (console UAV clears ivall#53/ivall#54), ivall#1294 (shadowed PENDING accuracy), ivall#1296 (16-bit compare low halves), ivall#1297 (fence_x pre-cell signal arming), ivall#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. |
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 test --workspace -- --test-threads=4on 0fd1b66: 744 passed, 0 failed, 41 ignored; no SKIPPED GPU tests (the WARP test ran)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
🤖 Generated with Claude Code