Repository navigation
D3D12.X: share staging for zero-filled lazy texture mips (#1773) - #2573
razormontana wants to merge 1 commit into
Conversation
A lazy upload batch can use one zero-filled source span for multiple zero mips. Keep every copy and preserve its pitch and transitions. The synthetic eight-texture case moves from 16 MiB to 4 MiB of staging capacity. RTX 3070 readback confirms mapped zero mips clear and their nonzero neighbors keep their texels. Assisted-by: Codex (GPT-6.2 Sol)
|
Verification on RTX 3060 Ti (Windows 11), branch merged with current
Thanks! — Devin |
|
Test run on exact head Tested
Regression run (60 s, default settings, a retail title) main: this PR: No crash or device removal; frames 104 % of Not tested
AI use
|
|
Independent Windows/NVIDIA check of the current clean head Tested
Not tested: a paired retail-title smoke on this machine, AMD/native wave64, retail staging allocation savings, VRAM use, or world-load time. The synthetic planner's size assertions are not a measured retail performance result. AI use: Codex (GPT-6.2 Sol) reviewed the tests, ran the commands, and drafted this report; GPT-6.2 Astra reviewed the staging and queue-lifetime reasoning. |
|
Wine/NVIDIA cross-check: planner test passes; the GPU fixture cannot run under stock vkd3d-proton on this host. Head
So on this host: staging-planner logic verified; zero-mip GPU readback unverified pending a vkd3d-proton build that tolerates replaced vtables (the #175 proposal, or the relaxed-vtable two-hunk build described in #2140). No title run; no staging-byte savings measured at retail. Logs: |
|
Follow-up: the placed-texture GPU fixture now runs and passes on a relaxed diagnostic stack. My earlier comment reported the GPU leg aborting pre-body on stock vkd3d-proton's fence-vtable assertion ( Rebuilt the same exact provenance commit our stock DLL came from ( That completes this machine's verification of the PR: staging planner 1/1 (stock stack) and the placed-texture zero-mip GPU fixture 1/1 (relaxed diagnostic stack) — both consistent with the author's Windows RTX 3070 result. The fixture exercises the shared zero-span clearing of a previously mapped top mip and a packed mip with nonzero neighbours preserved, on the real adapter. No retail staging savings measured. Log: |
Part of #1773 and #1833. Lazy texture uploads can contain several all-zero mips. The title-texture uploader now uses one zero-filled staging span for their sources, reducing the staging request while still copying every mip.
What is in it
title_textures.rspasses the existing lazy-level zero detection into the CPU uploader.texture.rsshares one aligned span when at least two zero sources are present, retaining the driver's footprint dimensions and each copy and transition. The reused staging span is cleared through the final row of every depth slice.Tested
cargo test --offline --locked --workspace --no-fail-fast -- --test-threads=4 --show-outputon1bfa05dreported 1424 passes, 0 failures, and 46 ignored. There were 26 explicit runner skips within the pass count.cargo build --offline --locked --release -p xclsucceeded.scripts/smoke.ps1ran the same title offline for 60 seconds per arm with direct DXIL and matching cache seeds.Regression run
Main
PR head
Not tested
AI use
Yes, Codex GPT-6.2 Sol implemented and independently reviewed the patch, ran the tests, and prepared this description.