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. Merge candidate (large; overlaps other open PRs). Rebased at Points for the maintainer:
Generated by Claude Code |
|
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 What collides, file by file (
So the rebase needs someone who knows both changes — which is you, or the maintainer. What I can usefully give instead:
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 No game data is involved: file names, constant names and counts. Written with an AI assistant. |
|
I rebased this onto How I resolved the four conflicts:
The write marks are what I looked at hardest. I read the code for this, no test covers the two together:
Tested on an RTX 5080 (driver 620.73.04), MinGW build under Wine 11.22 with vkd3d-proton 3.1, no game data:
Now passing: 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). |
|
Follow-up to my rebase: the write marks now have tests, in https://github.com/astrosteveo/VIctory/tree/test/1779-write-marks (
Each fails when I break the redirect (shader) or make 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. |
a63eb93 to
1890db5
Compare
|
Updated to 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:
Verified on Windows 11 with an NVIDIA GPU capped at 1,000,000 slots: clippy with Still open: the branch conflicts with current AI-assisted (Claude Code); checked on Windows 11 / RTX 5090. |
A host that makes no shader-visible view heap of HEAP_VIEWS slots (NVIDIA: 1,000,000) had shaders index past its heaps, a small dynamic range, and no room for a title heap larger than its own. - The host says how large its view heaps may be (Host::view_heap_limit, emit::set_view_heap): view heap indices are clamped below that and the null buffer views lie two below the end. A host that takes 2^21 slots is told nothing and translates as before (same DXIL). The shader cache and the pre-build tag key on the values where they differ. - A capped heap holds the title's slots by blocks of 1,024: a block gets a host block when the title first writes a view into it and gives it back with its last view, so a sparse title heap of any size fits in the slots the host has (703 blocks beside 2^18 dynamic slots, 2^14 for view pairs and the null views). Shaders taking descriptors from the resource heap itself turn the title's index into the host's through the view-block table (root SRV VIEW_BLOCKS: one load, a shift, a mask and an add; emitted only for such hosts). Tables are told where their first used entry lies on the host; one whose slots are not in one run there is made afresh in dynamic slots, as before. - Tables made afresh take slots from their first used entry on. Tests: the capped layout and its dynamic slots, pairs and null views; a capped heap holding a larger title heap by blocks (a view far past the host's slots found through the block table and through a table, blocks given back, a full heap); a translated shader reading through the block table; the shader cache key. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
1890db5 to
9323a74
Compare
|
Rebased onto How the view-mark table (cd94d35) is handled. It is kept by host slot, the same as the stride table and the view addresses:
Other conflicts: Checked on Windows 11 / RTX 5090 (capped at 1,000,000):
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. |
|
Tested the rebased head 1. Capped-heap unit tests (NVIDIA 1,000,000 view heap limit)
2. Title run (Series 1.0.2.1,
|
|
Re-tested the rebased head
Fixed on this card: This head conflicts with #1762's |
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