Repository navigation
Integrate fxceless round 4: indirect records gathered once per list (10.3 fps first rooms) - #69
Conversation
…er list (VICTORY_INDIRECT_GATHER=1, 10.3 fps in the first rooms) Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
There was a problem hiding this comment.
Note
Newer findings are available below. Devin Review posted a newer report on this PR, in addition to the findings presented here.
Devin Review found 2 findings. All 2 findings are left for you to triage below.
| pub(crate) fn slot(&mut self, offset: u32) -> Option<u32> { | ||
| if let Some(&slot) = self.slots.get(&offset) { | ||
| return Some(slot); | ||
| } |
There was a problem hiding this comment.
🔴 Repeated indirect draws bypass the GPU budget
When a list revisits gathered arguments, GatherSet::slot reuses the first draw’s budget charge. Every draw still runs, so repeated oversized mesh draws can overwhelm the GPU.
Devin left this for you to triage: Upstream fxceless gather design, opt-in behind VICTORY_INDIRECT_GATHER (off by default). Budget under-charging on repeated oversized draws only matters with the experiment on; correct fix belongs to their slot/budget design, recommend upstreaming or a follow-up.
Learn more
A command list bounds indirect work by charging GPU-generated arguments to a budget before execution. execute_indirect gathers eligible window misses but still records a separate ExecuteIndirect per call. record_gathers charges only the distinct slots, so a previously accepted slot stays executable after the budget would have run out. The ordinary mesh clamp caps each oversized record, but that cap alone does not bound their total work.
Example: A list alternates two distant mesh argument offsets that each contain an all-ones record. With no window walk, the old path charges each call and stops allowing the 65,535-group dispatches after sixteen calls. Gathering charges two slots and lets every call dispatch.
Recommended fix: Charge work per recorded execution, not per distinct source offset. Give each execution its own bounded output or separate its eligibility from the reusable argument bytes. Test repeated distant offsets that exhaust the list’s budget.
Was this helpful? React with 👍 or 👎 to provide feedback.
| if !windowed { | ||
| // A dispatch, or shaders that store to buffers: arguments may | ||
| // be written from here on. | ||
| list.gather_close(); | ||
| } |
There was a problem hiding this comment.
🔴 Stale indirect arguments after mesh emulation
A mesh emulation pass that writes later draw arguments can leave gather_close uncalled. Indirect emulation bypasses the cutoff, and direct emulation checks only graphics stages. Later draws then read the arguments from before the write.
Devin left this for you to triage: Interaction of their opt-in gather with the mesh-emulation dispatch: only reachable with VICTORY_INDIRECT_GATHER on. If it ships as-is, an emulated mesh pass writing later draw args can leave stale indirect arguments; recommend a follow-up wiring gather_close into the emulation paths rather than a speculative patch in the integration PR.
Learn more
Gathered arguments are read by the prelude before the main list executes, so writes within that list must stop further gathering. execute_indirect returns through the emulation branch before it reaches the cutoff. That branch runs both an emulated compute dispatch and a graphics draw. dispatch_mesh calls may_store, but the emulated pipeline keeps its compute stage separate from the graphics stages that may_store checks.
Example: An emulated mesh pass writes a later indexed draw’s instance count from zero to ten. If the indexed draw gathers, the prelude captures zero and the draw runs empty.
Recommended fix: Stop gathering before either emulated mesh path runs, or inspect both the emulated compute stage and the graphics stages before deciding to leave gathering open. Cover an emulated producer followed by a native indirect consumer in the same list.
Was this helpful? React with 👍 or 👎 to provide feedback.
Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…rdware scheduling, not lane order Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
…ross-group budget race Co-Authored-By: Devin AI <158243242+devin-ai-integration[bot]@users.noreply.github.com>
There was a problem hiding this comment.
Devin Review found 3 findings. Devin fixed 1 finding; 2 findings are left for you to triage in Devin Review.
Fixed by Devin (1)
- Cross-group budget coverage lost — Correct — only the surviving-record indices depend on the race. Reverted the ignore and relaxed just that assertion; saturation, zeroing and field preservation checks all still run.
Summary
Integrates fxceless
465b94f— "Scattered indirect records clamped once per list (VICTORY_INDIRECT_GATHER=1): 10.3 fps in the first rooms". Round 3 was merged in #65; upstream's measured frame rate in the first rooms goes 9.6 -> 10.3 fps.The commit adds list-level indirect record gathering: draws that read their arguments from buffers the GPU wrote can be gathered once per list instead of record by record, behind the opt-in
VICTORY_INDIRECT_GATHERswitch.Merge notes
3973179as base, current main as ours.indirect.rs/README.mdauto-merged clean. Real conflicts indraw.rs/host.rswere unions of disjoint additions and resolved as such:draw.rs: their newmay_storetest + the gather statistics line kept alongside our mesh-emulation dispatch helpers (bind_emulated_cs/bind_emulated_gfx/restore_mesh_emu_statefrom GPU: run direct mesh dispatches through emulation on fxceless #44) — the conflict was positional, both sides are needed;WINDOW_WHYarray takes their size-14 version.host.rs: their gather-scratch state restoration +Gatherreset kept alongside ourpending_barriersclear from the barrier coalescing port (gpu: coalesce texture transition barriers (re-port #23) #43). Their side of the first conflict already contained the cardmeter end call.cargo fmt --allapplied as before; clippy-D warningsclean including--all-features.Validation
depth_bounds_pipeline_loads_and_filters_draws, the known environmental failure on a VM without an SM 6.6 GPU that passes on thecheckrunner.Link to Devin session: https://app.devin.ai/sessions/39a24dfe2c184165b42b2108a96286b6
Open in Devin Desktop: https://app.devin.ai/desktop/session/39a24dfe2c184165b42b2108a96286b6?variant=devin
Requested by: @Personed
👀 Devin fixed 1 finding · 2 findings for you to triage · Follow Devin's work