gpu: physical-page transient RT aliasing, lazy depth-UAV twins, and idle RT reclamation #1147
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!1147
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1147"
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?
@mikael-jarvinen on GitHub · 2026-11-28 14:15 UTC · original
mikael-jarvinen:pr-rt-physical-aliasing→main· +824 −40 · 5 files · 2 commits · closed without mergingSummary
Reduces non-texture VRAM consumption on 8–12 GB GPUs by ~509 MB (
−355 MBfrom transient render-target aliasing +~154 MBfrom lazy depth-UAV twins and unmapped/idle RT reclamation) with 0 GPU faults and 0 D3D12 errors.What Changed
crates/victory-gpu/src/alias_rt.rs,inplace.rs,resource.rs,host.rs):XMemMapPhysicalPagesphysical sections (inplace::aliased_section_pages).heap_tier >= 2), creates them viaCreateReservedResourceand maps their 64 KiB tiles synchronously onto lazily allocated 16 MiBD3D12_HEAP_FLAG_NONEchunks viaUpdateTileMappings(plus a small private overflow tile pool for minor pitch padding), mirroring the title's physical-page aliasing on the host GPU.D3D12_RESOURCE_BARRIER_TYPE_ALIASINGbarriers inHostList::transitionandHostList::preludewhen switching between aliased resources sharing physical backing.VICTORY_ALIAS_TARGETS(default ON; setVICTORY_ALIAS_TARGETS=0to disable and fall back to committed resources).crates/victory-gpu/src/resource.rs,host.rs):twin_textureallocation for depth textures withALLOW_UNORDERED_ACCESSuntil the texture is actually bound as a UAV (resource::ensure_twin), avoiding unused color-twin allocations on plain depth draws.crates/victory-gpu/src/resource.rs):let_go_idle(every 5 s), and accountsalias_rt::allocated_bytes()intargets_room_kept().Verification
cargo clippy -p victory-gpu --all-targets --locked(0 warnings in touched files)cargo clippy -p victory-gpu --all-targets --all-features --locked(0 warnings in touched files)cargo test -p victory-gpu --lib --locked: 454 passed, 0 failed (36 ignored), includingalias_rt::tests::coalesce_runs_merges_contiguous_tile_rangescargo xtask policy: 295 files okcargo build --release -p victory: 0 warningsA/B Benchmark (
origin/main63b902fvs this PR)Hardware: NVIDIA RTX 3080 10 GB, Windows 11, 1440p DLSS Performance, identical 115 s scripted startup + world run (
VICTORY_WARMUP_RESTART=0,VICTORY_POOL_STATS=1).origin/main(63b902f)6ba7fa8)731 MBvirtual →376 MBphysical)8,336 − 3,648)8,083 − 3,904)held back for room(total)@rahmondg45 on GitHub · 2026-11-28 14:17 UTC · original
good work
6ba7fa820cto724e51feb7@mikael-jarvinen on GitHub · 2026-11-28 21:45 UTC · original
Rebased cleanly onto
main(923e38c, head724e51f; 1/1alias_rt+ 29/29resource::testspass, 0 new warnings) and re-measured on RTX 3080 10 GB + Ryzen 7 7800X3D (diagbuild, warm shader cache, 1440p DLSS Performance, FG off, 115 s scripted run):main(923e38c)724e51f)Kept for render targets@mikael-jarvinen on GitHub · 2026-11-29 08:17 UTC · original
Note: this PR was merged into
mainind6e0670(so this PR can be closed). Opened follow-up #2042 to fix the missing intra-list aliasing barrier on first aliased RT write and makeVICTORY_ALIAS_TARGETSopt-in until DCC/DiscardResourcetracking is added.@trustno1-coder on GitHub · 2026-11-29 08:28 UTC · original
Thank you! An earlier version of this pull request was merged into main with its original commits and is part of v2026.11.29.01, where you are credited. GitHub does not show it as merged because new commits were pushed here after that merge. It stays open so those newer commits can be looked at next.
@mikael-jarvinen on GitHub · 2026-11-29 08:42 UTC · original
Thanks for merging the earlier commits into v2026.11.29.01! The only remaining commit on this branch (
96fb6722) was half-superseded bymain'salias_tracker.record_touch, and its other half (makingVICTORY_ALIAS_TARGETSopt-in=1untilDiscardResource/DCC clearing is verified) is cleanly rebased onto latestmainin #2042. Closing this PR to keep things tidy.@AlexeyYuditsky on GitHub · 2026-11-29 12:21 UTC · original
Because of this PR, ripples started appearing when enabling frame gen 2x and higher.

Pull request closed