Skip to content

GPU: preserve indirect draw budget order across groups - #899

Open
avt0m4t48 wants to merge 1 commit into
fxceless:mainfrom
avt0m4t48:fix/indirect-order-888
Open

avt0m4t48 wants to merge 1 commit into
fxceless:mainfrom
avt0m4t48:fix/indirect-order-888

Conversation

@avt0m4t48

Copy link
Copy Markdown

Refs #888.

The clamp now dispatches 64-record groups in input order, with a UAV barrier between groups. It keeps the existing lane-ordered budget calculation within each group. The 128-record regression still requires draws 1 and 2 to survive, and reports the actual surviving indices if it fails.

This is a focused alternative to #864. It keeps main's per-group charge and ordered lane walk, and it preserves the legacy benchmark's six-constant single-dispatch path.

On Windows Server 2025 WARP, the original f85101b failed the reported assertion on attempt 2. At 684eb7a (based on a253706), all 13 indirect tests passed, and seven additional isolated runs each kept records [1, 2]. The existing indirect benchmark ran on the Microsoft Basic Render Driver and exercised both recorder paths. Asset policy and the MSVC-target Rust check also passed. Baseline run · Patched run

Calls with more than 64 records now record more dispatches and barriers, including count-buffer calls whose actual count is lower than their maximum. The existing draw window is capped at 64. Physical adapter and large-window performance were not measured. The tests use source-built fixtures.

AI-assisted using Codex.

@avt0m4t48

Copy link
Copy Markdown
Author

I measured the extra dispatches on Windows WARP at 684eb7a against the exact parallel clamp shader from a253706. The two variants ran in one process with the same outer barriers, 3,200 small synthetic draws, and the same budget storage. Each figure is the median over nine runs after warmup.

Records per clamp Parallel WARP ms Ordered WARP ms CPU recording ms, parallel → ordered
32 23.15 23.46 0.18 → 0.18
64 24.36 24.44 0.14 → 0.14
128 23.78 23.79 0.12 → 0.13
512 23.37 23.32 0.10 → 0.11

At 128 and 512 records the recording increase was 0.01 ms at the benchmark's reporting precision. These measurements include the synthetic draws and come from the software adapter. Physical GPU timing, count-buffer stalls, and game frame time still need separate measurements. Benchmark source · Windows run

AI-assisted using Codex.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant