Repository navigation
Structure builder: queue its pipelines at creation and make them in parallel (VICTORY_BVH_BUILDER_EARLY) - #121
notquiteog wants to merge 1 commit into
Conversation
…on and all at once at its first dispatch (VICTORY_BVH_BUILDER_EARLY, on) The builder's first dispatch made its 53 pipelines one after another on its thread, about a second each with a cold driver cache; 40 were made when the title's watchdog fired 30 s into the frame (a store to address 0). A warm run took 8 s for them. Now each builder pipeline is queued for the pipeline workers when the title creates it (only with VICTORY_BVH_BUILDER=1), and all of them are promoted to requested at the builder's first dispatch, so the ones not made yet are made side by side before that thread makes or waits for each in turn. VICTORY_BVH_BUILDER_EARLY=0 restores the old order. Hand-port of notquiteog/victory-nvidia 3e423ed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Independent native RTX 5070 routing check at The fixture pre-tagged synthetic shaders as builder shaders and inserted a controlled 20 ms compilation delay to expose scheduling. It verifies routing, not elapsed-time benefit, title builder content, cold-cache watchdog recovery, or gameplay. Verification was AI-assisted with GPT-6.2 Astra. |
This PR gives back one fix from notquiteog/victory-nvidia for the title's native ray tracing: the structure builder's pipelines are now made in parallel instead of one after another. It has its own switch,
VICTORY_BVH_BUILDER_EARLY(on by default;=0turns it off), and does nothing unless the builder is on (VICTORY_BVH_BUILDER=1). Your builder default does not change: it stays opt-in.What it does and why
The builder's stages run all or none, so its first dispatch makes every builder pipeline the title has created (
make::now), one after another on that dispatch's thread. With a cold driver cache each of the 53 took about a second. The title's main thread waited for the frame, and its 30 s watchdog ended the run with a store to address 0. When it hit, 40 of the 53 pipelines were made. A run with a warm cache took 8 s for them, and that one frame took 13 s.With this change:
make::soon(p, false)queues it at the early priority.make::soon(p, true)) before that thread makes or waits for each one in turn. The ones not made yet are made side by side.VICTORY_BVH_BUILDER_EARLY=0restores the old order.docs/fork-ray-tracing.mddescribes the switch.Our other ray-tracing fixes, not in this PR
These need our memory-by-address layout (64 KiB pages in card arenas and one directory buffer), and your
memory.rsis built differently (shadow copies,Writesranges). I did not want to hand-port them without being able to run them on your tree:VICTORY_BVH_SIZES_BOUND): the title reads a structure's compacted size before the card has written it. The fix gives the slot the prebuild upper bound at once and the real size when it lands. Card time per frame went from 19 ms to 9 ms on ours.VICTORY_BVH_PUSH): about 7 ms a frame saved on the submit thread with rays on.They are e8258c1 and df64c27 on notquiteog/victory-nvidia if you want to look. Our fork also now runs the builder by default (unless
VICTORY_BVH_BUILDER=0). That is offered as an idea only and is not in this PR.How it was tested
On this branch (off
main64bd58f), on Windows, afterInitialize-FormatTables.ps1:cargo build --locked: OK, no warnings.cargo test --locked -p victory-gpu --lib: 219 passed, 0 failed, 4 ignored.cargo test --locked -p victory-shader --lib: 239 passed, 0 failed, 4 ignored.The watchdog and timing numbers come from runs of the original commit (3e423ed) on our fork. This port was not run in the title.
🤖 Generated with Claude Code