GPU: hoist and batch indirect argument clamps into the list prelude #2472
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!2472
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2472"
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?
@ESAT586 on GitHub · 2026-11-25 14:18 UTC · original
ESAT586:gpu/hoist-indirect-clamps→main· +1096 −45 · 4 files · 2 commits · open## Summary
Hoists and batches indirect draw argument clamps (
indirect::bound) from inline per-draw compute dispatches into a single batched compute pass insideHostList::prelude, eliminating per-draw global UAV barriers, graphics-to-compute context switches, buffer state transitions, and forced graphics PSO rebinds (self.host_pipeline = 0) across runs of indirect draws.Why this matters
Previously, every
ExecuteIndirectcall ran inline:UAV(None)barrier,Dispatch(1, 1, 1)(clobberingself.host_pipeline = 0),UAV(None)+UNORDERED_ACCESS -> INDIRECT_ARGUMENTbarrier,ExecuteIndirect,INDIRECT_ARGUMENT -> COMMONbarrier (indirect::done).In scenes with ~9,000 indirect draws per frame, this inserts ~18,000 global UAV barriers, ~18,000 resource transitions, and ~9,000 graphics/compute switches per frame.
Design & Soundness Invariants
BATCH_SOURCEincrates/victory-gpu/src/indirect.rs):[kind, stride, records, src_offset, dst_offset, 0, 0, 0]from a persistent per-HostListupload buffer (mirrored in host RAM so mid-list growth never reads back from write-combined upload memory, and reused acrossHostList::reset()with zero per-frame allocations in steady state).nevermutating or transitioning title-owned buffers) and writes clamped records into disjoint 16-byte-aligned slices of the list's own scratch chunks (COMMON -> UNORDERED_ACCESS -> INDIRECT_ARGUMENTin the prelude, restored toCOMMONonce atend_hoisted_indirect()/HostList::close()).2^24vertices,2^26vertex instances,65535groups/dim,2^20dispatch groups,2^27per-list budget) and exact sequential budget charging as the inline shader.records == 1) jobs in parallel across all 64 lanes in one wave, falling back seamlessly to the 64-lane tiled loop forrecords > 1, with explicit[branch]/[loop]+breakguards so FXC never emits out-of-bounds root-SRV or LDS loads.Dispatch(1, 1, 1)per contiguous run sharing(src_gpu, dst_gpu)(with aUAV(None)barrier between distinct runs to keep bothbudgetand adjacent slices of the same scratch chunk coherent), preceded by oneUAV(None)barrier for earlier lists' writes and followed by a single batched[UAV(budget), Transition(chunk: UNORDERED_ACCESS -> INDIRECT_ARGUMENT)...]barrier.kind != DISPATCH) whose pipeline does not write to any buffer UAV (!pipeline_writes_uav(p)— checkingmarks,root_uavs,memory_dirty,heap_writes, tableResourceType::Uav, andROOT_UAV_VIEW) are hoisted. (No per-buffer overlap map is needed because hoisted jobs read title buffers strictly read-only and write disjoint scratch offsets.)prepare/prepare_forruns before enqueueing a hoisted clamp, so dropped draws no longer clamp arguments or spend list budget.ClearUnorderedAccessView*,external::record, non-hoistable indirect call, orHostList::close()callsHostList::end_hoisted_indirect(), transitioning hoisted scratch chunks backINDIRECT_ARGUMENT -> COMMONonce and falling back to the existing inlinebound/donepath for the remainder of the list.HostListwithoutreset()preserves its hoisted jobs and re-clamps cleanly.Verification
cargo test --release -p victory-gpu --locked -- --ignored --nocapture benchmark_hoisted_vs_inline_indirect_clampson NVIDIA GeForce RTX 3060 Ti, Windows 11):9000 indirect draw clamps: inline 45.28 ms/frame vs hoisted 2.14 ms/frame (21.1x)(measuring clamp dispatches + barriers alone, before savings from eliminating interleaved graphics PSO rebinds and graphics/compute switches).indirect::, latestc673921):25/25acrossindirect::+draw::).VICTORY_D3D12_DEBUG=1 VICTORY_D3D12_GBV=1 RUST_LOG=warn,--features diagnostics): 12 passed, 0 failed, zero D3D12 warnings or errors.VICTORY_D3D12_WARP=1,--features diagnostics): 12 passed, 0 failed.cargo clippy -p victory-gpu --all-targets --all-features --locked— 0 warnings in modified files.cargo xtask policy—asset policy: 184 files ok.(Authored and verified with AI assistance; synthetic GPU tests and benchmarks only, no game files or data.)
@Bj0rnis on GitHub · 2026-11-25 14:26 UTC · original
Independent Windows 11 hardware + WARP verification of #2472 at
ec12173a(cleangit merge-treewithorigin/main940d32f, Rust 1.98.1 MSVC):cargo test -p victory-gpu --features diagnostics --lib --locked -- --test-threads=1-> 150 passed, 2 failed, 3 ignored (the 2 failures are the pre-existing #1744 NVIDIA 1M view-heap baseline failures also present onmain940d32f). All 11 non-ignoredindirect::tests(6 new hoisted/batched clamp tests + 5 existing), plusdraw::testsandhost::tests, passed on RTX 5070 Ti.VICTORY_D3D12_WARP=1): 152 passed, 0 failed, 3 ignored (1.04s).cargo clippy -p victory-gpu --all-targets --all-features --locked -- -D warnings-> 0 warnings.cargo xtask policy-> 182 files ok.Not tested: live game workload / frame-time benchmark (
benchmark_hoisted_vs_inline_indirect_clampswas not run).AI-assisted test run and summary.
@r4tedx on GitHub · 2026-11-25 15:09 UTC · original
Tested
ec12173aon WARP (VICTORY_D3D12_WARP=1, diagnostics build,--test-threads=1). Nice approach: clamping the prefix in the prelude leaves no clamp work in the list itself, and the overlap check makes it safe to move the in-place clamp.cargo test -p victory-gpu --features diagnostics --lib: 153 passed, 0 failed, 4 ignored.indirect::withVICTORY_D3D12_DEBUG=1: 12 passed, 2 ignored, with no debug-layer messages from the prelude, the job buffer or theGENERIC_READtransitions. The one error printed is a SAMPLER_HEAP root-signature message raised during the first test of the run, before any hoisting; we see it on other branches too.Equivalence with per-call clamping. I ported the equivalence test from our batched-clamp branch (r4tedx/VIctory
gpu/batched-clamps-upstream, 2ec823e4) to thehoistAPI:end_hoisted_indirect, then 10 clamped per call.Every word matches 160 per-call clamps (471 draw records ran, 569 ran empty). Happy to send the test if you want it in the PR.
Bench (WARP, synthetic): 1,500 indirect dispatches of no groups, median of 7. The first timestamp is in a list submitted before the measured one, so the prelude is counted.
Recording took 2.01 ms per call and 4.59 ms hoisted, in an unoptimised test build, so only the ratio means anything.
Points that may matter as other PRs land:
records. A hoisted counted call would then use up the budget faster than the same call clamped per call.spanreturnsNone) and any overlap end hoisting for the rest of the list. That costs speed only. #2168's early return for zero records would avoid the first.prepareruns before the clamp is queued, so a draw that gets dropped no longer charges budget. The per-call path still clamps first. When a dropped draw is heavy, the two paths therefore give later draws different budgets. Either is fine, but it is a difference.GENERIC_READuntil the prefix ends. A prefix pipeline that reads one of them through a UAV view without counting as a writer would see a state mismatch. I didn't check this with GPU-based validation.The title was not used in these tests.
AI-assisted
@ESAT586 on GitHub · 2026-11-25 15:14 UTC · original
Thanks for the RTX 5090, RTX 5070 Ti, and WARP / equivalence / benchmark verification @DenRakEiw, @Bj0rnis, and @r4tedx!
Addressed point #2 from @r4tedx in
1b1fedd:(Note on point #1: once #2168's count_buf clamp lands on main, we can trivially extend the packed job descriptor with has_count / count_offset + count_buf SRV binding.)
@Vedoxdev123 on GitHub · 2026-11-25 15:53 UTC · original
Tested on Windows with AMD Ryzen 5 5600X + NVIDIA GeForce RTX 4060:
cargo test -p victory-gpu --lib-> 147 passed; 2 failed; 3 ignoredAll existing and new tests in this branch pass on RTX 4060; the only 2 failures are the known 1,000,000 view heap cap tests (
dynamic_slots_are_held_until_releasedandlists_share_a_table_and_copies_keep_their_viewsfrom #1744).@Marvisak on GitHub · 2026-11-25 16:10 UTC · original · edited 2026-11-26 00:23 UTC
Automated triage for the maintainers.
Merge candidate (kept). Re-reviewed at
c673921. The only new commit since the last verdict hardensBATCH_SOURCEincrates/victory-gpu/src/indirect.rs:[branch]guard, so tail lanes never read pastjobs.&&, which FXC does not short-circuit and which could readcosts[64].GROUPS / g.ztest is nested under ag.z != 0check.payload), so a grown upload buffer is filled from memory rather than read back from write-combined memory.UAV(None)barrier.These are all safety fixes. The clamp bounds and in-order budget charging still match
SOURCE, and the hoisting conditions are unchanged from the head I reviewed before.The known differences are still worth a maintainer's note. A hoisted draw that is dropped no longer charges the budget. After #2168, the batched path would need its own count-aware charge. The speedup comes from synthetic benchmarks only. Merges cleanly; CI:
checkpassing.Generated by Claude Code
@ESAT586 on GitHub · 2026-11-25 16:20 UTC · original
Rebased onto
origin/main(67e8ae1) at187db6fand adapted cleanly to315cea1's non-destructive scratch-buffer clamp design:HoistedClampsreads the title's argument buffers viaSRV(t1)and writes clamped records into per-list 256 KiB scratch chunks (COMMON -> UNORDERED_ACCESS -> INDIRECT_ARGUMENTin the prelude,INDIRECT_ARGUMENT -> COMMONonce atend_hoisted_indirect()/HostList::close()). This eliminates overlap tracking, drops thecapture.rsdiff completely, and resolves point #4 from @r4tedx (no title-buffer state change during the prefix).315cea1parity:BATCH_SOURCEmatchesSOURCEword-for-word (including zeroing word 0 pastBUDGETand preserving trailing fields), andhoisted_transitions_start_from_current_states_and_never_touch_title_bufferverifies every emitted barrier withhost::tests::issued()+replay().--release):9000 indirect draw clamps: inline 45.28 ms/frame vs hoisted 2.14 ms/frame (21.1x)(~43.1 ms/frame saved).indirect::+draw::+twin::25/25), D3D12 Debug Layer (12/12, 0 warnings), WARP (25/25), strict Clippy (--all-targets&--all-features, 0 warnings),cargo xtask policy(184 files ok).Thanks also to @Vedoxdev123 for the RTX 4060 run!
@kotekompotek on GitHub · 2026-11-25 17:06 UTC · original
Traced the full path; the design is sound and the hazards I went looking for are covered:
end_hoisted_indirectat every site I could find that emits a write:bind(compute orpipeline_writes_uav),clear_unordered,external::record,close, plus the non-hoistable branches ofindirect()itself.lane==0prefix walk),PAST = 0xffffffffis unreachable as a real cost (draw ≤2^26, dispatch ≤2^23), the budget zero-step is registered once per list viabudget_zeroed, and per-runUAV(None)barriers keep bothbudgetand same-chunk tail slices coherent between dispatches.g.x * g.y > GROUPS / max(g.z,1)survives in u32 by 131 KiB of headroom (65535² < 2^32) — correct, but worth a comment; a future "just clamp to 2^17" would silently overflow into garbage costs.BTreeMapoverlap check for hoisted arg spans — there's none in the diff. Not a hazard (hoisted jobs are read-only on src and write disjoint scratch), so the check was presumably dropped as dead weight — but the body should say so.alloc_room's chunk reuse,payload/upload mirroring on grow,keep_onceraw-pointer dedup, and therestoredidempotence for re-submit-without-reset all check out. The 32x benchmark number is believable given ~18k eliminated barriers per frame.@ESAT586 on GitHub · 2026-11-25 20:27 UTC · original
Thanks for the thorough trace and verification, @kotekompotek! Updated the PR description to match the current non-destructive scratch design (removing the obsolete BTreeMap overlap-check description from the pre-315cea1 in-place revision). Good catch on 65535² < 2^32 headroom as well.
@fuzeofficlal on GitHub · 2026-11-26 00:38 UTC · original
Code review (same-list GPU-write hazard audit) and RTX 5090 + WARP verification at head
c673921cc134merged cleanly ontomain(63bcca43c6a0):HoistedClampsis restricted strictly to the initial GPU-write-free prefix of each command list (indirect.rs:386-392). Every GPU-write path irreversibly terminates hoisting vialist.end_hoisted_indirect()(transitioning used scratch chunks back fromINDIRECT_ARGUMENTtoCOMMONand settinghoistable = false): compute dispatches (draw.rs:617-619), UAV-writing graphics pipelines (pipeline_writes_uavatdraw.rs:2002-2017, coveringmarks, root UAVs,s.memory,heap_writes, table/root UAVs, andROOT_UAV_VIEW),clear_uav(draw.rs:1081),external::record(external.rs:44), indirect dispatches (draw.rs:1775, 1821), andHostList::close(host.rs:1768). Subsequent indirect calls fall back to inlineindirect::bound, while CPU-side deferred copies/refreshes complete before the prelude andrecord_preludeopens with a global UAV barrier.VICTORY_D3D12_DEBUG=1, Rust 1.98.1):--features diagnostics,indirect::tests draw::tests host::tests): 63/63 passed, 1 ignored (benchmark_hoisted_vs_inline_indirect_clamps)indirect::tests draw::tests host::tests): 62/62 passed with 0 Debug Layer errors (including all 5 newhoisted_*tests; excluding only the pre-existing NVIDIA 1M heap-cap baseline testdescriptor::host::tests::dynamic_slots_are_held_until_released)cargo xtask policy:191 files ok;cargo clippy --locked -p victory-gpu --tests -- -D warnings(default +--features diagnostics): 0 warnings.Hazard boundaries are airtight and hardware/WARP runs are clean; LGTM.
@MeMako on GitHub · 2026-11-26 01:18 UTC · original
Independent verification of
c673921on AMD Radeon RX 9070 XT (adapter 0, driver32.0.32029.2010, Ryzen 9 7950X, Windows 1110.0.26200x64).CI checks & synthetic GPU benchmark:
cargo clippy -p victory-gpu -p victory --all-targets --locked -- -D warnings(and--all-features): passcargo test -p victory-gpu --locked: 240 passed, 0 failed (all 12indirect::testspass on RX 9070 XT)benchmark_hoisted_vs_inline_indirect_clamps(release build, RX 9070 XT):9000 indirect draw clamps: inline 52.02 ms/frame vs hoisted 2.50 ms/frame (20.8x)Live title run (release build, warm shader & pipeline cache):
(Note: merged cleanly onto a local RX 9070 XT playtest branch on
842b0cbcontaining a separate-handle workaround equivalent to #2122,DYNAMIC = 1 << 19, and #2051; before/after compared against the exact same branch without #2472.)draws >= 200, excluding menus/pause)n=29)n=31)183.1 ms/182.0 ms161.8 ms/174.1 ms572.2 ms(1.70 fps)523.2 ms(1.90 fps)0/0/00/0/0The run later ended in an unrelated title-side access violation (
0xfc00fc00fc007c00read on title worker threads) with no GPU removal or indirect errors.No game data, shader names, or screenshots are included, per
docs/asset-policy.md. Hardware runs were performed by me on my RX 9070 XT; comment drafted with Antigravity.@steven-seagull27 on GitHub · 2026-11-26 03:02 UTC · original · edited 2026-11-26 03:14 UTC
The batch prelude needs the same mesh-grid rule as #2996 when these two patches meet. I tested the clean merge of
c673921cwith9a851cd3and counted actual mesh shaderSV_GroupIDvalues on RTX 5080 and WARP.On the merged tree, a single valid
(3,2,4)record ran 24 groups through the inline fallback and 3 through the hoisted path. A set of 66 small records ran 512 groups inline and 132 hoisted. The directDispatchMeshcontrol matched inline at every coordinate on both adapters.In the scratch build I applied #2996's bounded-grid decision to the mesh branch reading
src_args.Load3(src_at)in the batch HLSL. With that change the hoisted path matched the inline and direct controls across all 64 coordinate counters for all three fixtures, including padded strides and the 64-record boundary. The merge applies cleanly as written, so Git alone won't surface the missing change. Companion PRThe change is now available as a single cherry-pick on top of the two PRs. It credits the original mesh-grid implementation and adds an explicit
[10, 4, 3]readback to the batch-versus-inline regression. The updated regression passed on both adapters. Cherry-pick0689282@steven-seagull27 on GitHub · 2026-11-26 04:06 UTC · original
@andrewpozdnakov7-jpg’s translated mesh-group fix changes what #2472 should put into the precomputed argument buffer. The earlier integration preserved the three grid dimensions. VIctory supplies the translated mesh shader with a scalar group index derived from X. If the batch kernel preserves Y and Z after the inline kernel has started flattening the grid, it schedules the right number of groups with repeated indices.
I merged the original commits and compared direct scalar-index dispatch, inline clamping and batch clamping. The table counts distinct scalar indices touched, with every one of the 64 counters checked. RTX 5080 and Windows WARP gave the same results in two fresh processes each.
(3,2,4)record, 12-byte strideMultiple records start numbering at zero, so a correct counter can receive more than one hit. For the single record the old batch hit the same three counters eight times. The corrected batch hit each of 24 counters once.
On RTX I also ran a read-only translated mesh shader through the normal
State::execute_indirectdecision. The test confirmed the list actually queued the batch clamp. Its(3,2,4)draw covered 3 of 24 depth columns before the change and all 24 after, in agreement with inline. WARP’s evidence above is from group-counter readbacks. The separate WARP depth probe did not provide a valid pixel result. This checks VIctory’s current scalar input convention; console hardware numbering for multidimensional dispatch remains unmeasured.Integration commit. The branch includes both PRs, the earlier batch integration, and the original
5385cc6with its author. The new commit also checks that a valid(10,4,3)record becomes(120,1,1)in the batch buffer. The four stock mesh/batch tests passed on both adapters, as did strict all-feature GPU Clippy and asset policy.AI-assisted with Codex. Synthetic draws and readbacks.
@DenRakEiw on GitHub · 2026-11-25 14:35 UTC · original · approved these changes
Verified against
origin/main(940d32f) on Windows 11 + NVIDIA GeForce RTX 5090 and WARP:diagnosticsbuilds.cargo test -p victory-gpu indirect::: 11/11 passed on RTX 5090, 11/11 passed on WARP (1 benchmark ignored).cargo test -p victory-gpu draw::tests: 5/5 passed on RTX 5090.cargo clippy -p victory-gpu --all-targets -- -D warnings(both default and--features diagnostics): 0 warnings.cargo xtask policy: 183 files ok.AI-assisted (Gemini 4 Neon).
@catminou4 on GitHub · 2026-11-25 14:57 UTC · original · reviewed
Hoist and batch indirect argument clamps (+973). Static review only: victory-gpu/victory-hle are Windows-only (D3D12/windows-sys); not compiled or tested on this macOS arm64 host. rustc 1.98.1. Large perf change; needs hardware validation.
@imjustprism on GitHub · 2026-11-26 09:26 UTC · original
ran this in the title on an rx 9070 xt, merged onto
63bcca4plus #2122 (this card's driver crashes in its shader compiler without that one). nothing broke: about six minutes in the world, no device removed, no warnings, dropped draws per frame in the same range as before. i did not compare pictures.i could not measure a change in gpu time though. this is gpu ms per frame from the frame lines, bucketed by draws per frame because the scene moves on at a different pace in each run:
diag build with the diagnostics feature and no switches set, series-x, the same key presses, warm shader and pipeline caches, one run of 11 minutes each, about 60 world lines each. with one run each, 10 ms in a bucket is noise.
a line fit over all world lines gives 60 ms + 26 us per draw before and 69 ms + 27 us per draw with it. so on this card most of the gpu time is a fixed part per frame, and the cost per indirect call is not where it goes.
what may explain the missing gain: a captured world frame here has about 1,100 indirect calls and about 490 of them are dispatches, which this change leaves inline and which end the prefix. i did not count how many calls took the hoisted path in the title. a hoisted / inline count in the frame line would answer that, and would show what the 3060 ti number turns into in a real frame.
from reading the diff, three small things, none of them a wrong result that i could find. the prefix rule holds on every path i followed (compute or uav-writing bind, uav clear, the non-hoistable branch, external record, close), and the cpu refresh of the arguments lands before the prelude reads them.
preparebefore the clamp, the inline path clamps first. a call thatpreparedrops used to charge the list budget and now does not, so later records can run where they were zeroed before. fine by me, but the description says the charging is exactly the same.record_preludereturns a bool thatHostListdrops, and a missing budget resource skips the prelude silently. i believe neither can happen oncecan_hoistsaid yes, but if it ever does, the body runs ExecuteIndirect on chunks that were never clamped. afailthere would make it loud.hoist()directly. none records a dispatch, a uav-writing draw or a uav clear earlier in the same list and checks that hoisting stopped, and that rule is the whole correctness argument.@fuzeofficlal on GitHub · 2026-11-26 09:51 UTC · original · approved these changes
Reviewed
c673921cacrossdraw.rs,external.rs,host.rs, andindirect.rs, and confirmed a cleangit merge-treeagainstorigin/main(63bcca43).Key invariants checked:
end_hoisted_indirect()closes the prefix and returns all used scratch chunksINDIRECT_ARGUMENT -> COMMONonce before any compute bind, UAV/memory/heap-writing graphics pipeline (pipeline_writes_uav),clear_unordered, non-hoistable indirect call,external::record, orclose().BATCH_SOURCE(c673921c) guards tail lanes with[branch]before root-SRV loads and avoids FXC non-short-circuiting oncosts[64]; relativesrc_offset + len <= u32::MAXandHOIST_CHUNKbounds are enforced inHoistedClamps::push; prelude barriers (UAV(None)-> chunkCOMMON -> UAV-> per-runUAV(None)->UAV(budget)+ chunkUAV -> INDIRECT_ARGUMENT) order cleanly after earlier lists' compute writes and allow re-submission of closed hoisted lists.Verified locally on Windows 11 (RTX 5090 + WARP +
VICTORY_D3D12_DEBUG=1):cargo clippy --workspace --all-targets [--all-features] -- -D warnings: clean;cargo xtask policy:184 files okindirect::: 12/12 passed (1 ignored benchmark)VICTORY_D3D12_DEBUG=1indirect::: 12/12 passed with zero Debug Layer warnings/errors (includinghoisted_prelude_orders_after_earlier_list_compute_write)--features diagnostics,VICTORY_D3D12_WARP=1) +VICTORY_D3D12_DEBUG=1indirect::: 12/12 passedbenchmark_hoisted_vs_inline_indirect_clamps, 9,000 draws):inline 38.45 ms/framevshoisted 2.35 ms/frame(16.3x)LGTM.
@KainanP on GitHub · 2026-11-26 16:22 UTC · original
CPU cost per call of
c673921, measured with the list bench from #2586 next to #3197. The same numbers are on #3197.Method. KainanP/VIctory@perf/list-call-bench now has
VICTORY_LIST_BENCH_INDIRECT=1(commit 427db003). It runsExecuteIndirectthrough the title's method table: one indexed draw or one dispatch per call, 2,000 calls per list, on 1 thread and on 5 threads at once, each thread with its own list. The pipeline reads six table textures, two root CBVs and four root constants, and stores nothing, so every draw in the list is eligible here. The list'sCloseis timed with the calls. For these runs only, I also timedHostList::prelude()at each close through a local test accessor (not on the branch), so the batched clamp this PR records at submission counts against it. Each value is the best of 5 × 5,000 calls. Builds were interleaved, with the median of 7 runs on the stack and of 21 runs on main (three sets of 7). RTX 4060 Laptop, i7-14650HX, Windows 11, release. Four unrelated Python jobs were using the CPU throughout, which is why the builds were interleaved.63bcca4VICTORY_CLAMP_WINDOW=1The same on main + #1978 + #2821 + #3258 + #3274 + #3275 (the draw path with the texture-lock contention mostly gone,
perf/list-scale-base), median of 7:DrawIndexedInstanced(2.7 µs on main, 1.1 µs on the stack) is ~0.3–0.5 µs (argument refresh and job write, not split further). The prelude's batched pass is included in these figures.Dispatchon main), by design.Your GPU benchmark on another card (
benchmark_hoisted_vs_inline_indirect_clamps, 9,000 clamps, CPU recording excluded): RTX 4060 Laptop 37.6–39.5 ms inline vs 2.10–2.12 ms hoisted (17.7–18.8×, 3 runs). Intel UHD (a78b) 67.3 vs 3.1 ms (21.7×).Tests,
c673921merged on63bcca4,cargo test -p victory-gpu --release --lib:--features diagnostics,--test-threads=1): 252 passed, 0 failed.The failures are the same as on main on each adapter (the NVIDIA heap pair; on Intel that pair plus
a_texture_written_in_one_format_reads_in_another_through_a_placed_view). All 12indirect::tests pass on all three adapters, including the six new ones. On RTX,memory_tests::heap_direct_texture_reads_mark_their_heap_indexwas skipped because it access-violates on main here.AI use: Claude Code (Claude Opus 5.5) extended the benchmark, ran the measurements and drafted this comment.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.