D3D12.X: XCL_TEXTURE_LEVEL_PAGES=1 gives a sampled texture's levels their pages with their texels #2306
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
goal:world-load
good first issue
help wanted
invalid
keep-open
off-goal
question
stale
test-only
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/xcl-dev--xcl!2306
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/2306/head"
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?
@imnicho on GitHub · 2026-11-25 13:22 UTC · original
imnicho:texture-level-pages→main· +405 −12 · 2 files · 1 commits · merged 2026-11-25 16:29 UTCWith
XCL_TEXTURE_LEVEL_PAGES=1(off by default) a sampled texture's levels get their video memory pages when an upload first has texels for them, not all at once when the title places the texture. Part of #1773 (point 2 there, the sampled textures' half of the "target pages").A retail title places its streamed textures at full size and has memory behind their levels only as it loads them, the small ones first.
vram::place_pagesgives a sampled texture a 64 KiB page of video memory for every tile at once, so most of those pages hold nothing: when that title's world is set up, 80 690 pages lie under such textures and 6 809 of them (8 %) are committed, on my card. @shortside measured the same on a Mac and has a branch for native hosts, where each texture is a reserved resource of its own (#1773); this is the idea for the shared-pages path Windows uses, which that comment left open. Measurements and the plan: #1773.What is in it
crates/xcl/src/hle/d3d12x/vram.rs: with the switch on,place_pagesplaces a sampled 2D texture of one slice with no tile mapped.Levelskeeps its tiling (GetResourceTiling) as groups of tiles: one for each level with tiles of its own, one for the packed levels.map_levelsgives a group its pages - the same pages by address as before (bind_range, whatbinddoes for a range of the tiles;maptakes the subresource the range starts at), so textures placed at one address still share them. A texture unmapped as a whole (unmap_superseded) starts again with no level mapped. A tiling that does not add up to the resource's tiles, arrays, volumes, multisampled and GPU-owned textures are placed as before.crates/xcl/src/hle/d3d12x/title_textures.rs: before an upload's copies, the levels of the texture that have texels (a byte that is not zero in what goes up) get their pages; the upload queue waits for the mapping (vram::before_execute, already called there). A level of zeros keeps none: it reads as zeros either way, and its copy goes to tiles that are not mapped, which drops it (tiled resources tier 2, the tier the shared pages already need). A texture the GPU writes (note_gpu_write:CopyTextureRegion,CopyResource, the resolves) gets all its pages at that call, and so does one of those when it is uncovered again.the_tiles_of_a_texture_are_grouped_by_its_levels(the grouping; tilings that do not add up), anda_placed_texture_gets_the_pages_of_a_level_with_its_texelson the GPU: a 1024x1024 texture of 11 levels whose memory has every level but the largest - no page before the first upload, then pages for those levels only (counted against the driver's tiling), their texels right, zeros read from the level without pages; with memory under the largest level a texture placed there again gets that level's pages, the others shared, and holds all of it; a texture the GPU writes gets the pages of all its levels.Tested
stable-x86_64-pc-windows-msvc; debug for the tests, release for the title.cargo build --workspace && cargo test --workspace -- --test-threads=4on3ea5edc: 1252 passed, 0 failed, 46 ignored. SKIPPED (27 notices): the wave64 cases ofgpu::recomp::lower::tests(4 tests) andgpu::recomp::lower_dxil::tests(14 cases), 3 per-lane cases the per-lane form refuses,gpu_wave32_program_in_wave64_hardwareandgpu_geometry_wave32_prefix_count_over_a_mask(no wave64),heap_window_out_of_memory_falls_back_to_the_switch_form(its switch is off),pso_measurement_compiles_an_exact_synthetic_record(Windows Developer Mode is off),uploads_start_from_each_subresources_stateandtest_title_draws_with_a_root_signature_under_the_debug_layer(no D3D12 debug layer on this PC).XCL_TEXTURE_LEVEL_PAGES=1 XCL_ACTIVITY=1, default settings otherwise): one run of 150 s through its menus and first loading screens, 1 958 frames shown, no device removal, no crash, no failed upload; the logo and the loading artwork are right in the frame captures. By 93 s 17 591 placed textures standing for 2 422 MB had pages for 940 MB (the linemap_levelslogs).XCL_NETWORK=0, scripted pad; the same for the run above), on a local tree that is not this head: #2057 at4df1e6e+mainat0f13d2a+ #2067, #684, #266, #1515, #495, #1405, #751, #2092, #1803, #1887, #541, #2050 and the samevram.rschange. There the uploads are #2057's, which send parts of a texture: the hook is in its plan of an upload, a level counts as there when memory is committed behind it, and a level that gets its pages goes up whole.XCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_UMA_SHADOW=1, Series X profile, two pairs of runs of 300 s, alternating:target pages) at the end0x887a0006136 s after the set-up0x887a000558 s after it0x887a0006160 s after itReports by others on this head (
3ea5edc, in the comments below)gpu_tests as on that machine'smainwith the switch off and on.Regression run (default settings: the switch is off)
main:
PR (this PR's head commit):
A second round of the same two binaries:
main1134 frames, PR 1323.Not tested
AI use
🤖 Generated with Claude Code
@thehollowedone on GitHub · 2026-11-25 13:41 UTC · original
Independent Windows check of 3ea5edc. Windows 11 build 26300, Ryzen 7 9800X3D, RTX 3080 Ti / 621.35, Rust 1.99.1 MSVC, DXC 1.8.2502.11.
cargo build --offline --locked --workspace -j 6passed.cargo test --offline --locked --workspace -j 6 --no-fail-fast -- --test-threads=4 --nocapturefinished with 1,252 passed, 0 failed, 46 ignored. The pass count includes 25 runtime skips. The two new tests also passed in isolation with zero skips.Synthetic fixtures only. Retail world-load timing and visual output were outside these runs.
AI-assisted. Codex (GPT-6, exact variant unavailable) added the temporary test instrumentation, ran the tests, and drafted this report.
@SlopTart on GitHub · 2026-11-25 13:55 UTC · original
Linux/RADV (RDNA3) verification over Wine: green with the switch on and off, one single-shot flake to note.
Tested:
origin/main379725ae+ PR head3ea5edc1(merge4fc3b501, no conflicts). Linux (Arch, kernel 7.2.15), Mesa 26.2.5 RADV, Radeon RX 7900 XT (NAVI31), cargo targetx86_64-pc-windows-gnurun under wine-11.0 (Proton), rustc 1.94.0, official MS DXC (binaries 2026-09-29).gpu_suite =cargo test --release --locked --target x86_64-pc-windows-gnu -p xcl --lib -- gpu_.--test-threads=2: 142 passed / 3 failed / 1 ignored. The 3 are this rig's known baseline (fuzz seed 1003 of #2115,gpu_nonfused_mad_and_mac_prevent_fma_contraction,gpu_depth_buffer_created_for_unordered_access_is_placed). Both tests the PR adds pass.XCL_TEXTURE_LEVEL_PAGES=1, run 1,--test-threads=2: 141 / 4: one extra,gpu_geometry_wave32_prefix_count_over_a_mask.--test-threads=2: 142 / 3, the extra one gone.--test-threads=1: 142 / 3.--exact --test-threads=1with the flag set: green 3 of 3.So on this rig the change is clean: no deterministic failure with the switch on. The one
gpu_geometry_wave32_prefix_count_over_a_maskred appears once in three full-suite runs at--test-threads=2with the flag on and never again; on a rig where geometry/wave tests are a known flake family, I would not read that as caused by this change, but the count is reported so the record is complete.Not tested: Windows hosts; the streamed-texture retail measurements in the PR body (no title data run here, counts only).
AI use: Hermes agent (local Qwen-class) ran both machines and drafted this; I checked it before posting.
@nnonno91 on GitHub · 2026-11-25 14:20 UTC · original
Independent native Windows Radeon iGPU check of
3ea5edc1c941be6350d66b45e1e5c91f72158c18.Tested
cargo test --locked -p xcl --lib the_tiles_of_a_texture_are_grouped_by_its_levels -- --nocapture --test-threads=1gave 1 passed, 0 failed on the unchanged head.cargo test --locked -p xcl --lib a_placed_texture_gets_the_pages_of_a_level_with_its_texels -- --nocapture --test-threads=1gave 1 passed, 0 failed per run, withXCL_TEXTURE_LEVEL_PAGES=1and0in separate processes. The fixture explicitly enables lazy pages internally, so both runs exercise that path.Not tested
A forced eager-page GPU control, retail gameplay, memory savings in a title, and the full workspace suite.
AI use
OpenAI Codex (GPT-6.2 Sol) adapted the adapter selection for the test, ran the checks and wrote this report.
@luckyteagirl on GitHub · 2026-11-25 14:44 UTC · original
Independent RX 6800M check of exact PR head
3ea5edc1c941be6350d66b45e1e5c91f72158c18found a reproducible GPU-fixture failure when the discrete adapter is selected.Environment: Windows 11 build 26200; Ryzen 9 5980HX; discrete AMD Radeon RX 6800M driver
30.0.13002.13003alongside integrated Radeon graphics; Rust 1.99.0 MSVC; DXC/DXIL 1.9.2609.5. Isolated debug Cargo target.cargo build --locked --workspace --release -j 2passed on the clean head.Unchanged-head tests:
the_tiles_of_a_texture_are_grouped_by_its_levelspassed 1/0/0.a_placed_texture_gets_the_pages_of_a_level_with_its_texelsalso reported 1/0/0 with no skip, but its checked-in fixture usesEnumAdapters1(0)and does not identify that adapter. I cannot attribute this pass to the RX 6800M even thoughXCL_ADAPTER=6800Mwas set.Selected-RX diagnostic: I changed only the GPU test's adapter setup locally to use
gpu::adapter::Selector::from_env_or("auto")andcandidates, then printed the selected name. The fixture printedAMD Radeon RX 6800Mand failed 0 passed, 1 failed, twice at the unchanged assertionlevel 0 once all of it is there. A further test-only diagnostic produced the same failure. Before that assertion, the test had passed its checks for the expected page count, mips 1–10 after the first upload, and zeros for unmapped mip 0. After the full texture is placed again, mip 0 readback is 4,194,304 bytes as expected, but the first mismatch is consistently at byte 3,072, where the GPU readback is zero and the synthetic expected texels are nonzero. One diagnostic run counted 302,336 mismatching bytes. This suggests missing texels in part of mip 0 on this adapter; I have not isolated whether the cause is XCL mapping, the fixture, or the AMD driver.I removed the test-only selector and diagnostic edits; the worktree is clean at the exact PR head. A guarded 20-second owned-title baseline run stopped for low available commit memory before producing a smoke result. I did not run a title comparison with this switch on, and I am not claiming title impact or a performance change.
AI use: OpenAI Codex (GPT-6; exact variant unavailable in this session) ran the native Windows tests, made and restored the test-only diagnostics, checked the release build, and drafted this report. No game data was uploaded.
@imnicho on GitHub · 2026-11-25 14:48 UTC · original
@luckyteagirl thank you, that is the kind of result this needs before anyone merges it. I cannot reproduce it here (RTX 5080: the fixture passes), so what I can add is how I read it and one run that would tell the cases apart.
What the failing step is. By then the fixture has passed the page counts, levels 1 – 10 and the zeros of the unmapped level 0. The second texture is placed at the same address, its upload maps level 0's tiles (64 of them with 128x128 tiles) on the pages' queue, the upload queue waits for that fence, and then all levels are copied. A zero from byte 3 072 of row 0 on is the start of the seventh 128-pixel column, so whole tiles of level 0 read as not mapped or not written, rather than a wrong texel here and there.
The same fixture on other AMD drivers. @nnonno91's Radeon iGPU (driver 32.0.21042.62) and @SlopTart's RX 7900 XT on RADV pass it; the RX 6800M here is on 30.0.13002.13003. So it may be that driver, but nothing above shows that.
One run that would separate the change from the driver, if you have the time, with the same adapter selection you used:
placed_title_textures_share_vram_and_preserve_pixels. It is onmainalready and does not use this switch: its last part uploads mip chains to textures on the same shared pages, with every tile mapped when the texture is placed. If that fails on the RX 6800M too, the pages' mapping or the copies into reserved textures misbehave there without this PR. If it passes, the difference is what this PR adds: tiles mapped a level at a time, right before the upload that fills them.What I will do with the answer: if that test fails as well, I note the adapter in this PR's "Not tested" and the switch stays off by default as it is; if only this PR's fixture fails, the switch is not safe on that driver and I either find the cause or make it refuse to turn on there, before this can go in. Until then, please read this PR as not verified on RDNA2 with that driver.
On the fixture taking adapter 0: yes, it copies that from the test next to it. Using
gpu::adapter::Selectoras you did is right; I would rather do that for both tests in a small PR of its own than push here now, since a push would drop the reports on this head.@minimalhipster990 thank you for the numbers on the clean head: 8 828 → 4 342 MiB of target pages at the same artwork is the same halving I see on the local tree in the world (9.2 – 9.5 GB → 4.8 – 4.9 GB).
AI use: Claude Code with Claude Fable 5.2 wrote this.
@ClosetPie107 on GitHub · 2026-11-25 14:50 UTC · original
Independent AMD RDNA4 / Linux (RADV, native wave64) test report for head
3ea5edc1c941be6350d66b45e1e5c91f72158c18(merged locally ontomain06c9f55).Hardware & environment
experimental-11.0-20261112),vkd3d-protonmasterec207194(3.2.0) +dxil-spirv694cc674+ two-hunk relaxed-vtable patch (-Db_ndebug=true), DXVKv3.1.1-209, DXC1.9.2609.5, Rustx86_64-pc-windows-gnu(debug for tests, release for retail)Unit / GPU tests (
XCL_REQUIRE_GPU=wave64,VKD3D_CONFIG=ignore_shared_fence)hle::d3d12x::vram: 16 passed, 0 failed, 1 ignored (0 skipped;the_tiles_of_a_texture_are_grouped_by_its_levelspassed, peak VRAM 1,727 MiB)hle::d3d12x::title_textures: 19 passed, 0 failed, 0 ignored (0 skipped; GPU testa_placed_texture_gets_the_pages_of_a_level_with_its_texelsran on RADV and passed, peak VRAM 1,366 MiB)Retail title (1.0.2.1) A/B on RADV
Same warm PSO/vkd3d cache and flags (
XCL_DIRECT_DXIL=1,XCL_PSO_WAIT_MS=50,XCL_SPLIT_MIDLIST_WAIT=0,XCL_COHERENT_MB=1024,VKD3D_CONFIG=ignore_shared_fence,XCL_PSO_PRELOAD=0,XCL_NETWORK=0), capped atMemoryMax=18G:#2306#2306(XCL_TEXTURE_LEVEL_PAGES=1)15,029/16,296/16,297 MiB10,469/11,564/11,650 MiB(−4.6 GiB)MemAvailable)387 MiB(RAM guard at 166 s, ~10 GiB GTT spill)12,014 MiB(0 GTT spill, 0 swap)level pagesat 47.9 s16,859textures (2,061 MBvirtual →941 MBmapped)37,377(36skipped) /131,072(68skipped) at 155 s49,111(20skipped) /114,950(64skipped) at 105.9 s0x80000003atgame_scarlett_master.exe+0x4da6315at 111 s (0 device removals, 0 upload errors)Not tested
AI use
@luckyteagirl on GitHub · 2026-11-25 15:10 UTC · original
@imnicho I ran the requested parent control on the AMD Radeon RX 6800M, driver
30.0.13002.13003, against PR #2306's exact parent1a0bbe3a2ba91ea8f5b6fc29130a053868d3c9e6.The checked-in
placed_title_textures_share_vram_and_preserve_pixelsinitially reported a harness pass but printedSKIPPED ... this adapter makes no reserved cube with mips; its early cube gate prevents any shared-page assertions on this driver. I then made a local test-only overlay to select and printXCL_ADAPTER=6800M, removed that early cube gate, omitted the cubemap shape that this driver cannot reserve, and added the PR fixture's exact 1024×1024 RGBA8, 11-mip shape to the existing 2D mip-chain cases. Production code stayed at the unchanged parent.The expanded parent fixture passed 1 passed, 0 failed, 0 ignored, with no
SKIPPEDline, in 3.33 s. Its shared-page aliasing/overlap checks and all 2D mip-chain GPU readbacks, including the added 1024×1024 RGBA8 shape, completed. An intermediate diagnostic with the cube still in the shape list reached the 2D readbacks but then failed at the fixture'splace_texassertion for a second non-reserved cubemap; removing that unsupported case let the 2D control complete.Compared with the PR-head selected-RX fixture's reproducible mip-0 failure at byte 3,072, this narrows the problem to the difference between eager whole-texture mapping/upload and this PR's level-at-a-time sequence on this adapter. It does not yet identify whether the mapping call, timing/barrier, fixture, or driver causes that difference. I removed every local test edit and verified both parent and PR worktrees clean. No title data was used.
AI use: OpenAI Codex (GPT-6; exact variant unavailable in this session) made and restored the test-only overlay, ran the native Windows control, and drafted this follow-up.
@Royalflamejlh on GitHub · 2026-11-25 15:20 UTC · original
Linux (Wine + vkd3d-proton) + NVIDIA, the title, 3 runs with
XCL_TEXTURE_LEVEL_PAGES=1and 3 without: once 4.2 GB had been read through DirectStorage (4.2–4.4 GB, at 58–71 s),target pageswas 8,653–8,756 MB without the switch and 4,274–4,354 MB with it, and non-local video memory 8,117–8,255 MB against 4,145 MB, the level all six runs had by 45 s. No run faulted; the warnings were of the same kinds both ways. With the switch set, one existing test fails.Setup:
main06c9f55+ #684e56dbc3+ #23063ea5edc, merged locally (913fcf8), one release build, the runs alternating. RTX 4070 12 GB (615.71.09), Fedora 44, Wine 11.21 Staging, vkd3d-proton v3.1-90-g30b0eb9b with the relaxed-vtable patch from #175 and a local dxil-spirv patch. Series X profile, 120 s, the first-run screens completed once and no story progress, A pressed once at 16.3–18.3 s,XCL_ACTIVITY=1,XCL_PSO_PRELOAD=0,WINEDEBUG=err+all,fixme-all.=1(3 runs)level pages:at 16,384 levels given pages (logged at powers of two; no later line came)#101WARNlines#101came earlier in all three runs (52.6–72.1 s against 73.0–83.3 s), and they had read more by 60 s (4.0–4.6 GB against 3.3–4.0 GB). 3 runs of each cannot show that this is the switch's doing.vramandtitle_texturestests under Wine: 35 passed, 1 ignored with the switch unset; with it, 33 passed, 2 failed, 1 ignored, the two new tests passing both ways.placed_title_textures_share_vram_and_preserve_pixelsfails attitle_textures.rs:2114(left: 0, right: 16777216): it counts the pages of placed textures before any upload, andvram::level_pagesreads the variable, so the test does depend on the switch, and the RX 6800M control above holds only with the variable unset.d32s8_targets_take_their_own_size_of_video_memoryfailed only on the lock the first one poisoned, and passed alone.Not tested: the rest of the suite; the title past 120 s or in its world; whether textures look right; Windows; AMD and Intel.
AI use: Claude Code (Claude Opus 5.5) ran the title and the tests and wrote this comment.
Posted without review by a person: the account owner was away and reads replies later.
@minimalhipster990 on GitHub · 2026-11-25 14:22 UTC · original · edited 2026-11-25 15:40 UTC
RTX 4090, clean PR head
3ea5edc1c941be6350d66b45e1e5c91f72158c18. WithXCL_TEXTURE_LEVEL_PAGES=1, target pages fell by 50.8% at the same loading artwork. Neither run reached a visible gameplay HUD or recognizable 3D world within 300 s.The matched images were frames 1247 at 86.623 s (off) and 1223 at 86.963 s (on). Memory comes from the nearest XCL activity samples at 86.054 and 86.037 s. Their artwork looks consistent in both readbacks. With the switch on, XCL explicitly logged 17,299 textures representing 2,135 MiB with 940 MiB backed at 65.389 s.
End of run. Both reached the configured cutoff with exit code 0, a null crash field and no logged D3D12 device removal. After the last interval with any presents, the logs recorded 52 large compute PSO builds finishing with the switch off, and 63 compute plus 2 graphics builds with it on. Pipeline builds were still progressing near cutoff. The logs do not identify which build, if any, held up the presenter.
Setup. RTX 4090 24 GB, NVIDIA 621.40, Ryzen 7 5800X3D, 32 GB RAM, Windows 11 build 26300. Retail 1.0.2.1, Series X. Built once with
cargo build --locked --release -p xcl --bin xcl, Rust 1.99.1 MSVC. Ranxcl run <title>withXCL_DIRECT_DXIL=1 XCL_HEAP_WINDOWS=1 XCL_ACTIVITY=1 XCL_NETWORK=0 XCL_FRAME_DUMP=12 XCL_RUN_SECONDS=300. Identical scripted input and separate, identical starting copies of an already configured title profile and a 6,432-file XCL cache from earlier #2057 runs. Some large pipeline builds still lacked driver blobs on this head. Default ran first. NVIDIA’s internal cache was uncontrolled. An initial setup-only attempt with a blank profile was excluded from the pair.Not tested: post-HUD stability, texture correctness in the rendered world, or behavior after 300 s. One run per setting. AI use: OpenAI Codex (GPT-6) built the PR, ran the pair, inspected the frame captures and logs, and drafted this report.
Follow-up on the 63 compute pipelines. On the same
3ea5edcbuild and RTX 4090, I reran the title withXCL_TEXTURE_LEVEL_PAGES=1in both runs. Precompiling all 63 compute pipelines identified above moved their last runtime driver completion to 10.248 s. The title still stopped presenting during loading. The frame captures showed loading artwork and fades. Neither run showed a gameplay HUD or recognizable world geometry.Both runs started from identical copies of the XCL cache, title profile and 1,069-key used-pipeline list. Only the second copy went through
xcl shaders <pack> --precompile --only cs --pipelines --used-only --split 1 --windows 4. The pass reported 723 pipelines made, zero errors or refusals, and produced 715 new distinct driver-cache files, including the 62 distinct files used by all 63 tracked records. Each configuration ran once, control first. NVIDIA’s internal cache was uncontrolled.In the precompiled run, the two late compute records (
33fefb7c44c5d469and9eb0518ab8808787) were outside the input list. Both finished by 139.965 s. Another 147 graphics pipeline builds finished after the last active interval, the last at 295.493 s. In all five thread samples from 115 to 285 s, the same worker was inbind::execute_indirect → pso_async::resolve_wait. The thread that had called PresentX had the same title return address (+0x56a0d) in each sample. The samples do not identify the pipeline key the worker awaited. Both runs exited with code 0 at the configured cutoff, with no logged device removal.AI assistance for this follow-up: OpenAI Codex ran the comparison, matched the cache files to the runtime trace, inspected the captures and thread samples, and drafted the update.
Which pipelines did ExecuteIndirect wait for? One 300 s diagnostic run on
3ea5edcwith local logging, the same RTX 4090 and the same compute-only cache preparation. The last active presentation interval ended at 100.051 s (1,275 PresentX calls total). The captures still showed loading artwork. The run exited with code 0 and no logged device removal.Between 100.051 and 300 s, one title worker spent 197.66 s waiting on 51 distinct graphics shader-set keys at ExecuteIndirect. All 51 were in the 1,069-key input list. Fifty waits resolved. Their corresponding driver calls all started without a blob and overlapped 56.05 s of the wait time. At 155 and 285 s the matching build threads were waiting for DXC results. The longest completed wait was 7.667 s for key
d32baf54e8764425(pixel record526ed1b2012b0772, 1.963 s in the driver). The final key,ca5c6bb91e008c1f, was still pending at cutoff. These timings locate the waits on that worker. The presenting thread’s dependency on it remains unverified. AI assistance: OpenAI Codex (GPT-6) added the local trace, ran it and correlated the logs and thread samples.Warm graphics-cache replay, 300 s. I repeated the diagnostic run with the same binary, fresh copy of the same title profile and identical inputs, using a verified copy of the preceding run’s full XCL cache. The 1,069-key list was unchanged. Across the same 50 completed graphics waits, total time in the instrumented ExecuteIndirect binds fell from 194.509 s to 0.387 s. Driver calls went from 56.029 s to 0.250 s combined, with blobs supplied to 48/50 on replay. The previously unfinished key
ca5c6bb91e008c1fthen resolved at 102.445 s.That thread went on to wait for 21 further graphics keys whose builds had not started in the reference run. Twenty completed. The last,
62298dad417480a1, was outside the input list and still pending at 300 s. The last active presentation interval ended at 94.074 s (1,180 PresentX calls total). Captures showed loading artwork and fades, with no gameplay HUD or recognizable world geometry. Exit code 0, no logged device removal. One run per cache state, NVIDIA’s internal cache uncontrolled. OpenAI Codex (GPT-6) ran and analyzed this replay.What was the presenter waiting for? In a 300 s replay on the same RTX 4090 and
3ea5edc, with local synchronization logging and the preceding warm test’s starting cache, the PresentX thread waited indefinitely on a Windows semaphore (0x1018). Its last observed release was at 99.490 s. The presenter returned successfully at that time, entered another wait on the same handle at 100.798 s, and remained there for the last 199.202 s. The thread that issued the release was itself waiting for work from 99.604 s onward.The coordinator completed 81 event waits and stopped on the 82nd (
0x1a3c, auto-reset). We matched that event and the same job descriptor and payload in the pending queue and on worker 4. During the presenter’s final wait, this worker completed 64 graphics pipeline waits in ExecuteIndirect and entered a 65th. Neither a completion signal on the coordinator’s event nor another release of the presenter’s semaphore was logged by cutoff. This ties the graphics work to the coordinator’s wait. Whether completing that job would release the presenter remains open.1,347 PresentX calls, last active interval ending at 100.062 s, loading artwork, exit 0. An earlier attempt ended with an access violation at 85.110 s coinciding with a scheduled full thread dump. The completed replay used the same diagnostic binary with scheduled full dumps disabled. AI assistance: OpenAI Codex (GPT-6) ran the replay and correlated the synchronization trace and worker samples.
@luckyteagirl on GitHub · 2026-11-25 15:52 UTC · original
@imnicho I narrowed the RX 6800M failure on unchanged PR head
3ea5edc1c941be6350d66b45e1e5c91f72158c18with two local test-only controls. This is the same Windows 11 / RX 6800M driver30.0.13002.13003setup as my earlier reports; the fixture selected and printed that adapter.map_levels_with_texels's requested and newly mapped levels, without changing its behavior. The first partial upload requested/mapped[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. The full texture's upload requested/mapped[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. The test still failed 0/1 atlevel 0 once all of it is there. Thus mip 0 is included in the normal mapping decision.vram::map_levels(&full, None)immediately afterlet full = place_tex(at), beforerefresh(queue.as_raw()). It returned[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]. The unchanged page-count and readback assertions then passed 1/0/0 twice, with no skip.The difference is when the second texture's levels are mapped relative to refresh and upload preparation. This result does not establish whether it is a driver ordering issue, a missing synchronization step, or another side effect of that timing. All temporary edits were restored and the PR worktree is clean. No title data was used.
AI use: OpenAI Codex (GPT-6) made and restored the diagnostic edits, ran the GPU controls, and prepared this follow-up.
@luckyteagirl on GitHub · 2026-11-25 16:10 UTC · original
@imnicho Four RX 6800M controls on exact head
3ea5edc1c941be6350d66b45e1e5c91f72158c18refine my earlier pre-map result. All changes were local diagnostics on the same Windows 11 / driver30.0.13002.13003setup, with the discrete adapter selected; I restored the worktree afterward.upload_all, aftervram::before_execute(&queue)I madetexture::wait(dev, &queue)finish the queued mapping wait on the CPU beforetexture::upload_batchrecords copies. The fixture still failed 0/1 atlevel 0 once all of it is there. So finishing that wait at this point did not repair the late-map path.fullimmediately afterplace_tex, as in the passing control, but disabledsparse::before_executeonly for the second refresh. The fixture still passed 1/0/0, with no skip. Its pass does not require the sparse page-sync call to fill the texture.upload_all: I removed theplace_texpre-map and instead mapped all levels of the second texture immediately beforesubresources_of_all(CPU detiling), leaving the latermap_levels_with_texelscall intact. It returned[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]; the fixture passed 1/0/0 twice, no skip.map_levels_with_texelsmaps mip 0 and before the upload batch. The fixture passed 1/0/0 twice, no skip. The sleep is a diagnostic, not a viable runtime fix.Together with the normal path's logged request/mapping of all eleven levels followed by a failed mip-0 readback, these controls point to timing after the mapping call on this driver: moving it ahead of CPU detiling or waiting 100 ms afterward both change the result, while finishing the mapping queue's GPU fence did not. They do not establish which driver or XCL operation needs that elapsed time. The early-map controls map all levels for diagnosis and are not a proposed memory-saving implementation. No title data was used.
AI use: OpenAI Codex (GPT-6) ran and restored the test-only controls and prepared this report.
@ivall on GitHub · 2026-11-25 16:29 UTC · original
Merged into
main(65fc114), off by default as you have it; no conflicts withmain.main), 46 ignored.XCL_TEXTURE_LEVEL_PAGES=1): video memory 14.8 GB to 6.0 GB, the target pages 11.9 GB to 3.4 GB, process commit 23.5 GB to 15.4 GB. Later the texture list reached "53 525 textures standing for 22 068 MB have pages for 2 695 MB".AI use: Claude Code (Claude Opus 5.5) ran the tests and wrote this on the maintainer's behalf.
@pane33 on GitHub · 2026-11-25 17:05 UTC · original
I ran an off/on comparison with a newer retail game on upstream
50a9fdef81. Both runs used the same release binary on Windows 11, a Ryzen 5 7600X, 16 GB RAM, and an RTX 4060 8 GB (driver 32.0.16.2124), with the default HLSL route and XCL_ACTIVITY=1. Each run started from a separate copy of the same Series X profile with cold XCL caches and a 120 s cap. The driver cache was uncontrolled.At about 44 s, both runs had logged 22,859 DirectStorage requests and approximately 1,262 MiB of I/O, with zero failed requests at that point.
<html>This was one run per setting. The checkpoint was matched by I/O progress, and visual parity was unverified. The cause of the DirectStorage failures remains open.
AI use: Codex (GPT-6.2-Sol) analyzed the existing logs and drafted this comment.
@DavidM1911 on GitHub · 2026-11-25 17:41 UTC · original
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!
@shortside on GitHub · 2026-11-25 17:51 UTC · original
Mac test report for head
3ea5edcas pushed (its base ismain1a0bbe3). Short version: on D3DMetal the switch has nothing to act on, and the change breaks nothing here.Tested
x86_64-pc-windows-msvc(release) with clang-cl / lld-link.hle::d3d12x::vram::andhle::d3d12x::title_textures::, one per process:churn_update_tile_mappings_timing).the_tiles_of_a_texture_are_grouped_by_its_levels: passed.a_placed_texture_gets_the_pages_of_a_level_with_its_texels: skipped itself ("this adapter's texture was not placed with lazy levels"). Expected on this host:place_pagesgives nothing on D3DMetal, so no texture is placed that way.gpu_mirror_upload_follows_cpu_writes_and_later_mapping_changes(panic, then no exit),placed_title_textures_share_vram_and_preserve_pixels(failed),d32s8_targets_take_their_own_size_of_video_memory(crash),reservable_agrees_with_the_driver(failed). The same four do the same onmain1a0bbe3on this host, at the same asserts (line numbers shifted by the lines this PR adds), so none is from this change.scripts/smoke.ps1, once without and once withXCL_TEXTURE_LEVEL_PAGES=1: both end at 60 s with exit 0x0, no crash, no device removal.Not tested
mainthe title submits no GPU work on this host in 60 s (0 presents, 0 submits, 0 draws in the log), so the two title runs do not reach the changed code, and the PR's GPU test skips itself here. The memory effect is not something this machine can show for this path.AI use: Claude Code with Claude Fable 5.2 built the head, ran the tests and the two runs on my machine and wrote this report.