Repository navigation
Memory/configurable uma windows - #822
broccolize wants to merge 5 commits into
Conversation
…itch With more than one memory window every memory access of a translated shader was inlined once per window: a switch over the root UAVs mem, mem1.. Now window k is also a raw UAV at MEM_HEAP_BASE + k of the shared shader-visible heap, and an access is one ResourceDescriptorHeap load or store. - Options::heap_windows, and the HEAP_WINDOWS flag in the windows count, so that the translation and DXIL cache keys differ; on unless XCL_HEAP_WINDOWS=0 or the views could not be made (then the switch, as before). - console_heap: the first 4 descriptors of the shared heap are the windows' raw views, 2^30 - 1 dwords at most: a sparse window's last 64 KiB tile is reachable, only the window's last dword is not. - Lists bind the shared heap before an ABI dispatch or draw when they set none. - xcl shaders --precompile uses the same key. - Tests: gpu_memory_windows_from_the_heap (the windows test in the heap form), gpu_raw_window_view_reaches_its_top (the view on a 4 GiB reserved buffer); the runner and the fake draw list bind the heap. - The windows' views are made after the shared heap's lock is released: the device may be an adopted one whose UAV hook takes the heaps' lock, which other paths take first (found and fixed by anes66 in review; test window_views_do_not_hold_global_during_device_calls). From xcl-dev#187 by Remington Wilcox (c3fb89e, 864ce8e, 33c92dd), closed without being merged: carried onto current main without that PR's aperture experiments and compile-time bench. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com> Co-Authored-By: anes66 <37009523+anes66@users.noreply.github.com>
…d heaps Unbinding every heap left the list's record of bound heaps as it was, so ensure_view_heap saw a heap and did not bind the shared one: the next translated draw or dispatch read the memory windows (ResourceDescriptorHeap[0..3]) with no heap bound. Test: unbinding_all_heaps_lets_the_shared_heap_be_bound_again. From xcl-dev#187 by Remington Wilcox (8b4e398). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
…the switch form NVIDIA 616.92 (RTX 5070 Ti, reported in xcl-dev#156) refuses some big programs whose descriptor-heap index depends on the memory window with E_OUTOFMEMORY, and builds the same programs in the switch form. A translated compute, graphics, mesh or GS pipeline whose driver call fails that way with heap windows is now translated again in the switch form (other cache keys; same root signature and binds) and built from that before the stand-in or the error path. Test: heap_window_out_of_memory_falls_back_to_the_switch_form injects the refusals through the CreateComputePipelineState hook, then dispatches the rebuilt pipeline and checks every thread's output. From xcl-dev#187 by Remington Wilcox (41d4506). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
Keep the four-window runtime layout while making reservation bounds and coherent-window lookup follow the actual window list. Part of xcl-dev#697. Assisted-by: Codex (GPT-6)
Allow large title reservations to stay in UMA when the shared descriptor heap is available. Keep the four-window ABI and refuse switch-form retries for wider layouts. Part of xcl-dev#697. Assisted-by: Codex (GPT-6)
|
Does anyone know of a small Xbox Series title or demo that works in XCL and is available as an authorized unpacked download? I’d like to reproduce the smoke runs and do more testing locally. Would that title count for the PR’s regression check? |
|
Cross-check on RTX 3060 Ti 8 GB (driver 32.0.16.1742, Windows 11): this head currently cannot boot the retail title here in the default (heap-window) form — but the cause is in the base #680, not in this PR's own commits. Details and controls posted there: #680 (comment) Short version: AI use: GPT-6.2 Astra (API model selector) in DSH ran the builds/smokes and drafted this comment; the human contributor reviewed before posting. |
|
Regression runs for this PR's head main: this PR: Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine. |
|
Heads-up from a test rig: AI use: Hermes agent (local Qwen-class) ran the merge check and drafted this; I checked it before posting. |
|
A run report, and a regression to look at: with Build:
(Plus #956's diagnostics, which only log.) RTX 5080 (driver 617.42), Windows 11 26300, Rust 1.100.0 MSVC, release. Tests:
The run: The empty buffer views of #697 did not go away with 16 windows: the 24 GB 64 KiB-page reservation pair never goes to the windows (details on #697). AI use: Claude Code (Claude Opus 5.5) rebased the stack, ran the tests, read the log and wrote this comment. I ran the title. |
|
Thanks for testing this, @maximecmb. Could you share a link to the branch or patch from your local rebase? If you have time to rerun on the same PC and retail build, could you compare these two configurations using the same
Does the intro turn green or the loading screen turn black in either run? That would help isolate where the rendering regression starts. |
|
Verification on RTX 3060 Ti (Windows 11): merge conflict with current |
Stacked on #680.
Part of #697. Large title reservations can spill outside the four-window shader address range. This adds opt-in eight- and sixteen-window layouts through the shared descriptor heap.
What is in it
XCL_UMA_WINDOWS=8and16for the runtime and shader precompiler. Expanded layouts reserve address space below the title's 40-bit address limit.Tested
e9705bbon Windows 11 build 26300, Core i5-10300H, GeForce GTX 1650 driver32.0.16.1714, Rust 1.100.0 MSVC, and DXC 1.9.2609.5. Debug build.cargo build --locked --workspacepassed.cargo test --locked --workspace -- --test-threads=4 --show-outputwithXCL_ADAPTER=1650. Cargo reported 709 passed, 0 failed, and 41 ignored.SKIPPED.gpu_geometry_wave32_prefix_count_over_a_maskandgpu_wave32_program_in_wave64_hardwarerequire wave64.placed_title_textures_share_vram_and_preserve_pixelsrequires a reserved cube with mips.test_title_draws_with_a_root_signature_under_the_debug_layeranduploads_start_from_each_subresources_staterequire the D3D12 debug layer.cargo test --locked -p xcl --test e2e test_title_runs_and_game_folder_is_untouched -- --exact --show-outputpassed with both eight and sixteen windows. The GPU opened all configured windows, and the synthetic title completed both runs with zero failures.Regression run
Paired real-title smoke runs are pending for
mainand the final PR head.Not tested
AMD hardware, real-title rendering and memory impact, and the full suite on the eventual rebased head.
AI use
Codex investigated #697, implemented the two commits, wrote and ran the local tests.