GPU: view heaps on hosts capped below 2^21 descriptors #1779
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!1779
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-1779"
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?
@wbkepler on GitHub · 2026-11-24 22:25 UTC · original
wbkepler:gpu/capped-view-heap→main· +884 −116 · 10 files · 1 commits · openProblem
A host that makes no shader-visible view heap of
HEAP_VIEWS(2^21) descriptors (NVIDIA: 1,000,000) is left in four kinds of trouble onmainat70564ae:HEAP_VIEWS - 1and read the null buffer views at the constant indexNULL_BUFFER_VIEW = 2^21 - 2. Neither exists in a 1,000,000-slot heap (HostHeap::newlogs "no room for the null buffer views"), and an index past a heap is undefined.MIN_DYNAMIC(2^16) dynamic slots, the size that ran out in the world in #59, while dynamic slots now also feed root-view runs and unordered-access clears. Tables made afresh take slots from entry 0 even when the first used entry is far into the table.descriptor::host::tests::dynamic_slots_are_held_until_releasedandmemory::tests::lists_share_a_table_and_copies_keep_their_viewsfail on every such host, as doesemit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zerosinvictory-shader(#1744).Fix
emit::host::Host::view_heap_limitasks the device once, when the host device is made;emit::set_view_heap(views, blocks)tells the translator. View heap indices are clamped belowheap_views()and the null buffer views are read atnull_buffer_view()(two below the end), instead of the constants. A host that takes 2^21 slots is told nothing and translates exactly as before (same DXIL). The shader cache keys its entries on the two values only where they differ from the default, and the pre-build list's tag covers them, in the way the loop limit is already handled.descriptor::host::Blocks), 1,024 title slots each. A block's slots follow each other in the host heap in the title's order; the block itself lies wherever a host block was free when the title first wrote a view into it, and gives its host block back when its last view is gone. A sparse title heap of any size therefore fits as long as the blocks that hold views do. The layout for 1,000,000 slots (capped_layout): 703 blocks for the title's slots and one that stays null, the fullDYNAMIC(2^18) range, 2^14 slots for host copies' view pairs, then the null unordered-access view, the null buffer view and the clamp's slot. A title heap that fits whole keeps the title's order (every block has its host block from the start), so small heaps behave as before.t254(VIEW_BLOCKS) beside the view-stride table:table[index >> 10] + (index & 1023), one extra load. A block without host slots leads to the null block. This is emitted only when the host says its heaps hold the title's slots by blocks, at the point where the index is computed (Lower::host_index), so handles, the view-stride lookup and view addresses all read at the host's index, and descriptors chosen between a table and the heap by control flow stay right.HostHeap::run). A table reaching into a block without host slots, or across blocks that lie apart, is made afresh in dynamic slots, whichmainalready does for tables past a cut. Host blocks are taken so that neighbouring title blocks lie side by side where they can (BlockMap::take).fresh_range); the offset given to the shader is the table's entry 0, as before.Not done
HostHeap::mirrorcounts those writes in a warning). Blocks whose views only went stale, without the title rewriting the slot, keep their host block; nothing is evicted.victory translate --cachenow makes the host device before translating, since entries depend on it.70564aeand conflicts withmainsince the view-mark table landed (cd94d35): that table is a third per-slot table and has to be kept by host slot as well. It needs a rebase onto currentmain.Tests
a_capped_heap_holds_the_titles_slots_by_blocks: a heap made as on a host capped at 65,536 slots for a title heap of 100,000. A view written far past the host's slots is where a shader finds it through the block table (and the view-stride table says a buffer view is there) and where a table over it is told to read; the next title block lies beside it; a table into a block without host slots is not in one run; a block gives its host block back with its last view; with every block taken a further block gets none.a_heap_index_goes_through_the_view_block_table(victory-shader): a compute program translated for such a host reads a buffer whose title index lies past the test heap, through the block table, on hardware and WARP; translated for other hosts the program lists no block table.a_capped_heap_keeps_dynamic_slots_pairs_and_null_views: the layout; the whole dynamic range leases, pairs go up to the null views, the null buffer views are where shaders read them, a small title heap keeps its order.a_fresh_table_takes_slots_from_its_first_used_entry.dynamic_slots_are_held_until_releasedtakes the heap size and the first dynamic slot from what the host makes; the shader cache key test covers the host part of the key; the stride test translates for each host's heap (through a per-thread setting, so tests beside it are not affected).Verification host: Windows 11, NVIDIA GPU with a 1,000,000-descriptor view heap cap.
cargo clippy -p victory-gpu -p victory-shader --all-targets -- -D warningsandcargo clippy -p victory --features diagnostics --all-targets -- -D warnings: clean.cargo test -p victory-gpu: 81 passed, 0 failed.cargo test -p victory-shader: 208 passed, 2 failed:a_heap_buffer_read_by_element_takes_the_views_strideandgathers_at_a_level_match_the_hardware, with the values #1744 reports formainon this kind of GPU.cargo xtask policy: ok.victory translate --validate, and a host without the cap (the code paths there are unchanged apart from reading the two values).Supersedes #1349. #1751 and #1548 address the dynamic range alone; this also covers the indices past the heap that #1133 set out to bound before the clamp landed.
AI-assisted (Claude Code).
🤖 Generated with Claude Code
@upipibi on GitHub · 2026-11-24 22:31 UTC · original
On an NVIDIA host with the 1,000,000 cap: RTX 3070 8 GB, driver 616.56, Windows 11, debug,
a63eb93(onmain70564ae).cargo test -p victory-gpu --locked: 80 passed, 0 failed, 1 ignored.mainhas 76 passed and 2 failed here (dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views).cargo test -p victory-shader --locked: 207 passed, 2 failed, 2 ignored. Of #1744's three,a_heap_buffer_read_where_no_buffer_view_is_reads_zerosnow passes (onmainits dispatch fails with "The parameter is incorrect"). The other two fail with exactly the same data as onmain, so they are not this PR:a_heap_buffer_read_by_element_takes_the_views_stride:[101, 104, 107, …, 131, 0, …]against[200, …, 231];gathers_at_a_level_match_the_hardware: lane 0[0, 1, 0, 0]against[0, 0, 0, 0].AI-assisted (Claude Code). Synthetic tests only.
@Vedoxdev123 on GitHub · 2026-11-24 22:33 UTC · original
Tested on Windows with AMD Ryzen 5 5600X + NVIDIA GeForce RTX 4060:
cargo test -p victory-gpu --lib-> 80 passed; 0 failed; 1 ignoredBoth previously failing descriptor heap tests (
dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_views) now pass.@DesertGamer on GitHub · 2026-11-24 22:34 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:
https://DesertGamer/VIctory-V2
Unofficial community fork of Marvisak/VIctory, GPL-3.0.
@rminzao on GitHub · 2026-11-24 23:09 UTC · original
Question: title slots cut to 721,469 for every heap on a capped host
capped_layout(views)derives the mirrored title range only from the host's limit:room - dynamic - pairs, so 721,469 at the NVIDIA cap, regardless of how many slots the title's heap has. If I read it right, a title heap of, say, 800,000 slots, whichmainmirrors in full on a host that can make it, now loses its last ~78,500 slots, and heap-direct indices into them go to the null views.Is that intended (the translator needs one fixed layout for all heaps), or should the layout follow the heap's count when it fits? If it's intended, a log line when a title heap is cut would help.
Also,
stride_tests.rs(~320/350) change the process-wideset_view_heapduring a test. A panic before the reset leaves later tests in the same process translating for a capped heap.Static review (AI-assisted), read against
mainat70564ae; nothing was run on a GPU.@Mericas77 on GitHub · 2026-11-24 23:56 UTC · original
Tested
a63eb93on an NVIDIA host with the 1,000,000 view heap cap: RTX 4070 12 GB, driver 621.01, Windows 11 (build 26300), i5-13500, debug build.main70564aea63eb93cargo test --workspace --locked --no-fail-fast-p victory-gpu-p victory-shader#1744's five on this card:
descriptor::host::tests::dynamic_slots_are_held_until_released: fails onmain, passes herememory::tests::lists_share_a_table_and_copies_keep_their_views: fails onmain, passes hereemit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros: fails onmain(hardware: dispatch failed, E_INVALIDARG), passes hereemit::stride_tests::a_heap_buffer_read_by_element_takes_the_views_stride: still fails, same output as onmainemit::synthetic_tests::gathers_at_a_level_match_the_hardware: still fails, same output as onmainBoth fail on the hardware pass, so their WARP pass never runs. Neither changes with this PR, so they don't look related to the heap cap.
Unrelated and also on
main:watch::testsflake whenmemory::testsruns in parallel. With this PR,cargo test -p victory-gpu --libfailed 1 run in 10 (writes_through_another_mapping_mark_the_tracker). Onmainit was 3 in 8. With--test-threads=1: 80 passed, 0 failed. No hangs, device removals or driver resets during any run.@fiestorra on GitHub · 2026-11-24 23:59 UTC · original
Measured on an RTX 4090 on top of the other three fixes: same 2,048 frames in 76 s instead of 94 s
I had this branch built and ran it, because the question it answers is the one that decides whether the capped heap is worth attention: does removing the 310,720 slots past the cap change throughput?
Build:
main70564ae+ #1778 + #1832 + #1630 + this branch (a63eb93),diagwith the D3D12 debug layer and DRED, session 1, real window 3840×2160, empty cache, RTX 4090 (driver32.0.16.2124), 120 s.title slot past the host heapno room for the null buffer viewsmainThat is ~21.8 fps → ~26.9 fps for the same frames, about 23% more, and it is the only change of the four that moves the pace: #1778 and #1630 together are within a second of #1832 alone.
Two caveats, because the number is better than my evidence for it:
On this machine the branch also removes
no room for the null buffer views, which is what makes the null views exist at all, and it takes the slots past the cap to zero — both of which I could confirm independently of the speed.No game data is involved: counters, timings and warnings only.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 00:10 UTC · original
Repeated, alternating, three runs each: 93–95 s without this branch, 70–76 s with it
My earlier comment said the 17-second difference was one run each and not a distribution. Here is the distribution — both builds kept as executables and run alternately, same card (RTX 4090, driver
32.0.16.2124), samediagbuild flags with the debug layer and DRED, session 1, empty cache, 120 s per run, measured asframe=1→frame=2048from the log's own timestamps:The ranges do not overlap: 93–95 against 70–76. That is about 34% more frames per second for the same 2,048 frames, not the 23% I estimated from a single pair, and the jitter within each build is a couple of seconds.
The mechanism it belongs to, from the same runs: without the branch the log says
host view heap capped at 1000000and 310,720title slot past the host heapwithno room for the null buffer views; with it, all three are 0.Two limits I want to keep attached to the number rather than argue later:
No game data is involved: timings, counters and warnings only.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 00:29 UTC · original
Correction to the numbers I gave earlier: they measure a static screen, not the world
The 93 s to 95 s against 70 s to 76 s I reported above is real, but I have to say what was on the screen while those frames were counted: one image, repeated. I captured the frames of the same build today (
VICTORY_CAPTURE,diag, session 1, same card and driver) and every power-of-two frame from 256 onwards is byte-identical — and it is the profile selector, a dark screen with white text, waiting for a key.So the honest version of the finding:
To get past the profile selector the run has to press keys, and with
VICTORY_KEYSthe picture does change (the loading artwork appears, 75,654 distinct colours in the captured frame), which is how I noticed — the earlier runs had no scripted input at all.If you want a number that speaks about the world rather than a menu, that needs the world to be reached first, and on this machine the menu sequence is as far as I can drive it today.
No game data is involved: frame statistics and counts only.
Written with an AI assistant.
@Marvisak on GitHub · 2026-11-25 01:36 UTC · original · edited 2026-11-25 15:56 UTC
Automated triage for the maintainers.
This pull request no longer merges cleanly into
main(conflicts incrates/victory-gpu/src/descriptor/host.rs,crates/victory-gpu/src/draw.rs,crates/victory-shader/src/emit/lower.rs,crates/victory-shader/src/emit/mod.rs,crates/victory-shader/src/emit/shader.rs,crates/victory-shader/src/emit/stride_tests.rs). It will be reviewed once it is rebased onto the currentmain. The earlier verdict (merge candidate) was for an older state ofmain.Generated by Claude Code
@fiestorra on GitHub · 2026-11-25 01:58 UTC · original
Your branch conflicts with today's
mainin four files, and that is now the only thing between your fix and a green checkI tried to measure your branch on top of
main940d32f(the version with page marking and copy-back) together with the three fixes I have open, and it does not merge:GitHub agrees — the pull request shows
mergeable: false.Why I care: yours is the fix for the one symptom of #1952 that nothing of mine touches. Measured on
940d32f+ my three (#1778, #1832, #1630), release, session 1, RTX 409032.0.16.2124, 70 s:— the removal and the missing texture are gone, the cap and the slots are untouched, and that is exactly your ground. On this machine yours is the difference between a queue where the third symptom is fixed and one where it is not; when I could merge it before, it also took the slots past the heap from 310,720 to 0 and the same 2,048 frames from 94 s to 70 s (three alternating runs each, ranges 93–95 against 70–76).
I am not asking you to rebase for my sake, and I am not opening a competing branch for the same thing: three other pull requests (#1777, #1751, #1770) are also on this ground and the maintainer does not need a fourth. What I can offer is a resolved merge, if that helps — say the word and I will push a branch that is your commits rebased onto
940d32fwith the conflicts resolved mechanically, and you can take it or ignore it.No game data is involved: file names, counts and warnings.
Written with an AI assistant.
@fiestorra on GitHub · 2026-11-25 02:02 UTC · original
I offered to resolve the rebase; I tried, and it is not mechanical — here is exactly what collides
Correcting my own offer from the comment above: I said I could push your commits rebased onto
main"with the conflicts resolved mechanically". I attempted it, and the four conflicts are semantic, not textual, so a mechanical resolution would produce something neither of us wants. Aborted, nothing pushed.What collides, file by file (
main940d32fagainst youra63eb93):crates/victory-shader/src/emit/shader.rsandemit/mod.rs—mainnow has a view-mark system (VIEW_MARKS,VIEW_WRITES,VIEW_MARK_NONE,VIEW_WRITE_BITS, at4/u1pair inMEMORY_SPACE) that your branch does not have, and your branch has dynamic heap sizing (heap_views(),title_views(),set_view_heap(),null_buffer_view()) thatmaindoes not. The two are not alternative spellings of the same lines: they both add constants and both change what a translated shader bakes in, so the merged file has to decide both systems' constants and the order they are set in.crates/victory-gpu/src/shader_cache.rs—maincallstranslate_with(c, Options { view_marks: true }); your branch callstranslate(c)and, before it, forces the host so the heap sizes are known. A merged line has to betranslate_with(c, Options { view_marks: true, .. })after the host is made with your heap sizing — which means yourOptions/heap_views()shape must survivemain'sOptionschange, and that is a design decision, not a merge.crates/victory-gpu/src/descriptor/host.rs—mainadded the write-mark plumbing to the same heap-creation and view code that your branch rewrites around the cap; the two touch the same functions with different purposes.So the rebase needs someone who knows both changes — which is you, or the maintainer. What I can usefully give instead:
32.0.16.2124): on themainbefore these two commits, your branch tooktitle slot past the host heapfrom 310,720 to 0 and the same 2,048 frames from 94 s to 70 s (three alternating runs each, 93–95 against 70–76, ranges not overlapping). That is the only one of the four heap pull requests I have measured.main940d32fplus the three fixes of mine: device removal gone,no host texturegone, 1,024 frames presented — and the cap plus the 310,720 slots still there, exactly as your branch fixes them.shader_cache.rsis the one that decides the shape of the rest.If you would rather hand it over, say so and I will take the rebase on as a branch of mine with your authorship kept — but I am not going to guess at the
Optionsdesign in your place.No game data is involved: file names, constant names and counts.
Written with an AI assistant.
@astrosteveo on GitHub · 2026-11-25 02:51 UTC · original
I rebased this onto
940d32fwith your commit and authorship kept, in case it saves you the work: https://github.com/astrosteveo/VIctory/commits/rebase/1779 (one commit,b6a9be4).How I resolved the four conflicts:
shader_cache.rs:translate_withwithview_marks: trueas onmain, and yourhost()call before the cache key and the translation.emit/shader.rs,emit/mod.rs: both sets of items;null_buffer_view()replaces the constant.descriptor/host.rs: both tests; the write-mark table merged on its own.The write marks are what I looked at hardest. I read the code for this, no test covers the two together:
heap_handlegot, which is after your redirect and clamp, so it looks up the slot it writes.HEAP_VIEWS, so every index belowheap_views()is inside them.mirrorreturns before it sets a stride or a mark for a title slot past the mirrored ones, so those can't overwrite the entries of the host's own slots there.Tested on an RTX 5080 (driver 620.73.04), MinGW build under Wine 11.22 with vkd3d-proton 3.1, no game data:
--lib -- --test-threads=1main940d32fvictory-gpuvictory-shaderNow passing:
dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros. The 6 left also fail onmainhere. Clippy forx86_64-pc-windows-msvcwith--all-features: clean.cargo xtask policy: ok.Not tested: Windows, a host that takes 2^21 slots, and the title. Take it or leave it; I'm not opening a competing PR.
AI-assisted (Claude).
@astrosteveo on GitHub · 2026-11-25 03:57 UTC · original
Follow-up to my rebase: the write marks now have tests, in https://github.com/astrosteveo/VIctory/tree/test/1779-write-marks (
ad8396d, onb6a9be4). No bug found.title_views()lands nowhere and sets no bit, with a real view and mark entry at that index. Without the bound, the same write lands and marks.Each fails when I break the redirect (shader) or make
mirrorwrite the entries (host).One interaction: the view-address table has one entry per mirrored slot, so it shrinks to 721,469 here, and tables made afresh index past it. #1906 fixes that. The two merge cleanly after its rebase: https://github.com/astrosteveo/VIctory/tree/test/1779-1906.
RTX 5080, driver 620.73.04, Wine 11.22, vkd3d-proton 3.1.
victory-gpu143 passed, 3 failed;victory-shader245 passed, 3 failed; the 6 also fail onmainhere. Not tested: Windows, the title. AI-assisted (Claude).@wbkepler on GitHub · 2026-11-25 06:16 UTC · original
Updated to
1890db5(one commit, still on70564ae): the title's slots past the host's are no longer cut off, they are remapped.A run on a host capped at 1,000,000 view descriptors showed that cutting the title's heap short cannot work: the title's heap is larger than the host's and sparse, with live views and the tables its draws read spread over all of it, so any cut loses views (the previous head presented black frames).
What changed:
maindoes for tables past a cut.Verified on Windows 11 with an NVIDIA GPU capped at 1,000,000 slots: clippy with
-D warningsclean forvictory-gpu,victory-shaderandvictorywith diagnostics;cargo test -p victory-gpu81 passed;cargo test -p victory-shader208 passed and the two failures #1744 reports formainon this kind of GPU;cargo xtask policyok. A live run on that host (with #1775 and #1778 merged locally, which boot needs there) renders the menus: non-black frames from frame 256 on, 13 draws a frame, no device removal, no view left without a host slot, and 192 to 255 of the 703 blocks in use. The world is not checked.Still open: the branch conflicts with current
main(the view-mark table fromcd94d35is another per-slot table that has to follow the host slot), so it needs a rebase; and nothing is evicted when every host block is taken (those writes are counted in a warning).AI-assisted (Claude Code); checked on Windows 11 / RTX 5090.
@wbkepler on GitHub · 2026-11-25 06:38 UTC · original
Rebased onto
main940d32f: now9323a74, still one commit. Thanks @fiestorra for the conflict list and @astrosteveo for the rebase and the write-mark read, which matches what I found.How the view-mark table (
cd94d35) is handled. It is kept by host slot, the same as the stride table and the view addresses:view_index, recorded inheap_handle) comes afterhost_index. So for heap-direct descriptors it is already the host's slot (blocks[index >> 10] + (index & 1023)), and for tables it is the host offset the table was given.mirrornow enters the mark atslot, not at the title'sindex(make_marked(&view, self.cpu(slot)), thenset_mark(slot, mark)).make_atand root raw views were already writing at host dynamic slots.make_null(slot)when its view goes, and that now clears the mark at that host slot as well as the stride. A reused host block therefore starts unmarked. The block test checks this.max(title count, HEAP_VIEWS)entries, so it covers every host slot of a capped heap.Other conflicts:
shader_cache.rsusestranslate_with(.., Options { view_marks: true })afterhost()and keys on(views, blocks).emit/mod.rsandemit/shader.rskeep both sets of items, withnull_buffer_view()replacing the constant. I checked the heap changesmainmade since70564ae(dynamic wraparound/cursor, the descriptor-as-data and stride paths). The heap-direct index computations in the translator all go throughheap_index/lane_heap_index→host_index. The new upstream testdynamic_search_can_find_a_run_across_the_cursorassumed dynamic slots start at 4. It now usesheap.count(), like the sibling test, because on a capped host they follow the title block and the null block.Checked on Windows 11 / RTX 5090 (capped at 1,000,000):
-D warningsis clean forvictory-gpu,victory-shader, andvictory --features diagnostics.cargo test -p victory-gpu: 146 passed, 0 failed.cargo test -p victory-shader: 246 passed, 2 failed (a_heap_buffer_read_by_element_takes_the_views_stride,gathers_at_a_level_match_the_hardware). Both fail the same way on plain940d32fon this host.cargo xtask policyis ok.Not re-run live after the rebase. Marked copy-backs through remapped blocks still need a run on a capped host.
AI-assisted (Claude Code); checked on Windows 11 / RTX 5090.
@LocranKing on GitHub · 2026-11-25 07:29 UTC · original
Tested the rebased head
9323a74(onmain940d32f) on an NVIDIA GeForce RTX 3060 Ti 8 GB (Ampere, wave32, driver32.0.16.1088), AMD Ryzen 5 5500, 32 GB RAM, Windows 1110.0.26300, Rust1.98.1.1. Capped-heap unit tests (NVIDIA 1,000,000 view heap limit)
main940d32f940d32f+#1779(9323a74)victory-gpudescriptor::host::tests::dynamic_slots_are_held_until_releasedNumDescriptors < HEAP_VIEWS)victory-gpumemory::tests::lists_share_a_table_and_copies_keep_their_viewspast the dynamic slots)victory-shaderemit::stride_tests::a_heap_buffer_read_where_no_buffer_view_is_reads_zeros0x80070057)2. Title run (Series 1.0.2.1,
diag --features diagnostics,VICTORY_D3D12_DRED=1)main940d32fremoves the device at frame 128 (~16 s) with0x887A0001(#1754).main940d32f+#1763(50d91b1) +#1630(3c036f7) +#1778(ba67548) +#1779(9323a74) merges cleanly and runs the full 50 s timed boot/menu test with 0 device removals, 0title slot past the host heapwarnings (was ~310,720 onmain), 13,612 buffer views, and 1,907 title-written textures.#1762(19c8013, structured buffer views as raw views) currently conflicts with this branch incrates/victory-gpu/src/descriptor/host.rs.AI use: Antigravity (Gemini 4 Carbon) ran the builds and tests on my machine and drafted this report; checked before posting.
@Mericas77 on GitHub · 2026-11-25 07:38 UTC · original
Re-tested the rebased head
9323a74on the same RTX 4070 (12 GB, driver 621.01, Windows 11 26300), againstmain940d32f.cargo test --workspace --locked --no-fail-fast:main940d32f9323a74-p victory-gpu -- --test-threads=1Fixed on this card:
dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_viewsanda_heap_buffer_read_where_no_buffer_view_is_reads_zeros. The two left area_heap_buffer_read_by_element_takes_the_views_strideandgathers_at_a_level_match_the_hardware, the structured-view issue that #1762 addresses. Each fails 3 out of 3 when run alone, so they're consistent, not flaky.shadow::tests::marked_pages_go_back_by_the_bytes_the_gpu_changedpasses. No hangs, device removals or driver resets.This head conflicts with #1762's
19c8013indescriptor/host.rs,emit/lower.rs,emit/mod.rs,emit/shader.rsandstride_tests.rs, so I couldn't test the two together.@fabianocoder on GitHub · 2026-11-25 16:35 UTC · original
Tested on NVIDIA GeForce RTX 3060 12 GB (driver 610.88, Windows 11).
cargo test -p victory-shader -p victory-gpu --lib --locked --no-fail-fast -- --test-threads=1940d32f)9323a74)All three PRs fix the heap-cap failures (
dynamic_slots_are_held_until_released,lists_share_a_table_and_copies_keep_their_views,a_heap_buffer_read_where_no_buffer_view_is_reads_zeros). The two remaining failures are the structured/raw fixtures that #2357 fixes; with both PRs the suites are fully green on this card.@EgoraWyn on GitHub · 2026-11-26 14:57 UTC · original
Data point from a different approach to the same 1,000,000-view cap. This is a port of ScarlettPort's "VIcky" heap map onto a cool_fox-based branch:
Results on an RTX 3060 Laptop 6 GB (Windows 11), warm caches, 120 s window after the first frame with ≥1000 draws, one run each:
host view heap capped at 1000000; views past it read a null slot count=1245184no longer appears. No pool slots were refused and nothing crashed.Happy to share the diff if it's useful as a cross-check.
@catminou4 on GitHub · 2026-11-24 23:03 UTC · original · reviewed
Static review only: victory-gpu is Windows-only (D3D12/windows_sys) — nothing compiles or runs on macOS; source review of the diff.
View heaps work on hosts capped below 2^21 descriptors: 37K diff gpu+shader — largest of this cluster with #1777; both touch heap sizing, possible overlap/conflict between them.
@pes7 on GitHub · 2026-11-26 15:22 UTC · original
The shader-side half of this is #2683, and it is
MERGEABLEwith green CI. It does not try to give a capped host more descriptors — it makes sure a shader never names a slot that is not there:HEAP_VIEWS(1 000 000), so on a host whose heap is capped at that, the clamp names a real slot;small_request(count, views)asks for(count + MIN_DYNAMIC).max(HEAP_VIEWS)— the previous expression had no floor and 800 000 title views produced an 865 536-slot heap, so every index in 865 536..999 999 was out of bounds (review on the PR: title counts 737 856, 800 000, 934 464);capped_layout(count)takes the capped layout on every host once the title's slots plus the small dynamic range passHEAP_VIEWS, tier-3 included, so the layout and the clamp's bound are the same everywhere and the null buffer views keep the top of the heap.Tests pin both boundaries (
737 856 / 800 000 / 934 464fit and are asked for at leastHEAP_VIEWS;934 465 / 1 000 000 / 1 050 000take the capped layout whoseslots + dynamic + NULL_RESERVEcloses insideHEAP_VIEWS), and putting the old expression back fails them ("a heap of 65536 is short of the clamp 1000000").The trade is written beside the code rather than hidden: a title past 934 464 slots loses the slots past the clamp, because a dynamic slot above it would be unreachable by any shader anyway. If you would rather have runtime probing (make the largest heap the host takes and remap title slots onto it), that is the other design — #2650 is the full title-slot/host-slot mapping for it, and it is a bigger change than this clamp.
Related but not covered here: #744 (sampler heaps capped at 2048) is a different heap with its own limit.
View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.