descriptor: place title view slots past a capped (NVIDIA) host heap through a table #638
No reviewers
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!638
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-638"
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?
@chemist6913 on GitHub · 2026-11-28 02:19 UTC · original
chemist6913:fix/nvidia-view-heap-remap→main· +245 −13 · 5 files · 1 commits · openSummary
On NVIDIA, the host's shader-visible view heap is capped at 1,000,000 descriptors. An RTX 5090 on driver 621.40 refuses 1,000,001 and every larger size. The retail game's view heap has 1,245,184 slots.
HostHeap::newtherefore kept title slots 0..737,855 one to one and left the rest out. Slots 737,855..999,998 hold the dynamic tables and slot 999,999 is the null slot. Every shader-computed (bindless) view index past 737,855 read the null slot, or one of the host's own dynamic slots. Tables were fine, because draws copy those into dynamic slots. The code already said "a title that reaches them needs remapping". This PR adds that remap. Details are in #545.How the game uses its heap: it keeps 400,000–570,000 views past slot 65,536 at once, spread over the whole heap, and turns over about 130,000 a second. Because the views are spread out, a fold (slot mod N) can't keep them apart.
Change
Host side (
descriptor/host.rs,Places). On a host whose view heap is capped atPORTABLE_VIEWS, withVICTORY_VIEW_REMAPnot0:countis now the title's full count, and dynamic slotkis indexcount + k, as on uncapped (AMD) hosts.unmake,make_null, and buffer views left null to wait for a draw). Places are reused oldest-first. If the pool is ever empty, the write goes to a sink place that no index reads, and a warning is logged once.cpu(index)maps through this;cpu_at(place)is the raw handle (used byfill_null);gpu_handlemaps too.SLOT_STRIDES_COUNT + iholds the place of view indexi, and is written when a place is given or given back.Translator side (
emit/shader.rs). Withset_view_remap(true):SLOT_STRIDES_COUNT - 1;heap_handle_atclamps the index as before, then reads its place from that dword, throughSLOT_STRIDESif the shader binds it, elseSLOT_TABLE_STRIDES, so the heap buffer sweep isn't started by this.The remap flag is part of the shader cache key (
mod.rs) and ofhost_settings(bit 31 of the limit).victory translate --warmtakesVICTORY_VIEW_REMAP=1alongsideVICTORY_VIEW_LIMIT=2097151, to warm for such a host.Hosts that take bigger heaps (AMD) are unchanged:
view_remap()stays false.Testing
On RTX 5090, Series X profile, 1440p, opening cutscene through the diner, about 15 runs of 90–110 s.
cargo check -p victory --features diagnostics: clean.cargo test -p victory-gpu: 441 passed, 2 failed.cargo test -p victory-shader: 287 passed, 3 failed.mainhere:indirect::tests::host_list_budget_starts_empty_at_each_submission,indirect::tests::warp_batch_charges_every_execution, twoemit::recttests and one hardware barycentric test.main. The game runs above were on that older base, not on this branch.Not measured: frame rate. Every view-heap handle now costs one more raw-buffer load, usually uniform. A before/after on another NVIDIA card would be welcome.
Not fixed by this: the phone screen in the diner (#545). That turned out to be an exposure issue, and the findings are in the issue.
🤖 Generated with Claude Code
@ArturoWolff on GitHub · 2026-11-28 02:46 UTC · original
Additional NVIDIA card comparison as requested. Tested your exact PR head
b0228f071a4effcc516a3baebec5ef62704791d2(basea4d05e7fd0af904130809c334a6008d62c24db6a) on an RTX 4060 desktop 8 GB / 16 GB system RAM, Linux, NVIDIA 620.73.04, GE-Proton11-14 / vkd3d-proton 3.2.0 (cae8353ed7959c4+). Both arms use the same locked MSVC release executable, with the previously tested Linux compiler, pipeline-library and physical-backing compatibility integrations retained unchanged (patch SHA-256a9143500aeb8611e66f90130534831f8f02156299e3133f970224ef50e7ae919, provenance and baseline in #628).Both actual retail launches used identical cloned profile seed, fresh engine/driver caches, Series X
1080to1440, full requested RT/water passes, no explicit omitted shaders or Bink skip, full write-back and waits, DLSS/FG off for the comparison, same DXC 1.9.2609 and mixed 448 MiB backing allowance. Effective logged graphics settings differed only inVICTORY_VIEW_REMAP.Enabled arm logged
title_slots=1245184 as_is=65536 pool=672318 dynamic_at=737855, and the table was selected from the first shader. Both arms had two successful DXC fallback attempts, no missing clamp/compare/native-library warnings, one unsupported Wave64 translation, and no host guard stop, new OOM kills or kernel GPU faults. Temporary backing retired empty. Both visually reached loading artwork then a black FPS overlay; no recorded input or live world. Both still fail during the same first-story prestream phase described in #628.This confirms activation of the intended remap path on an 8 GB RTX 4060 under Proton, but does not establish in-world descriptor correctness, reuse safety, peak pool occupancy, or gameplay FPS. It also does not fix this particular loading failure. The new watchdog findings in #628 make normal GPU completion and synchronization a more useful next investigation than removing rendering features. Thanks for making this independently selectable.
AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
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.