Memory/configurable uma windows #816
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/822"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Imported from ivall/xcl. Originally posted by broccolize on 2026-11-24T06:05:08Z.
Superseded on upstream
mainEight- and sixteen-window runtime support landed in #1998. Current
mainalso supplies the configured UMA window count to shader precompilation and honors--windows. I built cleanmainat9dfbe3eand verified five shader CLI cases covering the default, eight and sixteen windows, the heap-off fallback, and the explicit override. The earlier green-intro report is linked in the discussion for the separate rendering follow-up. Upstream precompiler · Green-intro reportOriginally stacked on #680, which has since merged.
Part of #697. Large title reservations can spill outside the four-window shader address range. This PR’s current head adds opt-in eight- and sixteen-window layouts through the shared descriptor heap. Expanded runtime support later landed in #1998. The remaining shader precompiler change is staged at
79ecb54onmain8b957be. All nine shader CLI tests passed on that revision. The staged patch needs its own 60-second smoke pair using those exact commits. Green-intro retest requestWhat 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
Anon64 ran the same retail title on clean release builds for 60 seconds each on an RTX 3060 using the default window settings. Both runs finished with zero crashes and zero device removals. Original report
Upstream
mainCurrent PR head
Not tested
AMD hardware and retail rendering at expanded window counts on this exact head. The paired run above used the default window settings. Testing of the staged precompiler change uses its own smoke pair.
AI use
Codex investigated #697, implemented the two commits, wrote and ran the local tests.
Imported from ivall/xcl. Originally posted by broccolize on 2026-11-24T06:22:26Z.
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?
Imported from ivall/xcl. Originally posted by ryosen0 on 2026-11-24T06:36:37Z.
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: https://github.com/ivall/xcl/pull/680#issuecomment-7124104236
Short version:
e9705bbdefault andXCL_UMA_WINDOWS=8both end at t≈2.5 s with the device suspended before the first draw (first sparseCreateHeaprefused 0x887a0005, then 0x887a0001 / title breakpoint); the base2c1a521alone does the same;XCL_HEAP_WINDOWS=0on this same head boots clean (2442 frames, 60 presents / 2 s, peak commit 14473 MB). Once #680's NVIDIA boot issue is resolved this stack should be re-measured — the eight-window layout itself was not reached on this machine.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.
Imported from ivall/xcl. Originally posted by Anon64 on 2026-11-24T07:17:51Z.
Regression runs for this PR's head
e9705bband for its basemain64b3f35, on a retail title (same title, 60 s each), made withscripts/smoke.ps1(release, clean tree at each commit) and pasted unedited, for Regression run.main:
this PR:
Tested
Not tested
Report written with Claude Code (Claude Opus 5.5) from runs on this machine.
Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-24T07:17:56Z.
Heads-up from a test rig:
e9705bbdoes not merge onto current main (beaa245) - content conflict incrates/xcl/src/gpu/recomp/emit.rs. Needs a rebase before it can run in any lane. Once rebased I'll gladly test it on RDNA3 / Wine (my Linux rows: #42 / #718).AI use: Hermes agent (local Qwen-class) ran the merge check and drafted this; I checked it before posting.
Imported from ivall/xcl. Originally posted by maximecmb on 2026-11-24T10:20:57Z.
A run report, and a regression to look at: with
XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16, the retail title's intro video shows green.Build:
main6efdabc+ #680's three current commits (341b209,a0c6676,95f34c1) + this PR's70209d1ande9705bb, rebased locally. There were two conflicts:emit.rs: I keptmain'sxcl_w = select(hi == 0, 0, hi - xcl_uma_base)from #792 instead of& mask.shaders.rs: I took this PR's window-count block, with #680's opt-in comment.(Plus #956's diagnostics, which only log.) RTX 5080 (driver 617.42), Windows 11 26300, Rust 1.100.0 MSVC, release.
Tests:
cargo test -p xcl --lib -- --test-threads=4with default settings: 694 passed, 1 failed. The failure isexpanded_heap_window_shaders_use_the_full_window_index, which asserts the textxcl_w < {windows}u, while #680's current accessors emitxcl_w >= {windows}u→ 0.gpu_memory_windows_beyond_the_root_uavs(window 15 reads, writes and atomics) passes.XCL_HEAP_WINDOWS=1 XCL_UMA_WINDOWS=16for the whole process, these also fail:gpu_sparse_vram_descriptors_buffers_and_xmem("runtime layout has 4 shader windows", 16 ≠ 4) andgpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes(its reserve-only allocation now lands inside the windows, the effect this PR wants), plus the three tests on its poisoned lock. All of them look like tests written for the 4-window layout, not faults.The run:
UMA: 15 sparse VRAM window(s) (60 GiB VA) + 4095 MB coherent window at 0x1000000000. The title boots, but the intro video is a full green screen, and the loading screen after it is black (its audio plays). Onmainboth show normally on this machine. Green is what thekernelx::mirrorscomment describes for the Bink planes when the GPU view isn't linked to the CPU view ("its colour of zero luma and chroma"). I haven't bisected whether #680's heap windows or this PR's layout causes it.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.
Imported from ivall/xcl. Originally posted by broccolize on 2026-11-24T10:56:37Z.
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
maincommit and diagnostics?XCL_HEAP_WINDOWS=1.XCL_HEAP_WINDOWS=1andXCL_UMA_WINDOWS=16.Does the intro turn green or the loading screen turn black in either run? That would help isolate where the rendering regression starts.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T10:48:26Z.
Verification on RTX 3060 Ti (Windows 11): merge conflict with current
main— needs a rebase before it can be tested.Imported from ivall/xcl. Originally posted by broccolize on 2026-11-26T05:16:13Z.
Thanks for testing this, @maximecmb. Expanded UMA windows landed in #1998. Could you check whether the green intro still reproduces on current main with XCL_HEAP_WINDOWS=1, comparing 4 and 16 windows? I also staged the remaining shader precompiler fix on broccolize/xcl at 9f17a84. If you can run a 60-second smoke pair on clean
b49be18and 9f17a84 with the same retail title and settings, please share both unedited xcl-smoke blocks. Thanks!Imported from ivall/xcl. Originally posted by broccolize on 2026-11-26T22:15:59Z.
Quick update, @maximecmb. The precompiler candidate was rebased onto current main. Please use upstream main at
8b957beand broccolize/xcl at 79ecb54 for the 60-second smoke pair, with the same retail title and settings. The separate 4-vs-16-window green-intro check on main still stands. Thanks!Pull request closed