Repository navigation
D3D12.X: retry uploads after lazy mip mapping failures - #2470
razormontana wants to merge 1 commit into
Conversation
An upload to unmapped tiles drops the copies, so the source hash must not suppress a later upload of the same bytes. Map other requested levels and keep their copies in the current batch. Part of xcl-dev#1773 Assisted-by: Codex (GPT-6.2 Sol)
|
Independent AMD RDNA4 (native wave64) test report on exact head Tested
Regression run (60 s retail-title smoke, (Matched Not tested
AI use
|
Port upstream PR #2470 (by razormontana, commit d5f6daf) cleanly onto amd-dev with #1514 follow_key and indexed Table::pending_res. An upload to unmapped tiles drops the copies, so the source hash in LAST_CONTENT must not suppress a later upload of the same bytes. Map other requested levels and keep their copies in the current batch, returning whether every requested level received pages. Part of #1773. Assisted-by: Antigravity (Gemini 4 Neon High)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! |
Port per-page content hashing (#2484 by ChAlanA) onto the indexed dirty_and_pending + parallel hash_and_detile_all upload pipeline: - Track per-page hashes (PageHashes) in LAST_CONTENT and propagate overlapping dirty pages from refresh_once into Upload. - For previously uploaded textures with known dirty pages, upload_all checks changed_pages_since_last_upload first (reading and hashing only those deduplicated clamped 4 KiB pages outside LAST_CONTENT) and skips unchanged textures without reading or detiling the full resource. - For first/pending uploads, hash_and_detile_all populates PageHashes directly from the single already-read title_bytes buffer, preserving #2470 lazy-mip retry and #2460 invalidations plus invalidating LAST_CONTENT in recheck_gpu_view_sources. Includes all 5 per-page dirty/unaligned/remap/dedup unit tests. Assisted-by: Antigravity (Gemini 4 Neon High)
bmjask
left a comment
There was a problem hiding this comment.
No concrete defect found. map_levels preserves successful groups, reports incomplete mapping, and clears LAST_CONTENT so a later selected refresh retries; current Windows CI and smoke evidence are green. Nonblocking limitation: mapping failure itself does not make the texture pending, so retry occurs only if a later dirty/pending refresh selects it. The test manually marks pending; please test/document the real selection trigger, especially that static textures do not retry merely because capacity later frees.
|
|
|
Independent NVIDIA check of #2470 head Tested
I read the diff and found no concrete blocker in the retry path. On a failed requested mip mapping, 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. |
… GPU writeback (port upstream xcl-dev#2470 + xcl-dev#2558 + xcl-dev#2678) (cherry picked from commit f78556f9601c01eac0e05e43532047658d085701)
Part 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.