D3D12.X: retry uploads after lazy mip mapping failures #2470
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!2470
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2470"
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?
@razormontana on GitHub · 2026-11-25 19:39 UTC · original
razormontana:d3d12x/retry-lazy-mip-mapping→main· +71 −26 · 3 files · 1 commits · openPart of #1773. With
XCL_TEXTURE_LEVEL_PAGES=1, a sampled texture can lose a mip copy when its tiles fail to map. D3D12 drops writes to those unmapped tiles, but XCL has already cached the CPU bytes as uploaded. The next refresh that selects the texture can then skip those same bytes indefinitely.What is in it
vram.rsreports whether all requested lazy mip groups have backing pages and continues mapping the other groups after a failed bind.title_textures.rskeeps the backed mips in the upload batch and clears that texture’s unchanged-content hash if some requested pages are missing. The next refresh that selects the texture can retry without fresh source bytes.Tested
XCL_TEXTURE_SKIP_UNCHANGED=1,cargo test --offline --locked -p xcl --lib a_placed_texture_gets_the_pages_of_a_level_with_its_texels -- --nocapture --test-threads=1. With only the fixture and failure injection on2898511, 0 passed, 1 expected failure, 0 ignored, 0 skipped. The second attempt skipped the unchanged upload and mip 0 remained unmapped (1,441,792 bytes present instead of 5,636,096 bytes).d5f6daf79b1780f64d8683337bbd1e9303880b37: 1 passed, 0 failed, 0 ignored, 0 skipped. The second attempt mapped mip 0 and read back the expected texels without any change to the CPU source. The fixture also checked that the deliberately unbacked mip read zero and that the GPU-write path mapped all levels.cargo build --offline --locked --workspacesucceeded in debug and release. On the exact PR head,cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputreported 1,363 passed, 0 failed and 46 ignored. There were 26 runtimeSKIPPEDnotices for cases Cargo counted as passed.Regression run
Both 60-second release runs used the same retail title on the RTX 3070, the Series S profile, identical starting DXIL cache contents, and
XCL_DIRECT_DXIL=1plusXCL_TEXTURE_LEVEL_PAGES=1. The head showed 778 frames at 14,645 MB peak commit. Main showed 795 frames at 14,457 MB. Each completed with zero crashes and device removals.Main
PR head
Not tested
The retail smoke covers launcher stability and present counts. World entry was outside the verified coverage.
AI use
OpenAI Codex (GPT-6.2) reviewed the change and ran the exact-head workspace suite and paired retail smoke checks.
@emirduran707 on GitHub · 2026-11-25 20:09 UTC · original
Independent AMD RDNA4 (native wave64) test report on exact head
d5f6daf79b1780f64d8683337bbd1e9303880b37(clean detached checkout, no local changes).Tested
stable-x86_64-pc-windows-msvc), DXC 1.9.2602.17; tests debug, smoke release.cargo build --workspace && cargo test --workspace --no-fail-fast -- --test-threads=4: 1361 passed, 2 failed, 46 ignored; 8 SKIPPED (6 inlower_dxil::tests::{f16,f32}_programs_on_the_gpurefused by per-lane form;heap_window_out_of_memory_falls_back_to_the_switch_form;pso_measurement_compiles_an_exact_synthetic_record). All native wave64 GPU tests ran and passed.gpu::dxil::fuzz_tests::fuzz_validate_and_gpu_1seed 722 andfuzz_validate_and_gpu_3seed 1599) are pre-existing on unmodifiedmainon this GPU.Regression run (60 s retail-title smoke,
XCL_NETWORK=0, release)(Matched
main68a284abaseline on the same machine today: 1573 frames, 14420 MB peak, 0 device removals, 0 crashes.)Not tested
AI use
@DavidM1911 on GitHub · 2026-11-25 20:22 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!
@SlopTart on GitHub · 2026-11-25 20:52 UTC · original
gpu_suite (cold cache): 164 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.@thehollowedone on GitHub · 2026-11-25 22:04 UTC · original
Independent NVIDIA check of #2470 head
d5f6daf, on its original base2898511, from a clean checkout.Tested
XCL_TEXTURE_SKIP_UNCHANGED=1.cargo test --offline --locked -p xcl --lib a_placed_texture_gets_the_pages_of_a_level_with_its_texels --jobs 6 -- --test-threads=1 --nocapture: 1 passed, 0 failed, 0 ignored. The test injected a failed lazy-mip bind, checked that the unmapped mip stayed zero while other mips uploaded, then reselected the same source bytes and verified all mips through GPU readback.cargo build --offline --locked --workspace: passed.cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4: 1,363 passed, 0 failed, 46 ignored. The output contained 25 GPUSKIPPEDnotices for unsupported features; these are not GPU coverage.I read the diff and found no concrete blocker in the retry path. On a failed requested mip mapping,
map_levelsreturns false and the upload path clearsLAST_CONTENT; a later selection can retry unchanged bytes. Successfully mapped mips still upload.Not tested: actual VRAM exhaustion, an AMD GPU, native wave64/per-lane features skipped here, a retail title, or a rebased merge with current main. The fixture uses a controlled mapping failure, so it verifies the retry mechanism rather than real allocation pressure.
AI-assisted: Codex (GPT-6, exact variant unavailable) reviewed the change, ran the tests, and drafted this report.
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.