NVIDIA: the title's view heap (1,245,184) cannot fit the driver's 1,000,000 limit, and shrinking one title budget value to 140 fits it and removes the world stall #1760
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#1760
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@ttd0x on GitHub · 2026-11-24 22:05 UTC · original
Summary
On NVIDIA the world stalls in a few draws for 20-66 s each (then a TDR). Measured on an RTX 2080 Ti (Turing, driver 32.0.16.1088), the title's shader-visible CBV/SRV/UAV heap does not fit what the driver accepts. If the title is made to create a smaller heap (one budget value, below), the whole heap is mirrored 1:1, the stalls disappear and the world ran 5.5 minutes with no device removal.
Measurements
CreateDescriptorHeap(shader-visible, CBV_SRV_UAV) succeeds for exactly 1,000,000 descriptors on this card and driver. 1,000,001 fails (E_INVALIDARG), as does every larger size we tried (1,048,576 ... 1,572,864), although the device reports resource binding tier 3.descriptor/host.rsmirrors 934,464 of them (1,000,000 minus the 65,536 dynamic slots), so 310,720 title slots (25 %) have no host slot.CreateHandleFromHeapand are bound to the capped heap.Why this fits the other reports
Suggestion
A host-side setting that, when the host's heap limit (1,000,000 here, minus the dynamic slots) is smaller than the title's heap, lowers the title's page count P so that the heap fits (P = 140 gives 933,888 <= 934,464). The title's heap formula and the page-count variable are in the title image; we have a local
VICTORY_PATCH-style experiment that sets P before the heap is created.Not covered
image_gather4_l, masks; see the open PRs on those).Setup: RTX 2080 Ti, i9-9900KS, 32 GB RAM, Windows 11, TdrDelay 30 s, title hang watchdog disabled for the test, hands-off scripted keys. No game files or captures attached. AI-assisted analysis (Claude Code); measurements are from the submitter's own runs.
@DesertGamer on GitHub · 2026-11-24 22:11 UTC · original
VIctory V2: community PRs, merged and tested
Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.
Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).
⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.
Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
@fiestorra on GitHub · 2026-11-24 22:47 UTC · original
Reproduced locally, and it is not the sampler heap: it is the capped view heap against the shaders' clamp
I finally got a run with a presentable desktop on this machine (the agent runs in session 0; registering the boot as an interactive scheduled task puts it in session 1), so this is measured, not read:
mainat70564ae, release build, default adapter (the integratedAMD Radeon(TM) Graphics, driver32.0.21045.29003— DXGI's default on this machine, not the RTX 4090), 3840×2160, cache empty. The device is removed about 40 s in, at frame 128, which is the same point the reports give (frame 128 in #1754, 8 s in #1758).A negative result first, because it matters: I have a pull request that binds a sampler heap of our own when the title binds none (#1778, for the id 1419 error named in #1754). Built and run in the same session, same window, same cache state:
The removal happens anyway. So whatever the debug layer named in #1754, the thing that stops this machine is not the missing sampler heap. I would rather report that than let the pull request look like a fix for this.
What the numbers do point at. The emitted shaders clamp heap indices to a compile-time bound,
victory_shader::emit::HEAP_VIEWS - 1(lower.rs), withHEAP_VIEWS = 1 << 21 = 2,097,152, and the null slots the clamp is supposed to fall back to areNULL_BUFFER_VIEW = HEAP_VIEWS - 2 = 2,097,150. The host's heap, though, is capped at 1,000,000 slots on this driver — and the "no room for the null buffer views" warning is that same code noticing the null slots do not fit. So every index in[1,000,000, 2,097,151]is out of bounds of the bound heap, including the null slots the shader is told to read instead, and 310,720 title slots sit above the cap.That is a plausible
INVALID_CALL: an out-of-bounds descriptor index read throughResourceDescriptorHeap.The fix I would try next, in order:
HEAP_VIEWSis 2,097,152; the portable limit the code already knows (PORTABLE_VIEWS = 1_000_000) is smaller. A clamp tomin(PORTABLE_VIEWS, heap slots) - 3keeps every index, null slots included, inside the heap we can actually bind. It costs the title's slots above the cap (they read the null instead of their real descriptor, which is the design's stated behaviour for a slot that has none) and halves the view-stride table.I will run 1 on this machine and report what the log does, since I can now reproduce the failure in a minute. If someone with an NVIDIA card can run the same sequence on
mainand on the branch, the comparison would be worth more than my integrated-GPU numbers.No game data is involved: counts, warnings and HRESULTs only.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-24 23:23 UTC · original
The null views did not exist on a capped heap, and that is now fixed and measured
Following the numbers in this issue: the emitted clamp bound and the null buffer views are
HEAP_VIEWS - 1andHEAP_VIEWS - 2withHEAP_VIEWS = 2^21 = 2,097,152, while the host heap is capped at 1,000,000 and its dynamic slots were set to fill it exactly. So on a capped heap the null views the clamp is supposed to fall back to were outside the heap, which is whatno room for the null buffer viewswas saying, and any computed index between the cap and the clamp read a descriptor that was not there.Two changes, both about fitting inside the heap the driver allows:
HEAP_VIEWSis now 1,000,000 — the smallest cap the host meets in practice — so the clamp and the null slots are inside any heap we can bind;Measured on the machine that caps (integrated
AMD Radeon(TM) Graphics, driver32.0.21045.29003, session 1, real window 3840×2160, empty cache), same scenario before and after:no room for the null buffer viewstitle slot past the host heapmain70564aeso the null views now exist and the shader's fallback has somewhere to land. Everything else in that log is unchanged, including the device removal — which is the chain in #1754 (the UAV description's id 599 and the sampler heap's id 1419), not this. This change is about the heap being consistent with itself, not about the removal.
Verification:
cargo test -p victory-shader209 passed,cargo test -p victory-gpu78 passed / 1 ignored,cargo clippy --workspace --all-targetswith and without--all-featuresclean,rustfmt --checkon both files at the same hunk counts asmain(2 and 33 before, 32 after because two were mine).What it does not do, and I would rather say than imply: it does not remap the 310,722 title slots above the cap. Those slots still have no host descriptor, so a shader that computes such an index still reads the null instead of its real descriptor — the design's stated behaviour for a slot that has none, and a real rendering loss on a title heap this large. Making them work needs the heap remapped (or the clamp given a runtime bound), which is a bigger change than this one.
Pull request: #1837
No game data is involved: counts and warnings only.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-24 23:41 UTC · original
Correction to my own measurements: those runs were on the RTX 4090, not on the integrated GPU
I have been writing "default adapter, integrated
AMD Radeon(TM) Graphics, driver32.0.21045.29003" on the runs I made in session 1. That attribution is wrong, and the cause is worth knowing because it is the exact trap this repository keeps warning about.DXGI enumerates the adapters in a different order in the two sessions. Measured on this machine, same binary, same moment, with
cargo test --release -p victory-gpu -- --ignored adapters:So the default adapter is the integrated AMD in the agent's session and the RTX 4090 in the session where the title runs, which is precisely where every number I published in the last few rounds came from. With my selector in place the run says it plainly:
—
index=1is the AMD in session 1, the reverse of session 0, which is what made me notice.What this changes, and what it does not:
32.0.16.2124), not on the integrated GPU — which is the same vendor as the machines in #1754, #1755, #1758 and #1760. The chain in #1754 is NVIDIA evidence, not AMD evidence.B5G5R5A1_UNORM), the title in session 1 (RTX 4090, which does not). There was never a discrepancy — different device, different answer.32.0.21045.29003for a session-1 run should read32.0.16.2124(NVIDIA GeForce RTX 4090). I will put this note on the threads where the numbers were used rather than editing old comments, so the record keeps both.VICTORY_D3D12_ADAPTERis session-dependent, and a name substring is not. UseVICTORY_D3D12_ADAPTER=nvidiaor=amd, and check thehost GPU adapter=line rather than assuming which card the default is.No game data is involved: adapter descriptions, vendor ids and memory sizes only.
Written with an AI assistant.
@dragoso on GitHub · 2026-11-25 01:37 UTC · original
Four open PRs change how the capped view heap is laid out on NVIDIA. I measured all four on the same card, by the same method. All builds are on
70564ae+ #1763, since without #1763 the device is removed at boot on NVIDIA (#1754). Each build is adiagbuild, run for 90 s from boot with the same scripted keys. The title asks for a 1,245,184-slot view heap, and the driver takes at most 1,000,000.70564ae+ #1763The numbers come from each build's own log lines:
Observations
descriptor/host.rs, in the test module only. For these runs I kept the heap PR's side.Not established
+0x23cf683(#1118). So one run per build can't separate them.Setup: RTX 5060 Ti 16 GB, driver 617.42, Windows 11 26300.
No retail data, logs or screenshots are attached.
AI-assisted (Claude Code).
@dcastell1 on GitHub · 2026-11-25 02:42 UTC · original
Data point for this issue from an RTX 5090 (driver 621.24, Windows 11 10.0.26300):
main@940d32fis red on Windows partly because of the same cap.Both fail because the driver caps the shader-visible heap at 1,000,000 descriptors, so the heap the test gets is smaller than
HEAP_VIEWSand the dynamic-slot pool runs out: the same shape as the world stall this issue describes, seen from the unit tests rather than the title. If the landscape is "fit the title heap into the cap" (your P suggestion), the two tests need the same assumption relaxed, or they will keep failing on every NVIDIA card.Everything else is green here; the rest of the suite and
victory-shaderpass. No game data involved — unit tests only.AI-assisted (opencode).
@motyala1021 on GitHub · 2026-11-25 02:55 UTC · original
Additional confirmation of #1760 on an RTX 3050 (driver
32.0.16.1074, Windows 10 22H219045.6466, Agility SDK1.614.1).After applying #1763, #1630 and #1700, the title boots, reaches gameplay and renders an image, but after roughly 20 minutes it still ends with:
The same run contains the descriptor-heap symptoms from this issue:
and 310,720 occurrences of
title slot past the host heap index=1245176 count=934464 for_draw=false. There were noE_OUTOFMEMORY/no upload buffermessages, so this looks like the capped-heap / unmirrored-slot problem rather than memory pressure.I am now testing #1777 on this setup: it clamps shader heap indices to the heap the host actually accepts and keeps the null buffer views inside it. The shader cache and prebuilt pipeline-library tag are also keyed on the resolved heap size, so old entries are not reused with the different clamping. I will report back whether the long run survives. If more logs would help, I can attach the full stdout/stderr and
crashes.logentry.@Ryanarcx2 on GitHub · 2026-11-25 05:38 UTC · original
Data point from an RTX 5070 Ti (Blackwell, driver 32.0.16.1742), Windows 11 26200, Ryzen 7 9800X3D.
main940d32f+ #1763 (50d91b1), no heap-layout PR applied, default TdrDelay.The cap is hit in every run, the same numbers as in the description:
host view heap capped at 1000000, 310,720title slot past the host heap. The debug layer also reportsCreateDescriptorHeap: NumDescriptors 2097152, but the limit for shader visible view heaps is 1000000(5 times).Three runs, all of which reach world loading and then hang:
0x887A0006after 30 lists0x887A0006after 26 listsVICTORY_D3D12_DEBUG=1,VICTORY_D3D12_DRED=1DXGI_ERROR_DEVICE_HUNGafter 27 listsBefore each hang: 0.2-0.3 fps, submissions about 2.8 s each (max 3.3 s), up to ~1,500 draws per frame dropped, and three
nvlddmkmevent 153 entries at the moment of the hang.DRED in the diag run stops at one list, command 156 of 158, a single
dispatch 16x16x16of compute00167d58cc5a78d7between barriers. Everything queued after it had not started. Unlike the 22-66 s mesh draws in the description, this is a compute dispatch, so I can't say from this run alone whether it is reading a title slot past the host heap. I haven't tried P = 140 or any of the heap-layout PRs on this card yet.AI-assisted (Claude Code); the runs are mine.
@motyala1021 on GitHub · 2026-11-25 05:46 UTC · original
Update: #1777 passes two long runs on this RTX 3050 setup (driver
32.0.16.1074, Windows 10 22H219045.6466, Agility SDK1.614.1), without changing the title'sPbudget and without installing a newer driver.VICTORY_D3D12_DEBUG=1,VICTORY_D3D12_DRED=1,VICTORY_GPU_TIMING=1: no device removal, no newcrashes.logentry, stable ~30 fps,16 draws/frame,dropped 0 without a host pipeline. I stopped it at the 35-minute mark; it did not fall over by itself.VICTORY_GPU_TIMING=1: same result, no device removal, no new crash entries, still ~30 fps at the end. Again stopped only by my timeout.The startup warnings remain but are harmless in these runs: one
host view heap capped at 1000000 ... kept=934461, plus 310,723title slot past the host heaplines confined to the first ~35 s of startup (indices934461-1245183). There are no such warnings during gameplay afterwards. Counts forno room for the null buffer views,E_OUTOFMEMORYandno upload bufferare all zero.So #1777 removes the roughly 20-minute TDR seen here on this NVIDIA card, by clamping to the heap the host actually accepts and keeping the null views inside it. Thanks!
@Marvisak on GitHub · 2026-11-25 12:53 UTC · original · edited 2026-11-26 03:45 UTC
Automated triage for the maintainers. Still confirmed on main (
63bcca4). Incrates/victory-gpu/src/descriptor/host.rs,HostHeap::newcaps a refused view heap atPORTABLE_VIEWS(1,000,000) and keepsMIN_DYNAMIC(2^16) of it for dynamic slots. That leaves 934,464 title slots, and every title slot above that has no host descriptor ("title slot past the host heap"). The translated shaders still clamp heap indices toHEAP_VIEWS - 1(HEAP_VIEWS = 1 << 21,crates/victory-shader/src/emit/shader.rs), andNULL_BUFFER_VIEW(HEAP_VIEWS - 2) sits outside a capped heap ("no room for the null buffer views"). So a computed index past the cap reads outside the bound heap on NVIDIA.Open PRs that change the capped layout, compared side by side by dragoso above: #1751, #1548, #1777 (clamps to the heap actually created and places the null views) and #1779. None of them fits all 1,245,184 title slots. That needs a remap or the title-budget change proposed here. (The earlier version of this note also named #1837; that number is an unrelated screenshot PR.)
Results with #1777 differ by card. On an RTX 3050, two 35-45 minute runs had no removal. On an RTX 4070 SUPER (driver 617.42, main
63bcca4), Luqueze reports the device goes earlier with #1777 than without it, at the samedispatch 16x16x16 [compute 00167d58cc5a78d7]that DRED names in the RTX 5070 Ti comment above. So the clamp alone does not remove that hang. The hang on that compute program is also reported in #898 (the oldest report naming it) and #1968. A run withP = 140on one of those cards would show whether the capped heap is the cause there. The related unit-test failures are in #1744, and the dynamic-slot cap is discussed in #747.Generated by Claude Code
@Luqueze on GitHub · 2026-11-26 02:21 UTC · original
Data point from an RTX 4070 SUPER (Ada, driver 617.42 / 32.0.16.1742), Windows 11 26300, Ryzen 7 5700X3D, 32 GB. Same numbers as the description:
host view heap capped at 1000000 ... count=1245184, 310,720title slot past the host heap.On
main(63bcca4) the world draws at 0.1-0.3 fps (4-9 s a frame, almost all on the GPU) and the device is removed after 28 lists, 3.9-5.9 min after start. DRED stops atdispatch 16x16x16 [compute 00167d58cc5a78d7], as in the RTX 5070 Ti comment above.With #1777 (
cbb9d78) the device goes earlier, 35 s after world loading starts, at the same dispatch (details in #1777). So on this card the clamp alone does not remove the stall; I haven't triedP = 140.AI-assisted (Claude Code); the runs are mine.