Repository navigation
GPU: report the view heap sizes when the host caps one - #35
WallasSCRIPTS wants to merge 1 commit into
Conversation
|
Thanks, the heap-creation report (asked for / made / lost) is useful. Since #21 landed, |
4974271 to
756ea50
Compare
|
Picked one: dropped the per-read report and kept the creation-time sizes Rebased onto
|
The cap warning only said how many descriptors the host made, so a capped NVIDIA heap gave no clue how many title slots were lost. Report what the title asked for, what the host made, and the difference. This replaces the earlier per-read report: main now logs the highest past-heap slot in mirror() and Marvisak#21 remaps the root tables that reach it, so a second report of the same reads would only overlap. docs/view-heap-limit.md is updated for Marvisak#21 landing: root tables are remapped, State::tables makes tables afresh for a CBV or a past-cap entry (no descriptor-count rule), and Marvisak#16 is an RTX 5070 Ti. The sampler heap's 2,048 limit is left as a separate issue. Verified with cargo check -p victory-gpu --all-targets and cargo test -p victory-gpu (36 passed).
756ea50 to
df40f86
Compare
|
Tested |
|
Thanks, the new version reads well, and the doc matches main now. One small heads-up: if #135 lands, the capped heap keeps Static review, not built or run. |
|
Superseded by #21 (merged), which makes tables past a capped host view heap afresh: the hang this diagnosed is now fixed rather than logged, so the reporting here has nothing left to say on a capped heap. This branch is more than a hundred commits behind main. Its one piece nothing else carries is |
DispatchX(x, y, z, flags) with bit 5 of the console's dispatch initiator (USE_THREAD_DIMENSIONS, 0x20; 0x8020 for 32-lane programs) gives thread counts, not group counts. The flags were dropped and the counts run as groups: the ray-tracing structure builder, which dispatches this way, ran up to 64 times over and its box stages wrote empty nodes past their structures into the title's own objects (2.2 GiB in one frame of a failed run). That is the likely cause of the fault seconds after the first 3D frame with VICTORY_BVH_BUILDER=1. The host now runs ceil(threads / numthreads) groups per axis, from the console program's group size (Translated::threads). A partial last group runs whole: cutting its extra threads needs the thread count in the translated program, which victory-shader has no place for yet. The first such dispatch and every partial one are logged, and the frame line counts them. Sources: fxceless/victory-fork PR Marvisak#646 (mynzjerko; the conversion and its test) and PR Marvisak#994 (PiloteCode), DexNom/VIctory bc3cd4b and PR Marvisak#35, uiliannn/VItoriaBr 633ba6e, all GPL-3.0 forks of VIctory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…e count DispatchX with USE_THREAD_DIMENSIONS counts threads; the console then starts only the threads up to the count in the last group, its other lanes off in EXEC from the start. Since 3c92819 the host ran the groups that hold the threads, but the last one whole: its threads past the count ran too (the "shortcut" in State::dispatch). Every program of the structure builder (a spilled user-data table, the programs that dispatch this way) now gets two instructions in front of its code: v_cmp_gt_u32 vcc, ttmp15, v0 and s_and exec, exec, vcc. The trap temporary is a new compute input, the threads left from the group's first on: the dispatch's thread count (user data of the new kind USER_DISPATCH_THREADS, which the host sets per dispatch, u32::MAX for one of whole groups) less the group id times the group's width, none past the count. The title's code runs unchanged behind it, so its lane counts, saved EXECs and scans that turn every lane on see the lanes the console's would, in every form the translator has; in the paired form (wave64 programs on 32-lane hosts, VICTORY_WAVE_PAIRS) the upper lanes take their own console thread ids. No thread leaves early, so every barrier is reached as before. A card test runs a 64-lane program in the paired form and a 32-lane one over two groups for 13 counts: each lane adds its wave's s_bcnt1 of EXEC, and only the launched lanes add, counting only launched lanes. The frame line now says how many partial groups were cut and how many still run whole (a program without the entry code, or a group partial in y or z, whose rows the builder does not have). Only the builder's programs change (all 52 still emit, validate and get pipelines with VICTORY_HOST_WAVE=32); they run only with VICTORY_BVH_BUILDER=1. The shader cache must be warmed again. After DexNom/VIctory PR Marvisak#35 (pr0vId3nce: EXEC masked by instructions ahead of the program), with the count through a trap temporary instead of a load of the spilled table; the host word as fxceless/victory-fork PR Marvisak#994 (PiloteCode) and uiliannn/VItoriaBr 633ba6e pass it. All GPL-3.0 forks of VIctory. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Relates to #16 and #11.
What
When the host cannot make a view heap as large as the title asked for, it
caps it and keeps
PORTABLE_VIEWS - DYNAMICslots. The warning named onlythe resulting size, so the number of title slots lost was invisible. This
reports three numbers at creation: what the title asked for, what the host
made, and the difference.
The earlier version of this PR also reported out-of-range reads from
mirror(). Onmain,mirror()already logs the highest past-heap slot,and #21 remaps the root tables that reach past the cap. Two reports of the
same reads would overlap, so that part is gone. One report, one place.
Doc corrections
docs/view-heap-limit.mdnow reflects #21 landing: root tables are madeafresh in the dynamic area,
State::tablesdoes that when a table holds aconstant buffer or an entry past the host heap (there is no 16-descriptor
rule), and #16 is the RTX 5070 Ti report, not the RX 7600 this was built on.
The sampler heap's 2,048-entry limit is left for a separate issue.
Verification
Static review only; no NVIDIA host here.
mainat97c78d1, after GPU: make tables past a capped host view heap afresh (NVIDIA menu hang) #21 landed.cargo check -p victory-gpu --all-targets: clean.cargo test -p victory-gpu: 36 passed, 0 failed.rustfmt --edition 2024clean; the file haspre-existing formatting drift elsewhere.