Recompiler: an access may take its base address's window (XCL_WINDOW_NO_CARRY) #2486
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/2496"
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 S1m0ne1997 on 2026-11-25T20:35:37Z.
The direct DXIL translator selects the memory window of every access from its 64-bit address, with the offsets added and carried into the high dword (
window_at). Each access then gets its own window index, range check and heap handle, and accesses off the same base share none of them. XCL's allocations never straddle windows (gpu::uma), and with the switch the title's reservations do not either. So an access inside the allocation its base points into never carries or borrows: its window is its base's. WithXCL_WINDOW_NO_CARRY=1and heap windows (XCL_HEAP_WINDOWS=1) the window is taken from the base address, which makes the driver's code for big compute programs smaller. Root-UAV windows keep the carry: they have no bounds, so an access that leaves its allocation and wraps inside its base's window could hang the GPU (a window test did on an RTX 3090, below); heap views read 0 past the window's end. Off by default.Part of #2403: on NVIDIA the code of the pipelines in use is limited, and the retail title's world needs more than that.
What is in it
crates/xcl/src/gpu/dxil/lower_window.rs:no_carry()(XCL_WINDOW_NO_CARRY=1, orwith_no_carryfor a thread); with it and heap windows,window_atselects the window from the base's high dword.crates/xcl/src/gpu/dxil/kernel.rs:window_no_carry(); the translator thread takes its caller's setting.crates/xcl/src/gpu/recomp/pso.rs: the setting is part of the translation cache's identity, asXCL_DIRECT_COMPACTis, and of the direct translator's output identity (programs that go direct asenormouswithoutXCL_DIRECT_DXIL).crates/xcl/src/gpu/uma.rs: with the switch, a title reservation (sparse_reserve) of 4 GiB or less that would cross a window boundary starts at the next window, so nothing the title places in it spans two windows (pointed out by @Kalmarv below). A larger reservation cannot stay in one window and is logged. Where no window has room for a reservation in one piece, it is placed across a boundary as without the switch (and logged) rather than refused: a reservation the sparse windows refuse goes to plain memory (kernelx), which the switch must not make more frequent. Testa_reservation_crosses_a_boundary_when_no_window_has_room(fails without this). Testtitle_reservations_stay_in_one_window_without_the_carry.crates/xcl/src/gpu/recomp/tests.rs: the two carry tests pin the switch off (with_no_carry(false)).gpu_window_no_carry_reads_inside_allocations_alike. Accesses inside an allocation (global loads with positive and negative offsets, ans_loadwith an offset) read the same words with and without the switch, with the windows in root UAVs and in the descriptor heap, the DXIL is smaller with it with heap windows and unchanged with root UAVs. A 32-bit (hi == 0) pointer still reads window 0, and a base outside the UMA still reads 0.Tested
rustc 1.100.0, debug for the tests, release for the runs.cargo build --workspace, thencargo test --workspace -- --test-threads=4at the head: 1438 passed, 0 failed, 47 ignored. SKIPPED: the wave64 cases (no wave64 on this card),pso_measurement_compiles_an_exact_synthetic_record(no Developer Mode), the D3D12 debug layer tests (nod3d12SDKLayers.dll),heap_window_out_of_memory_falls_back_to_the_switch_form(no heap windows).XCL_DIRECT_DXIL=1 XCL_WINDOW_NO_CARRY=1, the whole suite again: 1438 passed, 0 failed, 47 ignored. The two existing tests that check the 64-bit sum on purpose (gpu_window_at_32bit_carry_edge_cases,memory_windows_reject_out_of_uma_aliasing) now pin the switch off for their translations, so they test the carry path whatever the environment; the new test covers the path without it.GetCachedBlob) of the retail title's compute programs, as the runtime translates them (direct DXIL, heap windows), 12 programs of each family:XCL_WINDOW_NO_CARRY=1CS_RaytracingResolveCS_IrradianceCache_ShadeCS_ShadowRenderTiledmain(0829441) with #2057 and the same change (direct DXIL, heap windows, warm caches): the world-load removal of #2403 came 72 s after the start of the world load, against 8–9 s in two runs without it. Bound at the removal: 1295 pipelines, against 1145–1172. It is still removed: this makes the limit come later, it does not avoid it.Regression run (the switch is off by default, so this run is the default path)
main:
PR:
PR with
XCL_WINDOW_NO_CARRY=1 XCL_HEAP_WINDOWS=1(the switch on; same head, same script):The switch-off peak commit (21,394 MB) is 124 % of
main's in this pair; with the switch off this PR's code paths aremain's, and the same arm read 16,474–18,374 MB in the runs of the earlier heads.Not tested
AI use
🤖 Generated with Claude Code
Imported from ivall/xcl. Originally posted by Kalmarv on 2026-11-25T21:00:46Z.
@S1m0ne1997 one point on the premise "Allocations never straddle windows (
gpu::uma)", from readingmain6d12f58a. XCL's own allocations hold to it. The title's own reservations may not:Uma::sparse_reserve(gpu/uma.rs:390) callstake_sparse_in(..., single_window: false)both times. Onlysingle_window: truekeeps a block inside one 4 GiB window (uma.rs:154), so a sparse reservation is first fit at 64 KiB grain and can cross a boundary.hle/kernelx.rs,VirtualAllocof 64 KiB pages lands at line 271, and graphics reservations without the top type bit at line 307. Titles reserve a range, then commit or map pages and place resources inside it, so a buffer the title places in such a range can span two windows.For an access whose base is in window k and whose final address is in k + 1,
window_atwith carry picks k + 1, while no-carry picks k. We have not seen such an access in the retail title. We only checked the allocator, so this is a possibility, not an observed failure. One way to keep the saving would besingle_window: truefor title reservations of 4 GiB or less, or a carry only where the base is in sparse title space. Either would need a run to see what it costs in address space.AI use: Claude Code (Claude Opus 5.5) read the allocator and the reservation paths on
mainand wrote this comment.Imported from ivall/xcl. Originally posted by SlopTart on 2026-11-25T21:00:54Z.
gpu_suite (cold cache): 165 passed / 3 failed, no crashes. The three are the known baseline on this lane (seed-1003 fuzz, mad/mac contraction, promoted-UAV-clear driver gap, PR #2490); none caused by this PR.Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-25T21:03:24Z.
Verification on RTX 3060 Ti (Windows 11), branch merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, ~26 ignored. (Intermittent single-test flake / 0xc0000005 abort under parallel scheduling — tracked in #1978; clean on single-threaded rerun.)Thanks!
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T21:08:43Z.
@SlopTart Thanks for the run on your machine.
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-25T21:08:41Z.
@Kalmarv Thanks, you're right. I checked
sparse_reserveand the twokernelx.rspaths: title reservations were first fit across window boundaries, so the premise held for XCL's own allocations only.The change now makes it hold for the title's too, the way you suggested: with
XCL_WINDOW_NO_CARRY=1, a title reservation of 4 GiB or less that would cross a boundary starts at the next window instead. Without the switch nothing changes. Test:title_reservations_stay_in_one_window_without_the_carry(with the switch the second reservation starts in the next window; without it, it crosses as before).The PR is now one commit,
78bba5c(the code is the same as the two commits it replaced). Results at it (RTX 4090, driver 621.40):cargo test --workspace -- --test-threads=4: 1425 passed, 0 failed, 46 ignored (on the same tree before the squash).scripts/smoke.ps1 -Seconds 60on the retail title, switch off (the default path): 1615 frames, 0 removals, 0 crashes. Block in the description.XCL_WINDOW_NO_CARRY=1: 1661 frames, 0 removals, 0 crashes, and no title reservation failed in the log.What these runs don't show: that run covers the start and the menus, not a session in the world. The log does not record each reservation, so I can't put a number on the address space the skipped window tails cost.
AI use: Claude Code (Claude Opus 5.5) checked the allocator, wrote the change and the test, ran the suite and the smoke runs, and drafted this reply.
Imported from ivall/xcl. Originally posted by Eterst on 2026-11-25T22:12:39Z.
A run on NVIDIA as asked on #2403, with one caveat: it has this PR and #2427 (
XCL_HEAP_FLAT=1) together, so the two are not separated.Setup: RTX 4070 SUPER 12 GB, driver 616.92, Windows 10 19045, release. A local test tree (#2057 and a few other open PRs on
main), before:main06055a7; after:main6d12f58+78bba5c(this PR) +d356a74(#2427). The retail title withXCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1, split programs off (XCL_DIRECT_SPLIT_INSTRUCTIONS=0), caches rebuilt by a full precompile (xcl shaders --precompile --only cs --pipelines, thenxcl pipelines) with the same switches as the run.Where the device is removed
0x887a0005at 261–303 s, always at the same point of the title (last frame before it 2,300–2,480); DRED page fault VA 0, no eventXCL_WINDOW_NO_CARRY=1 XCL_HEAP_FLAT=1Driver code of the compute programs the precompile rebuilt (
.psofiles, theGetCachedBlobbytes):The two rows are not the same set of programs (each counts what that precompile built anew), so read them as distributions, not as a per-program saving.
Not tested: this PR without #2427 and the other way round; more than one run; AMD / Intel; a bound-code counter in the title (the sizes above are of what was built, not of what was in use at once).
AI use: Claude Code (Claude Opus 5.5) merged the PRs into the test tree, ran the precompiles and the runs, and wrote this; posted with my OK.
Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-25T22:23:58Z.
By reading only, at
78bba5c:direct_output_identity(pso.rs:503) lacks the switch, andidentity()adds it only when the backend is not HLSL. WithXCL_DIRECT_DXILunset, compute programs over 8 MiB of HLSL still go direct (enormous), without the carry when the switch is set, and are stored underrerouted_identity. A later run without the switch loads that DXIL while its reservations cross windows again; the other way round, the switch does nothing for those programs. I have not seen a crossing access. #2257 fixed the same gap for the nesting tag.uma.rs:332describes one of 8 GiB + 4 MiB); that case is missing under Not tested.AI use: Claude Code (Claude Opus 5.5) found this; a second Claude Opus 5.5 re-derived it; Claude Fable 5.2 reviewed the text; checked by a person before posting.
Imported from ivall/xcl. Originally posted by Oliwettoo on 2026-11-25T22:28:04Z.
Review on
78bba5c(read from the diff, not run), following up @Kalmarv's point: the fix keeps title reservations of ≤ 4 GiB in one window, but one case of the "allocations never straddle windows" premise is still open.take_sparse_inlets a reservation larger than a window (size > WINDOW) cross a boundary even withsingle_window: true(uma.rs:154). A buffer the title places across that boundary inside such a reservation is within its allocation, yet withXCL_WINDOW_NO_CARRY=1its accesses wrap into the base's window and touch the wrong memory, with no warning.Since the switch is opt-in, a log line when a reservation over 4 GiB is made with
no_carryon (or a note in the README entry) would make such runs easy to spot.Imported from ivall/xcl. Originally posted by KDenKC on 2026-11-25T22:27:02Z.
@S1m0ne1997 the NVIDIA in-title A/B you asked for, RTX 5090.
XCL_WINDOW_NO_CARRY=1makes the driver code smaller (about −5 to −6 % of the code bound in the title, −10 % per split piece), but both arms lost the device at the same point in the title. One run per arm.Tested
main2898511+ #2404 (5ca9c23) + this PR (78bba5c, cherry-picked), plus a local diagnostic not in any PR:XCL_LOCAL_CODE_SUM=1callsGetCachedBlobon each PC pipeline at its first bind (the PC list'sSetPipelineStatehook) and logs the running sum.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_NETWORK=0, defaultXCL_PSO_WAIT_MS. Each started from its own copy of the same warm cache, ranxcl shaders --precompile --only cs --pipelineswith its switches, then the retail title for 600 s.XCL_WINDOW_NO_CARRY=1.chain.psoblob (driver code per split piece)0x887a0005nvlddmkm/ Display events at the removal.Not tested / caveats
GetCachedBlobcalls add CPU time at each first bind). An earlier run on the same cache lineage without the diagnostic or this PR was removed at 123.8 s, right at world start, so the run-to-run spread is large.SetPipelineStateslot in place, so its own calls go through the hook (checked in the code). Only pipelines set atCreateCommandList/Reset/ClearStateand never set again are missed.So on this card the saving is real but not enough to move the #2403 removal. With ~400 MB logged at the end, a 6 % cut buys tens of MB against a cliff the title crosses anyway at this scene.
AI use: Claude Code (Claude Opus 5.5) built and ran both arms and wrote this; Antigravity CLI (Gemini 4 Neon) analysed the logs and cache.
Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-25T23:25:01Z.
Test report for
78bba5cwith #2428ab2855f(#2427d356a74in it) onmaine1d84b7d(tree76fc443d): outputs and driver code size withXCL_WINDOW_NO_CARRY=1.Tested
--test-threads=4, NVIDIA 32-lane waves only. One run each.maine1d84b7d: 1422 / 1 / 46, 25. The failure on both is e2epresents.GetCachedBlobbytes, 60 compute programs (30 largest, 30 sampled, chosen first), unsplit, built at opt-level 3 without debug assertions; plain debug gives the same DXIL and root signatures (60/60, every arm).Not tested: outputs in release, split chains, GS, mesh, graphics; reservations over 4 GiB; code in use in a title; timing; other GPUs.
AI use: Claude Code. Claude Opus 5.5 wrote the test, ran it and wrote this; Claude Fable 5.2 rechecked it.
Imported from ivall/xcl. Originally posted by DavidM1911 on 2026-11-26T01:49:55Z.
Re-verification on RTX 3060 Ti (Windows 11), new head merged with current
main:cargo test -p xcl --lib: all passed, 0 failed, 27 ignored. The earlier merge conflict is resolved.Thanks!
— Devin
Imported from ivall/xcl. Originally posted by bielfreedom on 2026-11-26T01:55:12Z.
AMD Windows driver timing for #2496: on the RX 9070 XT,
XCL_WINDOW_NO_CARRY=1makes AMD'sCreateComputePipelineStateabout 13 % faster over 26 large retail compute programs, with 11 % less direct DXIL over all 2,689. Nothing failed in either arm. This measures cost only, not whether the window premise holds (the thread above).Setup
78bba5cmerged ontomain08db802, plus a local timing patch inxcl shadersthat writes each program's DXIL size and eachCreateComputePipelineStatetime to a file. One binary for both arms; only the switch differs.xcl shaders <retail shaders.rpf> --precompile --only cs --pipelineswithXCL_DIRECT_DXIL=1,XCL_PSO_DISK_CACHE=0, one driver thread, a fresh translation cache and a fresh executable name for every run (the AMD driver keys its own cache on the exe name, so every build is cold).DXIL size, all 2,689 compute programs (translation only)
XCL_WINDOW_NO_CARRY=1XCL_HEAP_WINDOWS=1)With the switch off the output matches
mainbyte for byte.Driver time, 26 large programs (switch windows), 2 interleaved rounds (off, on, then on, off)
XCL_WINDOW_NO_CARRY=1Mean 81.0 → 70.4 s (−13 %). Every one of the 20 unsplit programs in the set was faster with the switch, by 3–24 %. The largest ones:
620491641aa9bad66d1e4583f81297716fd9a5ebc95aee46d2d3c6c5d8463f50The pieces also change: with the switch, the six programs that are split produce 46 pieces instead of 56.
Not tested: heap windows in the driver, GPU output, and a title run.
AI use: Claude Code (Claude Opus 5.5) built the binaries, ran the measurements and wrote this report; I posted it.
Imported from ivall/xcl. Originally posted by CharlyRien on 2026-11-26T04:02:15Z.
Test report, RTX 3090 (616.56), one run per arm. With
XCL_WINDOW_NO_CARRY=1the title ran 187 s into the world, through the heavy scene where our earlier run without the switch lost the device, and the run ended on its time limit with no removal. The witness, same settings without the switch, lost the device (0x887a0005) earlier than that: at world + 44 s. The code we count as bound was lower with the switch: 406 MB at most, against 420 MB at the witness's removal. Two more things measured:In the title, same settings, only the switch differs
XCL_WINDOW_NO_CARRY=10x887a0005at 164.4 s, world + 44 s, in busy world rendering (1,100-2,400 draws per 2 s)GetCachedBlobsize of each pipeline XCL built for a stand-in, from its first bind to its release.0x887a00050.2 s into the heavy scene, world + 158 s, at 437.1 MB with compute 273.6 MB;CreatePlacedResourceX).Window tests in our tree (
cargo test --release -p xcl --lib -- window, 42 tests)gpu_window_no_carry_reads_inside_allocations_alike(it runs both arms itself, root and heap windows) andtitle_reservations_stay_in_one_window_without_the_carry.XCL_DIRECT_DXIL=1 XCL_WINDOW_NO_CARRY=1for the whole process, all tests at once: 12 failed. 10 of them failed with "GPU fence still pending after 10000 ms", then0x887a0006: one test hung the GPU and the others followed, the HLSL arms included.--exact --test-threads=1): 37 passed, 5 failed. All 5 pass with the switch unset, run the same way. Each one crosses a window on purpose:window_at_lowers_to_32bit_carry_without_int64raw_loads_in_root_windows_respect_exec_and_boundsglobal_load_dwordx2gpu_heap_windows_reject_out_of_uma_aliasing(w0 + 0xFFFF_FFF0) + 0x20: it readsw0 + 0x10gpu_memory_windows_reject_out_of_uma_aliasinggpu_window_at_32bit_carry_edge_casesw0 + 0 - 16; the edge-case test does a store at(w0 + 0x30) - 0x30 - 16.0xFFFF_FFF0. The test arena backs 1 MB per window and a root UAV has no bounds, so we take it to be a page fault.Setup
RTX 3090 24 GB, driver 616.56, Windows 11 22631, release build; the tests in release too.
Tree:
maine1d84b7d, merged into our integrated tree:XCL_LOCAL_PSO_BUDGET_MB=380): it releases idle pipelines and rebuilds them on demand; our own command-list segments drop their pipeline references when the title's recording ends;Witness: that tree at
2a9f3638.Switch arm:
734e12f7= #2496 cherry-picked at78bba5ca, plus178052a3.direct_output_identity(@pvfreis's point);178052a3: a log of placed title buffers that cross a window boundary.Env, both arms:
XCL_HEAP_WINDOWS=1 XCL_NETWORK=0 XCL_ACTIVITY=1 XCL_LOCAL_SKIP_CS_KB=4096 XCL_RUN_SECONDS=330 XCL_UMA_SHADOW=1 XCL_GPU_WAIT_TIMEOUT_MS=250 XCL_LOCAL_NO_WATCHDOG=1 XCL_LOCAL_RTSUM=1 XCL_LOCAL_RTSUM_AFTER_S=100 XCL_LOCAL_RTSUM_PCT=1 XCL_FRAME_DUMP=100000 XCL_LOCAL_FRAME_DUMP_AFTER_S=9999 XCL_LOCAL_FRAME_DUMP_WAIT_MS=20000 XCL_LOCAL_RTSUM_DUMP_MAX=12 XCL_LOCAL_RODATA_GETPC_ONLY=1 XCL_LOCAL_OOW_COPY=0 XCL_GPU_VIEW_BUFFERS=1 XCL_LOCAL_GPU_VIEW_ROOT_KB=512 XCL_LOCAL_TEX_OVERLAP=1 XCL_DIRECT_DXIL=1 XCL_DIRECT_SPLIT_INSTRUCTIONS=0 XCL_LOCAL_CODE_IN_USE=1 XCL_LOCAL_PSO_BUDGET_MB=380 XCL_LOCAL_ASIDE_EAGER=1 XCL_LOCAL_MEM_CENSUS=1 XCL_HUGE_PSO_CONCURRENCY=4 XCL_LOCAL_FAST_SAFE_READ=1 XCL_PAGE_BUDGET_MB=1024 XCL_GPU_VIEW_MB=1024XCL_WINDOW_NO_CARRY=1.XCL_LOCAL_NO_WATCHDOG=1keeps the title's stall watchdog from aborting.XCL_PAGE_BUDGET_MB=2048 XCL_GPU_VIEW_MB=1536and frame dumps from world + 20 s.Caches:
xcl shaders --precompile --only cs --pipelines, then--only ms);Not measured
AI use: Claude Code with Claude Opus 5.5, as the coordinating session and as its agents. The agents ported the PR, resolved the conflicts, wrote the diagnostic and the test and run jobs, read the logs and drafted this report. The coordinating session ran the builds, the tests and the runs, and checked the numbers quoted here.
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-26T06:37:51Z.
Updated to
ae56502(rebased ontomainb49be18, still one commit). What changed, from the review points above:direct_output_identitytoo, so theenormousprograms that go direct withoutXCL_DIRECT_DXILare kept apart as well.Tests at
ae56502(RTX 4090, driver 621.40):cargo test --workspace -- --test-threads=4: 1437 passed, 0 failed, 47 ignored.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WINDOW_NO_CARRY=1(--no-fail-fast): 1436 passed, 1 failed, 47 ignored. The failure isgpu_heap_windows_reject_out_of_uma_aliasing, on the case it builds on purpose (an address that crosses into another window). No GPU hang.main1318 frames; this PR 1662 frames with the switch off and 1531 with it on; 0 removals and 0 crashes in all three. Blocks in the description.Results so far, from the reports above:
AI use: Claude Code (Claude Opus 5.5) made the changes, ran the suite and the smoke runs, and drafted this.
Imported from ivall/xcl. Originally posted by S1m0ne1997 on 2026-11-26T06:44:16Z.
Follow-up to the summary above:
2e8ff6bmakes the two existing carry tests pin the switch off for their own translations, so they always test the 64-bit sum. With the switch set for the whole process (XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_WINDOW_NO_CARRY=1), the suite is now 1437 passed, 0 failed, 47 ignored, the same as without it. Smoke blocks for2e8ff6bare in the description.Imported from ivall/xcl. Originally posted by bielfreedom on 2026-11-26T17:22:37Z.
AMD Windows rerun for #2496 at
2e8ff6b: on the RX 9070 XT, with the root-UAV windows now keeping the carry, the switch no longer changes anything with the default switch windows. With heap windows it still cuts AMD'sCreateComputePipelineStatetime by about 15 % over 26 large retail compute programs. No failures in any arm. This replaces my earlier numbers, which were from78bba5c.Setup: as in my comment above, with this PR at
2e8ff6bmerged ontomainb49be18. One binary for both arms; onlyXCL_WINDOW_NO_CARRYdiffers.DXIL, all 2,689 compute programs (translation only)
XCL_WINDOW_NO_CARRY=1XCL_HEAP_WINDOWS=1)With the switch off, both forms match
mainbyte for byte.Driver, 26 large programs, 2 interleaved rounds (off, on, then on, off)
With heap windows the mean is 96.1 → 82.0 s (−15 %); the six split programs make 43 pieces instead of 46. The switch-window arms differ by 2 %, which is noise for identical DXIL.
This machine is busier today than when I measured
78bba5c, so compare within a row pair, not across reports.AI use: Claude Code (Claude Opus 5.5) built the binary, ran the measurements and wrote this; I posted it.
Imported from ivall/xcl. Originally posted by Decodere on 2026-11-26T20:09:02Z.
Independent RTX 4060 (8 GB) / Windows 11 release verification of PR #2496 updated head
816406772fcc319fac5f535e1753c966a0146d8b(exact parent & merge-baseb49be1836844fe0b0cdb3211dce3cb7fb4e21ac7). Measurements, targeted GPU/unit tests, and paired default +XCL_WINDOW_NO_CARRY=160 s smokes only; not a full source review.Setup
7956 MiBreported by D3D12), driver32.0.16.2114(NVIDIA621.14, WDDM 3.2)31.9 GiBusable), Windows 11 Home26200rustc 1.100.0 (0ef1bc386 2026-11-09), DXC1.9.2609.5, release builds, quiet machine (zero concurrent builds/tests during timed runs; notegpu/dxil/*edits give81640677a freshXCL_DIRECT_DXIL_SOURCE_IDnamespace)title: 29640639viascripts/smoke.ps1 -Seconds 60(XCL_NETWORK=0, default flags andXCL_WINDOW_NO_CARRY=1, no input)Targeted RTX 4060 release unit & GPU tests (
81640677)cargo test --release -p xcl --lib gpu_window_no_carry_reads_inside_allocations_alike -- --nocapture: 1 passed, 0 failed, 0 ignored (0.26 s, executed on RTX 4060,0SKIPPED).cargo test --release -p xcl --lib memory_windows_reject_out_of_uma_aliasing -- --nocapture: 1 passed, 0 failed, 0 ignored (0.23 s, executed on RTX 4060,0SKIPPED).cargo test --release -p xcl --lib a_reservation_crosses_a_boundary_when_no_window_has_room -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s,0SKIPPED).cargo test --release -p xcl --lib title_reservations_stay_in_one_window_without_the_carry -- --nocapture: 1 passed, 0 failed, 0 ignored (0.00 s,0SKIPPED).cargo test --release -p xcl --lib gpu::uma::(3 consecutive parallel passes): 14 passed, 0 failed, 0 ignored on all 3 passes (0.01 s/0.01 s/0.01 s,0SKIPPED).cargo test --release -p xcl --lib gpu::dxil::: 184 passed, 0 failed, 3 ignored (3.32 s;1SKIPPED:gpu::dxil::kernel::dispatch_chain_native_wave64_builds_wholeskippedno wave64on NVIDIA wave32 RTX 4060).Paired 60 s RTX 4060 smokes (
b49be183vs81640677default andXCL_WINDOW_NO_CARRY=1)All three runs completed cleanly at steady 60/2 s pacing with
0device removals and0crashes (81640677default vsXCL_WINDOW_NO_CARRY=1xcl.log:6,174/6,114 MBvs6,176/6,115 MBpeak/end local VRAM,4,651vs4,650 MBend non-local VRAM,19,630vs19,570translated draws /1,024dispatches with0skipped,4096sparse submits in294 msvs254 ms).Exact parent (
b49be183):PR #2496 head (
81640677, default flags):PR #2496 head (
81640677, withXCL_WINDOW_NO_CARRY=1):Limits of coverage
81640677(only the 4 targeted tests individually, 3 parallel passes ofgpu::uma::, all184passing tests ingpu::dxil::, release build, and paired 60 s smokes);dispatch_chain_native_wave64_builds_wholeskippedno wave64on wave32 NVIDIA hardware.XCL_WINDOW_NO_CARRY=1runs passed the 60 s no-input menu/intro smoke cleanly; visual inspection of extended interactive in-world gameplay underXCL_WINDOW_NO_CARRY=1was not performed on this host.RTX 4060) on native Windows 11; no AMD, Intel, or Wine/Linux run on this host.AI use
Ran the targeted release GPU/unit tests, release build, and paired default +
XCL_WINDOW_NO_CARRY=1quiet 60 s smoke runs with assistance from Google Antigravity (Gemini 4 Neon); all test counts, timings, memory figures, and smoke blocks were extracted directly fromcargo test,xcl.log, andscripts/smoke.ps1outputs.Imported from ivall/xcl. Originally posted by pvfreis on 2026-11-26T21:23:33Z.
Follow-up, by reading only at
81640677: both points addressed.direct_output_identitynow addsxcl-window-no-carrywhen the switch is set (pso.rs:517-519), so theenormousprograms that go direct withoutXCL_DIRECT_DXILare kept apart too, and the reservations over 4 GiB are listed under Not tested.AI use: Claude Code (Claude Opus 5.5) checked the new head and wrote this; Claude Fable 5.2 rechecked it against the code and the thread; checked by a person before posting.
Imported from ivall/xcl. Originally posted by ClosetPie107 on 2026-11-27T18:00:44Z.
Tested on AMD / Linux:
81640677(RX 9070 16 GB, RDNA4, Mesa 26.3.1 RADV; Ryzen 5 9600X, 32 GB; CachyOS; Proton Experimentalexperimental-11.0-20261112with vkd3d-proton masterec207194plus a local patch dropping thelpVtblchecks of command allocators and lists; DXC 1.9.2609.5; Rust 1.96.0,x86_64-pc-windows-gnudebug build, tests run under Wine)The head as it is (base
b49be183), withmainf9a0cb80the same session as the baseline.Tests (
XCL_REQUIRE_GPU=wave64)cargo test -p xcl --lib -- gpu_window_no_carry_reads_inside_allocations_alike --test-threads=1: 1 passed, 0 failed, 0 ignored.cargo test -p xcl --lib -- gpu::uma:: --test-threads=1: 14 passed, 0 failed, 0 ignored (includesa_reservation_crosses_a_boundary_when_no_window_has_roomandtitle_reservations_stay_in_one_window_without_the_carry).cargo test --workspace --no-fail-fast -- --test-threads=4with--skip compositor_blends_ui_plane_over_scene_plane --skip failed_restore_stops_before_importing_an_unbacked_window --skip grooming_leaves_a_window_under_1_gib_only_its_hole(the first loses the RADV device here, the other two run out of memory under Wine): the lib binary ended partway with a device removal (0x887a0005), which happens intermittently onmainhere too (1 of its 3 four-thread runs). Lib again with--test-threads=1and the same skips: 1303 passed, 8 failed, 27 ignored;mainf9a0cb80lib the same session: 1323 passed, 9 failed, 27 ignored (--test-threads=1and two--test-threads=4runs). All failures are amongmain's. The other binaries fail the same 3 tests as onmainhere (e2e,pls_quota,predication_e2e).d3d12_resource_and_syncended the process, as it does onmainhere.Not tested
XCL_WINDOW_NO_CARRYAI use
Imported from ivall/xcl. Originally posted by Foniass on 2026-12-01T08:11:52Z.
Triage (#1607) – head
8164067Nothing on main or in an open PR adds
XCL_WINDOW_NO_CARRY. Other PRs for #2403 shrink driver code in other ways: #2427 and #1380 drop the window branch or switch, #2428 uses flat heap windows on NVIDIA, and #2469, #2526, #2590 and #2641 touch scratch, eviction, the profile and helpers. They can all be combined with this one; none makes the same change. The switch is off by default, applies only to heap windows (lower_window), and is part of the pipeline identity;Uma::sparse_reservekeeps a reservation inside one window when it can. No problems found in the diff.Recommendation: keep open.
AI review: Claude Code (Claude Opus 5.5), diffs read only, not built or run; not checked by a human.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.