RTX 5080 on 4e17478: 8.5 fps in the lit cutscene; 40 of 63 ms GPU time is 3,227 indirect draws a frame (~12 µs each) #107
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/fxceless--victory-fork#107
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
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?
@ThiagoAlexsander on GitHub · 2026-11-24 21:32 UTC · original
RTX 5080 (Blackwell) on
4e17478: 8.5–8.7 fps in the lit opening cutscene with #31's switches.VICTORY_GPU_TIMINGputs 40.5 of the card's 63 ms a frame in 3,227 indirect commands (about 12 µs each). Numbers only; no assets.Setup
4e17478,cargo build --profile diag -p victory --features diagnostics(rustc 1.98.1 fromrust-toolchain.toml). Series X profile, warm cache.VICTORY_DISPLAY_MODE=1920x1080 VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024.VICTORY_KEYS. Each run was 300 s, and the numbers are from the last 300-s report, in the dusk shot of the opening cutscene.Runs
4e174784e17478+ #45 #47 #48 #49 #63 #67The six PRs give about 3%, inside run-to-run noise on this machine. The card logs as about 64% busy ("nothing of ours queued 45.7 ms").
An earlier run on
4e17478with onlyVICTORY_RELAY=2ended at 129 s with device removed. One submission of 11 lists took 5,118 ms, past the default 2 s TDR.Timing run (the second build, plus
VICTORY_D3D12_DRED=1 VICTORY_GPU_TIMING=1, 300 s):the card's time by command … 63.3 ms a frame.[compute 14264103296aa43a][mesh b7a81f5b96f4ca93, pixel 43e24028d4a1faef][mesh 3a087a87f2a2ad3c, pixel 89069e131eabee03][mesh 30332cf87c4e0eae][mesh 41746154e1045330, pixel 1b76a3859a228436][mesh 8f690b0f5dbbce02, pixel 271a87c54ac648a5][compute 36f04a4ed0ad1d9b][compute cb6adcc6da2613ff]Reading: in this scene the card's time is mostly the number of indirect mesh draws, 200–335 a frame per pipeline at about 0.02 ms each, rather than a few heavy programs.
indirect.rsbuilds single-argument command signatures (NumArgumentDescs: 1) and runs a clamp pass per execution. If the console's executions carry several records each, or a root constant per record, and are run here one record at a time, that alone would explain the count. I haven't confirmed which it is.Upstream VIctory has open work on this: #956 and #1160 (multi-argument signatures with root constants), #242 (count-buffer-aware, non-destructive clamping), #1382 (batched barriers, reused draw scratch buffers), and issue #740 (an indirect draw-stream compaction pass). All four PRs conflict with this fork's
draw.rs/indirect.rs/list.rs, so none merged cleanly here.Not tested: the prologue gameplay scene (these runs stopped in the cutscene), AMD, and whether the counts differ with
VICTORY_RELAYoff.AI use: Claude Code (Claude Opus 5.5) ran the builds and runs and wrote this report. Posted with my approval.
@ThiagoAlexsander on GitHub · 2026-11-24 21:34 UTC · original
Correction to my reading above. The draws are not run one record at a time. The same timing run logs only 2 dropped indirect executions a frame (dropped … and 2 indirect), and the 4 signatures it names are single-argument with
max=1(stride=12 args=[[2, 13, 0, 0]],[[10, …]],stride=16 args=[[0, …]],[[105, …]]). So multi-argument support (#956/#1160) would change little in this scene.The 3,227 indirect commands a frame look like separate executions from the title. The cost to look at is then per execution: the clamp pass and its barriers before each one, plus the host
ExecuteIndirectitself. Upstream #242 (non-destructive, count-buffer-aware clamping) and #740 (a compaction pass for the whole indirect stream) aim at that overhead, not at signatures.AI use: Claude Code (Claude Opus 5.5); posted with my approval.
@ryotdev on GitHub · 2026-11-24 21:38 UTC · original
An RTX 5070 data point from
4e17478, Windows, 2560×1440, one restored world checkpoint at frame 2000. The capture logged 2,944 meshExecuteIndirectcalls withmax=1. That is one command record per call. The mesh-group count comes from the record.I grouped numbered operations by host command-list ID and broke every sequence at every logged queue submission. In 2,715 pairs the next logged operation on the same list was another one-record mesh call. In 2,281 of those pairs the argument address advanced by a multiple of 4 between 12 and 256 bytes inclusive. A 32-byte step accounted for 1,914 pairs. This is an upper bound on the adjacent pairs in that subset that could pass a walking-address check. The capture omits some resets and doesn't establish matching shadow buffer/signature stride, absence of a count buffer, or absence of shader writes. Actual window hits need runtime counters.
I'd measure GPU timestamps around the clamp dispatch and its barriers separately from the host
ExecuteIndirectand mesh work on a sample of calls. That would tell us how much time batching the clamps could actually recover. Any batching test should charge only the records requested, in call order, and preserve clipping of oversized records.AI-assisted trace analysis. Counts are from a single frame.
@ryotdev on GitHub · 2026-11-24 21:56 UTC · original
On RTX 5070 I measured the argument clamp and the mesh execution separately. This was the restored prison checkpoint at +200 frames, on
4e17478with diagnostics-only instrumentation. Windows, driver 610.88, native D3D12, 2560×1440, non-relay. I sampled one in 16 qualifying mesh calls with max=1. Instrumentation and four synthetic tests.In reporting intervals averaging at least 1,000 mesh calls per frame there were 510,328 calls over 175 frames. All 31,896 selected calls had valid paired timestamps. Across all 20 reporting intervals the means were 3.535 and 11.456 µs. The clamp accounts for 23.62% of the two measured intervals in the heavier sample. Resource refresh, graphics setup and scratch release sit outside those endpoints. The timestamp mode waits for each list, so that fraction cannot be interpreted as recoverable frame time.
To reproduce, build the linked revision with
cargo build --profile diag -p victory --features diagnostics, setVICTORY_MESH_PHASE_TIMING=1,VICTORY_GPU_TIMING=1,VICTORY_D3D12_DRED=1, and includevictory_gpu::mesh_timing=infoinVICTORY_LOG. LeaveVICTORY_INDIRECT_WINDOWunset. I used late-wait profile 3, wide-back, joined rehash runs, and a 1 MiB minimum / 1024 MiB budget for card buffers. Timing mode serializes submissions.@ThiagoAlexsander on GitHub · 2026-11-24 22:07 UTC · original
Follow-up:
VICTORY_INDIRECT_WINDOW=1works here, but the frame time does not change. The cost of each indirect draw is not the clamp pass.Same machine, settings and scene as above. The build is
4e17478+ #45 #47 #48 #49 #63 #67.FPS with the switch (300 s, last three reports): 8.9 / 8.2 / 8.7 fps, GPU 64.5 / 67.5 / 66.8 ms. Without it: 8.7 fps, GPU 66.8 ms. The difference is within noise.
Counters. To see whether windows open in this scene, I added local counters in
draw.rs(not part of any PR). They sit around thewindowed/hit/walkslogic and log once per 20,000 indirect draws. Over a 240 s run, the last three reports were:The misfits split evenly between steps shorter than the signature's stride (2,721 / 2,787 / 2,589) and steps that are too long, odd or changed from the window's (2,675 / 2,575 / 2,414).
Reading:
ExecuteIndirectitself, plus the state set between calls.windows()describes. They end windows early but would not change this conclusion.Dead ends on this machine, for whoever picks this up:
VICTORY_JOIN_COPIES=1: 8.0–8.6 fps, no gain.--console series-s: device removed at 74 s while loading (texture preparation 400–630 ms a frame), before the scene.Not tested: gameplay (the counters come from the cutscene), other GPUs, and an actual merge of executions.
AI use: Claude Code (Claude Opus 5.5) added the counters, ran the tests and wrote this. Posted with my approval.
@dkdknight on GitHub · 2026-11-24 22:11 UTC · original
RTX 5080, measured: neither the two waits around each clamp nor the number of clamp passes is the per-execution cost. Removing the waits changes nothing, and
VICTORY_INDIRECT_WINDOW=1halves the passes but makes the frame slower.Setup
--profile diag --features diagnostics) of4e17478+ #71 + #81 + #77 + #38, Series X profile.VICTORY_DISPLAY_MODE=1920x1080 VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024.VICTORY_BARRIER_TEST=indirectVICTORY_INDIRECT_WINDOW=1ExecuteIndirectwith its mesh / pixel work, and the transitions of the scratch buffer.Not tested: timestamps around the clamp alone (as ryotdev suggests above), other GPUs, release builds of B and C.
AI use: Claude Code, Claude Opus 5.5 built the binary and ran the three sessions on the machine above (the person at the machine loaded the save and stood still). It read the logs and wrote this comment.
@ThiagoAlexsander on GitHub · 2026-11-24 22:17 UTC · original
Can the indirect mesh draws be merged? Run lengths, same machine and scene.
I measured how many mesh indirect draws could share one execution, using the same local counters as above plus a hash of the root constants
bindsets (thevaluespassed toSetGraphicsRoot32BitConstants). The run hadVICTORY_INDIRECT_WINDOW=1, so consecutive records share a scratch buffer. Draws are counted by the length of the run they belong to; the last three reports of a 240 s run:Reading:
[root constants, DispatchMesh], which is the vkd3d-proton style. Upstream #956/#1160 already build host signatures with root-constant arguments, so that part can be reused even though their own aim (dropped multi-argument executions) changes little here.A sketch of the change:
ExecuteIndirectwith a count.If per-call overhead is what the ~12 µs per draw is, that could save roughly 20 of the 63 ms on the card here. I haven't measured that: it's an estimate, not something I ran.
Not tested: gameplay (these counts come from the cutscene), whether root CBVs/SRVs also change per draw (only root constants were hashed), and the merge itself.
AI use: Claude Code (Claude Opus 5.5) added the counters, ran the test and wrote this. Posted with my approval.
@dkdknight on GitHub · 2026-11-24 22:34 UTC · original
What changes between consecutive one-record indirect mesh draws: a descriptor table, every time. Merging them into one multi-record
ExecuteIndirectsaves ~30 ms of GPU a frame here, but only with per-record descriptor tables, which command signatures cannot hold.Setup: RTX 5080, release build of
4e17478+ #71 + #81 + #77 + #38 + #80 + #63. Same switches and spot as my comment above.1. Upper bound: merge, ignoring what differs (local experiment, not a PR)
VICTORY_INDIRECT_WINDOW=1, the first draw of each window drew all of the window's records with oneExecuteIndirect. It used a signature whose stride is the walk step and a count of the window's records. The later draws of the window were skipped.2. What differs (a local probe in
execute_indirect, ~180,000 one-record indirect mesh draws without a count buffer)Root parameters that changed between such pairs (index, kind, words that differ):
The same root index appears with different kinds because the pairs come from different root signatures.
3. What it means
ResourceDescriptorHeap[base + i]), with the table's first slot passed as a root constant. That constant then goes into the signature per record, next to the clamped dispatch arguments.AI use: Claude Code, Claude Opus 5.5 wrote the local experiment and probe, ran them on the machine above (the person at the machine loaded the save and judged the image) and wrote this comment.
@ThiagoAlexsander on GitHub · 2026-11-24 22:24 UTC · original · edited 2026-11-24 22:36 UTC
Summary for whoever (or whichever agent) picks this up: all RTX 5080 results so far, in one place
Build:
4e17478+ #45 #47 #48 #49 #63 #67. Settings from #31:VICTORY_DISPLAY_MODE=1920x1080 VICTORY_RELAY=2 VICTORY_LATE_WAIT=3 VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024. Scene: the lit opening cutscene.Unattended runs: how to repeat these numbers without touching the machine
diagnosticsbuild (cargo build --profile diag -p victory --features diagnostics) forVICTORY_KEYSandVICTORY_CAPTURE.VICTORY_KEYS=15:Enter,18:Enter,21:Enter,24:Enter,27:Enter,30:Enter,34:Enter,38:Enter,42:Enter,48:Enter,55:Entergets through the start screens into the cutscene. The first-run screens only show once.VICTORY_CAPTURE=<dir>saves frames, so you can check the scene without watching..git/info/exclude. Otherwisecargo xtask policyreports every build file as an asset-policy violation.Frame budget, ~118 ms (8.5–8.7 fps)
VICTORY_GPU_TIMING: 40.5 ms in 3,227 indirect executions, 19 ms in 430 dispatches)Ruled out here, with numbers above in this issue:
VICTORY_INDIRECT_WINDOW=1serves 57% of eligible draws from windows, and FPS doesn't change;VICTORY_JOIN_COPIES=1: no gain;--console series-s: device removed while loading.Levers, ranked by what the data supports:
[root constants, DispatchMesh]signature with constants gathered per record, the way vkd3d-proton batches draws; #956/#1160's signature code is the piece to reuse. The upper estimate is ~20 ms of GPU time a frame, not measured.VICTORY_WIDE_MERGE=1VICTORY_WIDE_MERGE=1 VICTORY_WIDE_REFRESH=1WIDEswitches make this machine slower. More gets copied back, and the GPU time rose too; I haven't found out why.WIDEswitches, is the next measurement.Not tested: gameplay, other GPUs, either lever implemented.
AI use: Claude Code (Claude Opus 5.5) gathered and wrote this from the measurements above. Posted with my approval.
@venglov on GitHub · 2026-11-24 22:55 UTC · original
A likely reason
VICTORY_INDIRECT_WINDOW=1didn't move the GPU time here: every indirect execution, including the ones served from a window, still ended with a barrier moving the clamped-arguments buffer back toCOMMON(indirect::done). So there was still a barrier between every two draws.#220 keeps that buffer readable between executions and moves it back once per list. It also adds a benchmark that needs no game files: 3,200 one-record indirect draws (the pattern from this issue), old and new barriers, clamped one at a time and in windows of 32.
On the GitHub runner's software adapter, window draws went from 17.0–17.5 µs to 5.9–6.2 µs each (GPU time −65 %). Draws clamped one at a time didn't change. That's software, though, so numbers from real cards would settle it. On the #220 branch:
It prints eight lines in a few seconds. If you also have the cutscene or prologue save from the runs above, an A/B of
VICTORY_INDIRECT_WINDOW=1onmainagainst #220 (same switches) would show whether it carries over to frames.AI-assisted (Claude Code); the numbers above are from CI, not from a GPU.
@arminkhaleghirod on GitHub · 2026-11-24 23:32 UTC · original
Looked at the indirect cost on an RTX 4080 (main
4e17478, Series X,VICTORY_WIDE_BACK=1 VICTORY_CARD_BUFFERS_MIN_MB=1 VICTORY_CARD_BUFFERS_MB=1024, held shot at the end of the opening cutscene, about 4,950 draws a frame).VICTORY_INDIRECT_WINDOW=1(off by default) brings that down to about 2,540. Of 100k calls: 51% hit the open window, 7% open a new one, 20% miss because the title jumps back or >256 B forward between runs of one argument buffer, 12.6% can't use a window (the shader stores to buffers), 6% have a count buffer or several records.VICTORY_GPU_TIMING=1: 145–148 ms a frame off, 127–130 ms on (one run each). Normal fps, 3 runs each: 2.77 off, 2.72 on. That's inside the ±10% run-to-run noise, so no fps gain I can show.Before extending windows or turning them on by default, I'd add a diagnostics mode that also clamps window hits fresh and compares the two on the card. That would find the untracked writer.
@venglov on GitHub · 2026-11-25 00:15 UTC · original
On the broken drawing with 16 windows per list: there may be a narrower cause than an untracked writer. Every window of a list clamps into the same scratch buffer at offset 0 (
HostList::indirect_scratchreturns the list's one buffer, and the clamp writes recordiati * stride). With several windows kept, opening a new one overwrites the records that an older window's later hits read, so those draws take another draw's arguments. That fits a missing body and face, and stretched triangles.With a single window, as on
main, that can't happen: every miss either replaces the window or clears it before it clamps (draw.rs,execute_indirect), so a hit always reads the output of its own window's clamp. Keeping several windows would need a region of the scratch buffer per window.Your fresh-clamp-and-compare diagnostic would still be the right check before windows go on by default. The cost picture changed in #220, though: with its per-group budget charge, windows went from 10.5 µs to 0.31 µs a draw in the benchmark on an RTX 3070. In-game on that card with
VICTORY_INDIRECT_WINDOW=1, a card-bound scene went from about 205 to 130–145 ms a frame with the picture intact (report).@dkdknight on GitHub · 2026-11-25 00:31 UTC · original
More measurements on where the gameplay frame goes (GTA VI, RTX 5080,
VICTORY_RELAY=2 VICTORY_LATE_WAIT=3, same spot as before, medians over 20 settled frame lines). Mostly negative results, posted so nobody repeats them.Baseline (main + #71 #81 #77 #38 #80 #63): 215-221 ms/frame = 116-118 ms preparing (copies ~64 ms / 130 MB, textures 4-8 ms), 77-81 ms on the GPU, 65-71 ms copying back 65 MB. The submitting thread stands waiting for the card 78-85 ms of each frame.
What that wait is. With
VICTORY_LATE_WAIT_LISTS=256the "lists in the air" settles go away and exactly one settle a frame is left, for "title memory read": a fill of upload memory of 480 bytes (a table constant view) whose source lies in a range a flight declares written. That range is one whole title buffer of 174 MB. The declaring flight is the last one in the line, so the wait is for the whole queue (72-92 ms).Who declares it.
readable()indraw.rs, for a table UAV covering the whole buffer, bound to compute pipelines. Three other whole buffers (90, 50, 36 MB) are declared the same way, thousands of times a frame.Three things that did not help:
VICTORY_INDIRECT_CLAMP=0: the title crashes at load, 2 of 2 (details on that PR).Also no gain: copying fills of up to 64 KiB in-process instead of through
ReadProcessMemory(preparing 118.6 ms against 116-118).What I take from it. The title has one large dynamic buffer that its CPU fills with per-draw constants while compute shaders write other parts of it, as on the console where it is one memory. Per-range declarations cannot tell the two apart, at any granularity that a view gives. As long as that buffer is a host copy, every CPU read of it behind a flight has to wait, or be guessed. It looks like a case for the buffer being in place (
inplace.rs; today the page pool's section is reserved, which the host refuses) or for the card saying which bytes it wrote, rather than for more rules about when to wait.Numbers are from our own runs; happy to share the diagnostic patches. (Measured and written with the help of an AI assistant, Claude Code.)
@dkdknight on GitHub · 2026-11-25 00:53 UTC · original
Follow-up to my last comment, where I guessed the big dynamic buffer was "a case for the buffer being in place". I tried it; on a discrete card it is not. Same setup (GTA VI, RTX 5080, relay 2, late wait 3, same spot, medians over 20 settled frame lines).
VICTORY_INPLACE_PROBE=1on the NVIDIA driver: everything is accepted. A reserved section is refused (0x80070057), a section made withSEC_COMMITopens, a cross-adapter UAV buffer places in it, the GPU reads and writes the title's bytes and the views can do what they like. 64 MB of committed section opens in 5.8 ms.Census in gameplay: title buffers 4076 of 1047 MB = 302 MB private, 424 MB view memory in one run of a section (118 buffers), 320 MB view memory in scattered pages (17 buffers). The 174 MB buffer from my last comment is one of the scattered ones, so no single placed buffer can show it.
Then two runs with memory actually in place:
VICTORY_INPLACE=2(as on main: private memory, not the big buffers): 79 windows 376 MB + 3546 buffers 30 MB in placeThe picture is right in both, and the copies do go down as intended. But the heap is in the PC's memory (pool L0, write-back pages), and a discrete card reading its vertex and constant data from there for 5,000 draws is 7 to 14 times slower than reading its own memory. The console's one memory does not carry over to a card on the far side of PCIe; in place looks like something for integrated GPUs only.
So for discrete cards, of the two things I named last time only the other is left: the card saying which bytes it wrote (so that ranges need not be declared whole and read back whole). I have not tried that.
(Measured and written with the help of an AI assistant, Claude Code; numbers are from our own runs.)
@Yorivel on GitHub · 2026-11-25 01:59 UTC · original
RTX 4090 (driver 621.40), i9-14900K, diag build: same overhead, measured.
VICTORY_INDIRECT_WINDOW=1didn't make the frame faster here, and in the one run I tried it showed corrupted blocks.Tree:
a803c87+ #156/#461/#190 + #500/#501 + the DirectStorage fix from #62. Base switches:VICTORY_DSTORAGE_NOTIFY=1 VICTORY_SHADER_OPT=0 VICTORY_SHADER_LOOP_LIMIT=256. Scene: the first gameplay room, standing still.Timing run (
VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1, so no relay; 406 ms/frame, 217 ms on the GPU):indirect100.3 ms in 5,249,dispatch41.3 ms in 3,843,indexed4.3 ms,mesh2.4 ms,texture1.6 ms.[compute cfd83392ec9ae408]10.6 ms (one a frame; a straight-line 8×4 shader, so it's the group count), indirect[compute f22a76fcb967ee59]6.2 ms, dispatch[compute 4a05640ec16718ad]6.1 ms in 49.[mesh cf9ea039f3cdb04d]200 a frame, the longest 0.02 ms, 2.2 ms together.With
VICTORY_INDIRECT_WINDOW=1(plusVICTORY_RELAY=2, the setting I play with):So on this machine the stages are about level under the relay: preparing ~115 ms, GPU ~110 ms, landing ~200 ms (mostly waiting for fetches, which queue behind later flights on the one queue). Removing one wait so far has only moved the time to the next.
@venglov on GitHub · 2026-11-25 02:08 UTC · original
On the
VICTORY_INDIRECT_WINDOW=1run: ona803c87the windows still usemain's clamp, and on every card measured so far that makes window draws dearer, not cheaper. The clamp charges the budget record by record, with a racing compare-and-swap on a word in CPU-mapped memory. In #220's benchmark, 3,200 window draws cost 33.6 ms on an RTX 3070, 49.8 on a 5070 Ti and 32.6 on a 5080, against 0.6–1.0 ms with #220's per-group charge. In game with #220 and windows on, the card's share went from about 110 to 28–46 ms on a 3070 and from 84 to 22–30 ms on a 5080. So "no gain from windows" is expected onmain.On the corrupted blocks, #220 now has a check for exactly that question: with
VICTORY_INDIRECT_WINDOW=1 VICTORY_INDIRECT_WINDOW_CHECK=1, every window draw also clamps its record fresh and compares on the card, loggingwindow checkcounts and a warning naming any record that differs. If the blocks show while the warning never fires, the windows aren't what draws them.@dkdknight on GitHub · 2026-11-25 02:11 UTC · original
Per-command GPU time for the same gameplay spot (diagnostics build,
VICTORY_GPU_TIMING=1 VICTORY_D3D12_DRED=1, RTX 5080; main + #71 #81 #77 #38). The timing run waits for each list, so the frame itself is slow (455 ms); the per-command sums are what matter:192.7 ms of card time a frame over 1,296 kinds of command:
The 40 kinds the line lists one by one sum to 116 ms: 78.5 ms in 2,583 indirect mesh draws of 24 pipelines (30 µs each, depth-only ones included: 322 draws of one mesh-only pipeline take 10.4 ms), and 29.6 ms in 19 compute dispatches of 10 pipelines (one alone 10.5 ms, 12.8 ms at its longest).
Two things I had wrong, corrected by this and by an experiment:
ExecuteIndirectaround each mesh draw. I replaced both with an amplification stage of our own that reads and bounds the record on the card and dispatches the mesh shader (directDispatchMesh(1,1,1), branchfeature/indirect-amplifyon dkdknight/victory-fork,VICTORY_INDIRECT_AMPLIFY=1; the picture is right, every such draw goes through it). With the per-draw UAV barrier kept: no gain. Without it (VICTORY_AMPLIFY_WAIT=0): 5.2-6.6 fps against 4.7, and the frame then follows the CPU's preparing. So the barrier per draw costs something; clamp +ExecuteIndirectthemselves do not explain the 130 ms.What is left as the suspect for 26-30 µs a mesh draw is the mesh shaders themselves.
mesh_prologueinlower.rssays it: the counts given toSetMeshOutputCountsare the declared maxima (up to 256 vertices and 256 primitives a group), every primitive first culled, because the console's own counts come from one lane's allocation request; its comment ends "Pass the program's own counts if that shows in frame time." At about 17,000-28,000 groups a frame it may well show. I have not measured that yet.(Measured and written with the help of an AI assistant, Claude Code; numbers are from our own runs.)
@VibeClauding on GitHub · 2026-11-25 09:22 UTC · original
Follow-up on dkdknight's finding that a descriptor table changes between consecutive mesh draws: that table is ours. It's the one-view table
bounded_root_srvs()makes for each root SRV/UAV. The title's own tables already reach the shader as offsets in root constants.VICTORY_ROOT_SRV_DIRECT=1(root descriptors, settable per record) removed the device on my RTX 3070, so the bounds look needed. Reading those views by heap index from a root constant keeps the bounds and leaves only root constants varying per draw, which a command signature can set. Counted from the ops log on this fork: 68–74% of one-record mesh draws could merge. Plan and numbers in #828; pick a step there if you want one.AI-assisted (Claude Code).