Shaders, GPU: a heap index computed from data stays inside the heap #483
No reviewers
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!483
Loading…
Reference in a new issue
No description provided.
Delete branch "gh-pr/483/head"
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?
@Vaximous on GitHub · 2026-11-24 03:57 UTC · original
Vaximous:gpu/guard-heap-indices→main· +200 −11 · 7 files · 1 commits · closed without mergingRefs #71, #264, #97 (one cause of the NVIDIA world
DEVICE_HUNG; not shown to be the only one).What
Every descriptor-heap index the lowering computes is bounded: an index at or above the bound heap's guard slot reads the guard slot instead. The host reserves one null slot at the end of each view heap for this and passes its index to the shader in a new user-data dword.
Why
Translated programs that load descriptors bindless read an index from a buffer, shift it left by 5 (4 for samplers), add it to the heap or table address and
s_load_dwordx4the descriptor there.Lower::heap_indexturned that address intocreateHandleFromHeap(addr >> 5)with no bound. When the host's copy of the buffer is stale or zero, the index can be anything up to 2^27, far past the host view heap (PORTABLE_VIEWS= 1,000,000 slots on NVIDIA).An index past the heap is undefined in D3D12, and NVIDIA does not fault on it: measured on an RTX 4070 Ti with the synthetic test below, a store through heap index 2^25 lands in slot 0: the hardware wraps the index onto an unrelated slot. In the title the wrapped slot holds a descriptor of another kind, the dispatch never finishes, and the driver removes the device with
DXGI_ERROR_DEVICE_HUNGand no DRED page fault.What pointed there, in the title on this machine (observed on a local integration branch of main plus many open PRs): the programs that hang have no barriers;
VICTORY_SHADER_LOOP_LIMIT=64still hangs; skipping one of them moves the hang to another program of the same kind (bindless descriptor fetch).Changes
victory-shader,emit/lower.rs:heap_indexends inheap_guard(index, sampler):idx <u guard ? idx : guard(one compare, one select). The guard is read once per program from a user-data dword placed after every dword the program's root parameters reach, recorded as aUserDataentry with root typeResourceHeap(view heap) orSamplerHeap.user()is split so the guard read shares the user-data load (user_dword).emit/mod.rs: the binding notes andUserData::rootdoc describe the new entry. This is a change to the binding scheme the module notes say is announced: a host that fills user data must fill these entries (user_data_dwords()already covers them, so root-signature sizes stay consistent).victory-gpu,descriptor/host.rs: a view heap gets one slot more after itsDYNAMICslots (null from the start, never made);HostHeap::guard_slot()returns it. A sampler heap's guard is its last slot (any sampler reads safely). The capped-heap path reserves the slot insidePORTABLE_VIEWS.draw.rs:user_dword()fills the guard entries from the bound heaps at draw/dispatch (and in the device-removed description); other entries go throughuser_valueas before.emit/host.rs): the draw/dispatch view heaps keep a null slot after their views;guard()gives the test helpers the value to fill.diff_testspassesu32::MAX(its views are all in range).Cost: one compare and select per bindless descriptor fetch, and one user-data dword per stage that does one.
Tested
Machine: RTX 4070 Ti, Ryzen 9 7900X, Windows 11 26300.
emit::valu_tests::a_heap_index_past_the_heap_reads_the_guard_slot: a one-thread program loads a UAV descriptor at table address + (data << 5) and stores through it, for index 0, 1 (the guard), 2^25 and 0x07FF_FFFF. With the select removed fromheap_guard(temporary edit) it fails on hardware:index 0x2000000writes 7 into slot 0. With the change it passes on hardware and WARP.cargo test -p victory-shader -- --test-threads=1: 70 passed, 0 failed (main: 69 passed; the extra one is the new test).cargo test -p victory-gpu -- --test-threads=1: 43 passed, 1 ignored, 0 failed (same as main).cargo clippy -p victory-shader -p victory-gpu --all-targets: no new warnings (the one existing warning is on main too).cargo xtask policy --staged: ok.Title (build 1.0.2.1, diag build, scripted Enter presses,
VICTORY_D3D12_DRED=1):DEVICE_HUNGwithin seconds of world entry on every run.DEVICE_HUNG(0x887A0006) about 45 s after the world started. DRED breadcrumbs stop at a mesh draw (DispatchMesh), not at one of the bindless compute dispatches this change is about. The guard dwords held the expected values (view heap capped at 1,000,000: guard 999,999; sampler guard 127).DEVICE_HUNGabout 55 s after the world started, with no breadcrumbs.So on plain main this change alone does not make the world stable on NVIDIA: another hang remains (mesh path; other open PRs, for example #89 for an invalid render-target view on a 16-bit packed format, address other NVIDIA failures). This PR removes one cause, the wrapped heap index, which the synthetic test reproduces in isolation. Scripted keys only; frame rate in the world is very low here (seconds per frame), so the time in the world is short in every run.
Not tested
ResourceDescriptorHeapmaterialization) and #100 (sampler heap cap at 2,048): neither is merged here. They touch the same files (descriptor/host.rs,draw.rs). #413 makes in-range bindless slots hold the right views; this PR keeps out-of-range indices off unrelated slots, so the two are complementary. With #100 a capped sampler heap's guard is still its last host slot.AI use: written with Claude Code (Claude Opus 5.5 executing, Claude Fable 5.2 planning), tested on the submitter's hardware.
🤖 Generated with Claude Code
@DaviTostes on GitHub · 2026-11-24 04:03 UTC · original
Verified
65a161don Arch Linux x86_64, Windows MSVC release build under Wine 11.22 (victory-gpu,--test-threads=1): 43 passed, 0 failed, 1 ignored.Not covered: a heap index computed by the title's data actually clamped at draw time (no game data here).
@miniongk on GitHub · 2026-11-24 04:06 UTC · original
Confirmed on an RTX 5080, driver 621.24, Windows 11 26300, using a local Xbox Series 1.0.2.1 copy at
65a161d.emit::valu_tests::a_heap_index_past_the_heap_reads_the_guard_slot: passed in 0.28 s.cargo test --workspace: 265 passed, 0 failed, 4 ignored.DXGI_ERROR_DEVICE_HUNG; DRED implicated indirect execution and mesh dispatch, consistent with the remaining hang your report describes.The synthetic guard test works here, but the world is not stable on this hardware yet. Only aggregate counts and error classes shared. AI-assisted (Kimi Code).
@erickbobd on GitHub · 2026-11-24 05:06 UTC · original
Independent synthetic check on RTX 5070 Ti, NVIDIA 617.14, Windows 11 25H2 26200.9974, Rust 1.98.1 / MSVC x64, with the Windows SDK 10.0.26100.0
dxil.dllexplicitly selected.a_heap_index_past_the_heap_reads_the_guard_slotpasses on hardware and WARP.heap_guardmakes the hardware test fail at index0x02000000: slot 0 receives 7, expected 0. This independently reproduces the wrap on Blackwell. Restoring the select passes.count + DYNAMICfails: 1,196,607 versus 999,999.These were checked on local integration
8693373:main d2a4bae+ #493 (including #336), #483 at65a161d3, #189, #89, #205, #206, #469, #459, #454 and #211. Serial library suites after both mutations were restored: victory-gpu 55 passed / 1 ignored; victory-shader 88 passed. These counts include the other PRs and an additional local allocation test.No world-stability claim: the local title probe was stopped during loading for low system commit headroom. No game files, captures or logs attached. AI-assisted (Codex).
@wwwwwwww3333333 on GitHub · 2026-11-24 05:23 UTC · original
RDNA2 result, including the negative control. On an AMD RX 6750 XT (RDNA2) / Windows 11 / Rust 1.98.1 MSVC, with this PR at
65a161d:a_heap_index_past_the_heap_reads_the_guard_slotpasses on hardware and WARP. There was nono SM 6.6 hardware device; skippedline under--nocapture, so it ran on the card.cargo test -p victory-shader -- --test-threads=1: 70 passed.cargo test -p victory-gpu: 43 passed, 1 ignored.selectinheap_guard, soindexis used unclamped. The hardware stage then fails withdispatch failed: device removed, and the message is the standardDXGI_ERROR_DEVICE_HUNGtext ("the GPU will not respond to more commands, most likely because of an invalid command passed by the calling application"). That reproduced 2 of 2 runs. There was no visible driver reset; the device was lost only inside the test process. Restoring theselectpasses again (exit 0).So where NVIDIA wraps an out-of-heap index onto slot 0, RDNA2 loses the device. The panic doesn't say which of the out-of-range cases triggered it. This doesn't prove the AMD world crashes (#59, #304, #557) come from this, but it shows that an unbounded heap index is enough to remove the device on AMD too, not only to corrupt a slot on NVIDIA.
Not runtime-tested with game files. AI-assisted (Claude did the analysis and the one-line control change; I ran the tests on my machine).
@iurysf on GitHub · 2026-11-24 05:24 UTC · original
On an RTX 4070, GBV on main
d2a4baereports the case this PR guards: id 936,Descriptor heap index out of bounds via direct indexing: Heap Index From HeapStart: [117506306], Num Descriptor Entries: 1000000, Shader Stage: PIXEL. Together with #493, the host device removal we hit every run on main is gone for 300 s (details in my comment on #493). Its tests pass on this machine. I could not isolate this PR in game without #493.@etcetera-yt on GitHub · 2026-11-24 05:36 UTC · original
#483 puts a view heap's guard slot right after the dynamic slots (
extra = DYNAMIC + 1,guard_slot() = count + DYNAMIC). Onmainthat is safe:HostHeap::dynamichands out slots from a pool sizedDYNAMIC, so the guard is never given to a table.#86 replaces that pool with one sized from the heap's spare slots (
spare = extra). With both merged, the pool isDYNAMIC + 1slots long, anddynamiccan return the guard slot itself; a table made there overwrites the guard,so data-computed indices that #483 sends to the guard would read that table instead of a null view.
Whichever of the two lands second needs to keep the guard out of the pool. In my local merge I marked the last
spare slot of a view heap as taken when the heap is made (
next: Mutex::new((0, taken))withtaken.last_mut()set), and
dynamic_slots_are_held_until_releasedand the rest of thevictory-gputests still pass(Windows 10 19045, RTX 5060 Ti).
AI use: Claude Code, Claude Opus 5.5.
@Vaximous on GitHub · 2026-11-24 05:58 UTC · original
Thanks, that's right, and I hit the same thing in a local merge of both.
mainas this PR stands: the dynamic pool isvec![false; DYNAMIC]anddynamic()only searches0..DYNAMIC, so the guard atcount + DYNAMICis never handed out.extra = DYNAMIC + 1it covers the guard. The fix is what you did: keep one slot out of the pool. In my integration branch (main + #86 + #100 + this PR and many others) view heaps were already fine, because the pool there is sized before the guard is added. The capped sampler heap was not: its guard was the last dynamic slot. I fixed it by making the guard its own slot past the 255 dynamic ones, with a test that nodynamic()request ever returnsguard_slot().Whichever of #86 and this PR lands second should carry that change. If #86 merges first, I'll rebase this PR onto it and add the reservation and the test here.
AI use: Claude Code (Claude Opus 5.5).
@walterwallaceson on GitHub · 2026-11-24 06:47 UTC · original
Windows 10 data point for #493 (
c48b240) + #483 (65a161d): no device removal on an RTX 3070.Setup: Windows 10 22H2 (19045.6466), RTX 3070, NVIDIA 621.14, Ryzen 5 5600X, release build, Agility SDK 1.620.2 via #175. Base stack: #175, #233 + #320 + #439 (f653ea4), #55, #89, #336 (
e8d3b64), #334 (af2aecf). This GPU caps the view heap at 1,000,000, so #336/#493 take the 2^16 dynamic range. #493 and #483 conflict indescriptor/host.rs; I resolved it as described on #493: #493'sDYNAMIC/MIN_DYNAMICselection plus one guard slot (make(count + DYNAMIC + guard), capped branchPORTABLE_VIEWS - (MIN_DYNAMIC + guard)), the guard kept out of the dynamic pool, andguard_slot()returningcount + self.dynamic.0x887A0006/DEVICE_HUNG)no free dynamic descriptor slotsslow host submissionlines, 0 host pipelines refused, 0no host texture.0x80000003(a breakpoint) at title+0x5149aecon 7 threads at once, all with the same stack (+0xa5db22,+0x5453ac7,+0x23d0f9a, …). The title then tries to upload a crash report, which VIctory's network policy blocks. I couldn't find that address in an issue yet.cargo test --workspace: #483'sa_heap_index_past_the_heap_reads_the_guard_slotfails here with "neither hardware nor WARP SM 6.6 device available", the same Windows 10 cause as the othervalu_tests(#362). Otherwise only the known Windows 10 failures.One run so far.
No game data in this report.
AI-assisted (Claude Code); everything above was run on my machine.
@ghost on GitHub · 2026-11-24 09:27 UTC · original
AMD data point from r4tedx's tester tree, where this PR is merged by hand (
7ef2c41): on an RX 9060 XT the title dies seconds into the world inside AMD's driver (amdxc64.dll) from that merge on, and not with it reverted. Bisect and details: #293. Not tested: this PR alone (it conflicts with my base indescriptor/host.rs), so it may be the tree's merge rather than the PR; NVIDIA runs of the tree don't show it.AI-assisted (Claude Code, Claude Opus 5.5); no game data.
@MD5Visual on GitHub · 2026-11-24 10:19 UTC · original
Three runs on an RTX 3090 (24 GB) that all end where this PR says they should - a heap index computed from data, past the heap - so I think this is worth merging on its own evidence, not only as part of the integration tree.
Windows 11 Pro 26200, Ryzen 7 5800X3D, 64 GB, RTX 3090 24 GB, driver 32.0.16.1088 (610.88), title 1.0.2.1
b99f876b..., diagnostics build with DRED, same input sequence each time:main 8e79c800xa67100= 10,908,160ms=11225 lists=1lane-mask branch 49d6d980x12e7720= 19,821,856ms=8956 lists=22main ffe310e(with #566)0xfa5000= 16,400,384ms=8926 lists=17Each breadcrumb reads
[heap N: null]for a descriptor index five to thirty times pastN, in a submission that took 9-11 s, and the device is gone immediately after. Nothing here is memory pressure: 20+ GB of the 24 GB is free at the time.The third row is current main, so the per-lane descriptor work in #566 does not change this: 118 refused compute pipelines against 117 on
8e79c80, 424 untranslated against 428.#483 is in r4tedx's integration tree, and that tree is where the no-removal reports on a 5080, a 3080 and a 3070 come from, so as far as I can tell this is the one fix that addresses the failure we can reproduce on Ampere. What I cannot tell from the title's logs is whether the world would then render or stay dark - the reports so far say dark either way.
@h0useadv on GitHub · 2026-11-24 11:01 UTC · original
RX 9070 XT data point for this PR stacked with #493, plus one merge note for current
main.Merge note. On
mainffe310e, this PR conflicts indescriptor/host.rswith #336's three-tier heap sizing:DYNAMIC= 2^18 where the host takes it, otherwiseMIN_DYNAMIC= 2^16, then thePORTABLE_VIEWScap. Taking either side loses something. What I did:make(count + DYNAMIC + 1), thenmake(count + MIN_DYNAMIC + 1), and when capped,PORTABLE_VIEWS - MIN_DYNAMIC - 1title slots;kept,GPU_RANGESandfill_nullcovercount + extra + 1, so the guard starts null;guard_slot()returnsself.count + self.dynamic, notself.count + DYNAMIC. After the merge,DYNAMICis only right for uncapped heaps. On a heap that fell back toMIN_DYNAMIC,count + DYNAMICpoints past the heap: the out-of-range read the guard is meant to prevent.The
valu_tests.rsconflict is just two new tests side by side.Run (Windows 11 Pro 26300, driver 32.0.32029.2010, 7800X3D; diag build of
ffe310e+ #493c48b240+ this PR merged as above;VICTORY_D3D12_DRED=1; scripted Enter presses into the first mission):dd54de2(6 runs)dd54de2+ #493 (2 runs)ffe310e+ #493 + this PRa list stopped at command 176 of 182 (op 42), 32 listsIn the world: about 1 fps, ~2,500 draws/frame with ~500 still waiting on pipelines, 23
slow host submissionlines, and audio running throughout. One run, so it doesn't separate this PR's effect from #493's or the 50 new commits onmain. It does show the combination merges, builds and runs on RDNA4 with no page faults.AI-assisted (Claude Code). Logs are VIctory's own output, with no game data.
@AimLogin on GitHub · 2026-11-24 13:21 UTC · original · edited 2026-11-24 14:18 UTC
<html>@Vaximous, your guard scheme is the base of an extension I've put up as AimLogin/VIctory#1 (in my fork, because upstream PRs are currently collaborator-only).
The commit is cc449ca. It builds on the #747 heap layout (3e3b8c5) and includes synthetic GPU readback tests.
Please feel free to incorporate any of these changes into your PR, in whole or in part, or integrate them separately. You and the maintainers decide how they should land.
Credit: The guard user dword placed after the user data, the
user()/user_dword()split and the original null guard are yours. The integration notes from @etcetera-yt, @h0useadv and @walterwallaceson are applied: the guards are kept out of the dynamic pool, andguard_slot = count + self.dynamic. Thanks also to @erickbobd and @wwwwwwww3333333 for their negative controls on Blackwell and RDNA2.1. Separate bounds for direct and table reads
heap_boundimplementationA read straight from the heap (root
ResourceHeap, base 0, a title index) is bounded by the host's title slots. A read through a table is bounded by the guard base.On a capped heap, the slots between the title slots and the guards hold the host's per-draw tables. With one bound, a stale title index can access another draw's descriptor. Since the descriptor itself is valid, this need not produce a page fault or a DRED entry.
Synthetic readback on a 1,000,000-slot heap laid out as on a capped host, tested on an RTX 4060 Ti (driver 621.01) and WARP. Each case writes its own marker, and the readback identifies which UAV was written:
Direct index | Single-bound scheme | Two-bound scheme -- | -- | -- 737,855 (title) | Title UAV | Title UAV 737,856 / 934,463 / 934,464 / last dynamic slot | Another draw's UAV | Null guard 999,999 / 1,000,000 / 2^25 / 0x07FF_FFFF | Null guard | Null guardFour differential tests require an unavailable Xbox SDK compiler, so their actual differential checks were not performed.
Negative controls were performed for single-bound direct accesses, unbounded
fetched_index, and placement of bound dwords after the declared layout.No unbounded out-of-heap access was executed on hardware.
Limitations and integration
No world run or AMD hardware validation.
No measurement of how frequently the title accesses indices beyond the available title slots.
Redirecting out-of-range accesses to null does not recover the intended resources.
Individual dynamic table lengths are not enforced.
Remaining root-signature overflow cases are not completely resolved.
Integration notes for #644, #688, #581, #413, #493, #86 and #100 are included in the linked fork PR.
This is offered as an extension to your existing work, not as a replacement for your contribution.
AI-assisted (Claude Code); the reported tests were run locally on this machine. No game files used.
</html>@Vaximous, your guard scheme is the base of an extension I've put up as **[[AimLogin/VIctory#1](https://github.com/AimLogin/VIctory/pull/1)](https://github.com/AimLogin/VIctory/pull/1)** (in my fork, because upstream PRs are currently collaborator-only).The commit is [cc449ca](
github.com/AimLogin/VIctory@cc449ca941). It builds on the #747 heap layout ([3e3b8c5](github.com/AimLogin/VIctory@3e3b8c5841)) and includes synthetic GPU readback tests.Please feel free to incorporate any of these changes into your PR, in whole or in part, or integrate them separately. You and the maintainers decide how they should land.
Credit: The guard user dword placed after the user data, the
user()/user_dword()split and the original null guard are yours. The integration notes from @etcetera-yt, @h0useadv and @walterwallaceson are applied: the guards are kept out of the dynamic pool, andguard_slot = count + self.dynamic. Thanks also to @erickbobd and @wwwwwwww3333333 for their negative controls on Blackwell and RDNA2.1. Separate bounds for direct and table reads
heap_boundimplementationA read straight from the heap (root
ResourceHeap, base 0, a title index) is bounded by the host's title slots. A read through a table is bounded by the guard base.On a capped heap, the slots between the title slots and the guards hold the host's per-draw tables. With one bound, a stale title index can access another draw's descriptor. Since the descriptor itself is valid, this need not produce a page fault or a DRED entry.
Synthetic readback on a 1,000,000-slot heap laid out as on a capped host, tested on an RTX 4060 Ti (driver 621.01) and WARP. Each case writes its own marker, and the readback identifies which UAV was written:
Fresh tables still reach their own dynamic slots up to the guard base.
One remaining limitation: table-rooted accesses are bounded by the guard base, not by the individual table's length. This does not prevent every possible cross-table access.
2. Bounding
fetched_indexPer-lane descriptors loaded with
global_load(Source::Fetched) go throughfetched_index, which was not bounded in the reviewed version of this PR.A lowering test on the waterfall fixtures checks that the bound is present. A mutation removing the bound causes the test to fail.
3. A guard per resource kind
HEAP_GUARDSimplementationThe D3D12 resource binding specification requires compatible descriptor types for null accesses.
Reference: [D3D12 Resource Binding — NULL Descriptors](https://microsoft.github.io/DirectX-Specs/d3d/ResourceBinding.html).
Whether a mismatched null descriptor contributed to @nullmarsh's AMD crash remains unknown. I have not tested on AMD hardware.
4. Compact placement of bound dwords
Placing the bounds after the entire declared layout can grow a stage's root-constant block from 4 to 36 dwords (31 user SGPRs declared, two actually read). Two such stages could exceed the 64-dword root-signature limit.
The new implementation places the bounds immediately after the highest dword actually read by the program.
Pipelines already close to the 64-dword limit may still be refused. #644 (@nathanbzrr) provides a complementary approach by spilling oversized constant blocks to root CBVs.
Validation
-D warnings--all-featuresFour differential tests require an unavailable Xbox SDK compiler, so their actual differential checks were not performed.
Negative controls were performed for single-bound direct accesses, unbounded
fetched_index, and placement of bound dwords after the declared layout.No unbounded out-of-heap access was executed on hardware.
Limitations and integration
Integration notes for #644, #688, #581, #413, #493, #86 and #100 are included in the linked fork PR.
This is offered as an extension to your existing work, not as a replacement for your contribution.
AI-assisted (Claude Code); the reported tests were run locally on this machine. No game files used.
@DuarttBR on GitHub · 2026-11-24 15:30 UTC · original
Merge notes from stacking this on current
main(ffe310e, which now has #336), in case they save someone time. RTX 3080, Windows 11.HostHeap::newconflicts with #336's sizing. I keptmain's sizing (2^18 dynamic slots where the host takes them, else 2^16, else the 1,000,000 cap) and put the guard slot after the dynamic ones:guard_slot()returnscount + self.dynamic, and the null fill,keptandGPU_RANGEScovercount + extra + 1. On the capped NVIDIA heap the guard is slot 999,999. 036d742mainsince then don't know the guard entry. The fiveemit::waterfall_testsassert every user-data entry is aTable, and the harnesses of #160's image tests and #265's scratch tests panic on an unexpected entry. With this PR a program that computes a heap index gets aResourceHeapentry, so all of them fail. Giving that entryhost::guard(root, views, samplers)in each harness fixes them: 83fa35c, d0261c3.With these,
cargo test --workspacepasses, and in Series S mode the world ran 5.5 minutes with no device removal on this card (stacked with #493, #189, #333, #489 and others).AI use: Claude Code (Claude Fable 5.2, Claude Opus 5.5) resolved the merge, ran the tests and drafted this comment; I reviewed and posted it.
@ICE-dev1150 on GitHub · 2026-11-24 16:12 UTC · original
RTX 4070 before/after on current
main: same machine, same day, same scripted input.Setup: RTX 4070 (driver 616.64), Ryzen 7 7800X3D, Windows 11 26300; title 1.0.2.1
b99f876b...;diagbuild withVICTORY_D3D12_DRED=1; pad unplugged,VICTORY_KEYSpressing Enter.mainffe310effe310e+ #493 + this PR (65a161d)main: the list stopped at an ExecuteIndirect (op 5), command 1439 of 3216, meshae9ee9074f2e971f/ pixel1cb9d385ac8987c4, withu8=0xa12100 [heap 329992: null]. That is the signature this PR targets.With the PRs: a plain hang later, with no page fault. The list stopped at a DispatchMesh (op 42), command 121 of 127, mesh
04b9be3756e8f41c/ pixel1af4a50c7fb40c97. It looks like the op 42 hangs on #71 and h0useadv's 453 s run.Merge: done the way h0useadv and DuarttBR describe. The guard slot sits after the dynamic range,
guard_slot()returnscount + self.dynamic, and the null fill,keptandGPU_RANGEScover it. I built only thevictorybinary and did not run the test suite.Caveats: one run each. The second run had a warm pipeline cache (193 pipelines being made at world entry, against 700–1,150). That explains part of the fps change, but not the longer run.
During the longer run the world stays mostly black. 400–1,700 draws per frame are dropped without a host pipeline while none are being made. The top translation stops are a select on an untracked mask, a descriptor read only as data, and a lane mask read as data. The host refused 141 pipelines.
Driver resets: each removal came with an
nvlddmkmevent 153 (a driver reset), and the PC recovered.AI-assisted: I used Claude Code for the merge, the two runs and this write-up.
@Marvisak on GitHub · 2026-11-25 00:03 UTC · original
Automated triage for the maintainers. Closing because another open pull request covers the same change.
See #1133. Heap indices past the host heap: main clamps every index to HEAP_VIEWS-1 / HEAP_SAMPLERS-1 and keeps the host heap that large (emit/shader.rs heap_handle). Only a host that caps its heap lower (NVIDIA) is left, and #1133 covers that with a translation-time bound instead of a new user-data dword per draw.
If this is mistaken, reply here with what was missed (or push a change and say so) and it will be looked at again. Thank you for the contribution.
Pull request closed