Repository navigation
Conversation
|
On an NVIDIA host with the 1,000,000 cap: RTX 3070 8 GB, driver 616.56, Windows 11, debug,
AI-assisted (Claude Code). Synthetic tests only. |
|
Tested on Windows with AMD Ryzen 5 5600X + NVIDIA GeForce RTX 4060:
Both previously failing descriptor heap tests ( |
VIctory V2: community PRs, merged and testedOpen 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). 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: Unofficial community fork of Marvisak/VIctory, GPL-3.0. |
catminou4
left a comment
There was a problem hiding this comment.
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.
|
Question: title slots cut to 721,469 for every heap on a capped host
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, Static review (AI-assisted), read against |
|
Tested
#1744's five on this card:
Both 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 |
|
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:
That 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 game data is involved: counters, timings and warnings only. Written with an AI assistant. |
|
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
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 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. |
|
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 ( So the honest version of the finding:
To get past the profile selector the run has to press keys, and with 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. |
…ak#1835) `Stride::Structured` made a structured SRV (`DXGI_FORMAT_UNKNOWN` with a `StructureByteStride`), while the GPU host makes every buffer view it hands a translated shader raw (`victory-gpu`, `descriptor::host`: R32_TYPELESS, stride 0, `D3D12_BUFFER_SRV_FLAG_RAW`). The element size reaches the shader through the stride table, and the translated read is a byte-addressed load of the view. WARP ignores the view's stride for that load; NVIDIA applies it a second time, so `a_heap_buffer_read_by_element_takes_the_views_stride` and `gathers_at_a_level_match_the_hardware` read the wrong elements on the hardware device. The test host now makes the same raw view as the GPU host. On an RTX 2060 (Turing, driver 621.40), `cargo test -p victory-shader` goes from 206 passed / 3 failed to 208 / 1; the one left is the 1,000,000-view heap cap (Marvisak#1779 fixes it). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Automated triage for the maintainers. This pull request no longer merges cleanly into Generated by Claude Code |
|
Tested on NVIDIA GeForce RTX 3060 12 GB (driver 610.88, Windows 11).
All three PRs fix the heap-cap failures ( |
…n: capped view heaps with lazy placed-texture views Marvisak#1779's head 9323a74 on main 13f91ca. Conflicts with today's main resolved: - descriptor/host.rs mirror(): main's flow (placed textures made lazily when a draw reads them, prepared outside the slot lock, the record re-read and the slot remade if the title wrote it meanwhile) with Marvisak#1779's mapping: host arrays (made, kept, strides, addresses, marks, CPU handles) by host slot, the title's bookkeeping (viewed, vacate) by title slot. - Shaders mark their reads by heap index, the host slot: make_read and evict map it back with the new HostHeap::title_of. evict looks the title slots up before locking made, since mirror takes the blocks' map first. - The view-address buffer: main's 16-byte entries, for every host slot under blocks (Marvisak#1779), else the title's. - draw.rs, lower.rs, mod.rs, shader.rs, stride_tests.rs: both sides' items. Co-Authored-By: wrothgaril <211408787+wrothgaril@users.noreply.github.com> Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_011f6R3kMoarujHzzA1AvSBb
… the version a63eb93 as in s20) GPU: view heaps on hosts capped below 2^21 descriptors, the version of a63eb93 (wrothgaril, on 70564ae) that was in test/nv3 and f7/bundle: a capped heap mirrors the title's first 721,469 slots in place (title slot = host slot), 2^18 dynamic slots, 2^14 pair slots, null views at the end; shaders clamp below heap_views() and read null past title_views(). No blocks, no view-block table (that is Marvisak#1779's newer head 9323a74, which regressed in run 20261125-185042). Conflicts, both sides kept: main's view marks/read marks/VIEW_* consts beside heap_views()/title_views()/null_buffer_view(); buffer_guard does the title clamp first, then Marvisak#2342's clamp_view_index (below heap_views()) and the stride lookup; shader_cache: main's view_marks options and Marvisak#1890's cache() with this version's host_build(views, title); draw.rs fresh_range (main moved the fixed-function helpers); descriptor tests of main and this version. Ported from 48ba524 (Marvisak#1779 in the version active in s20 (a63eb93 port), not its head 9323a74; on main, whose own cap at 1,000,000 left about 310,000 title slots past the host heap per run (senior 24, main24); Host::from_device as on main).
Problem
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 onmainat 70564ae: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 RX 9060 XT (RDNA4) | Host GPU device removed (DXGI_ERROR_DEVICE_HUNG) with page fault at 0x1a00b0000 in world #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(Test report: RTX 5070 (Blackwell), Windows 11, 70564ae: 471 passed, 5 failed, 7 ignored (4 from the 1,000,000 view heap cap) #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.mainsince 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 Test report: RTX 5070 (Blackwell), Windows 11, 70564ae: 471 passed, 5 failed, 7 ignored (4 from the 1,000,000 view heap cap) #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