Repository navigation
Ray tracing: builder within a wait budget, recycled ray pages; opt-in descriptor-slot, ray-walker and water switches; counters and bench script - #1046
Conversation
… gone Two counters on the frame line, so a run shows how often a view no list owns is evicted and how often a later lookup finds it gone. Counting only, no change in behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… reservation Counting and logging only, no change in behaviour. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…dget, not on the title's thread - Per-material ray-tracing resolve programs are not waited for while they are being made (their dispatches are dropped at once), and they queue in a line of their own behind the pipelines draws ask for, with a quarter of the workers kept free. - The builder's own programs are made by the workers, within a budget per frame (VICTORY_BVH_BUILDER_WAIT_MS, 2000 ms by default; 0: not at all). Not all made: the builder is off for that frame and tried again in the next. Without the wait, the title's watchdog ends a run on a cold cache. VICTORY_BVH_BUILDER_ON_THE_SPOT=1 keeps the old behaviour. - A new log line names the pipeline a wait of 50 ms or more went on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fxceless <36782933+fxceless@users.noreply.github.com>
… for the run Pages of title memory made from the ray programs' fault notes were limited for the whole run: once used up, every page touched after that read zeros for good. They are now a budget of 512 MB held at a time. At the budget the oldest page is given back (never in its first 128 frames, never one a list names); a page that is still read leaves its note again and is made again first. A page whose title memory is gone is dropped. The log line "title memory by address" gains the counts of why a page got no copy (the frame's limit, the budget, not the title's memory, no place). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fxceless <36782933+fxceless@users.noreply.github.com>
…lot waits for the next landing without the submission lock Off by default: everything in the air is settled under the submission lock, as before. On, the thread that translates the draw waits until a landing gave slots back and takes them, while other submissions go on. With nothing in the air and nothing being landed no slot can come back that way: then, and without the relay, as before. A log line says what it did; two more log lines count refused card-step submissions and the line's waits. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fxceless <36782933+fxceless@users.noreply.github.com>
…es through that look's view In a program that walks the title's structures, a load by address of a page an earlier load of the same program already looked up in the directory goes through that look's view, and the second half of a 128-byte node through the first half's. The same bytes are read either way; the looks are what costs. VICTORY_MEMORY_NEAR=1 turns it on (off by default). The switch is part of the shader cache key. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fxceless <36782933+fxceless@users.noreply.github.com>
… length; diagnostics builds Switches, all off by default: - VICTORY_THIN_GATE=1: a list's translation pauses while dynamic descriptor slots are short, so the lists that are sent next keep theirs (a recording is held back at most 250 ms). - VICTORY_TABLES_ONCE=1: a table a list reads to different lengths is copied once, as long as any stage reads it; the shorter readings use that copy. - VICTORY_DYNAMIC_WAIT=alt: the wait of VICTORY_DYNAMIC_WAIT=1 on and off in turns of 20 s, to compare the two inside one run. With the switch set, slots also go back at the start of a landing, not after its read-backs. Always on, counting or logging only: a counter line for slots taken and held. Diagnostics builds: the card's time of draws by what was recorded with them and by where their buffers lie, a census of windows of title memory, F9 to save one frame with every texture its passes wrote, tile-mask words of a dumped frame in the log. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fxceless <36782933+fxceless@users.noreply.github.com>
…ORY_WATER_TILE_SLOTS=1) On a host of 32-lane waves, one compute program of the water light listed tiles over each other: the console takes the slots for a whole 64-lane wave at once, and the second host wave needs the first one's lane mask, exchanged through group memory. The tiles that were overwritten got no light and the water was dark there. The program is changed in its own code before translation (known by its container digest and a hash of its bytes; any other program is left as it is): every lane adds 1 to the list's counter and its slot is what the counter held. Slots are still each given once and the counters end the same. VICTORY_WATER_TILE_SLOTS=1 turns it on; off by default. The switch is part of the shader cache key. The test of the rewrite runs the byte rewrite itself. After a change by xss3009 in a fork of VIctory-NVIDIA (69e7e00), written again for this tree. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: fxceless <36782933+fxceless@users.noreply.github.com>
…e descriptor slots line, no change in behaviour Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… tracing, DLSS and frame generation; frame times on the frame log
- scripts/bench.ps1 starts the title through `victory play ... --set ...` and
summarises the frame lines (median, 1 % low, draw bands), CPU, memory, GPU
and video-memory samples, and compares earlier runs (-Compare). Options
for ray tracing, DLSS, frame generation and the pipeline book. Run folders
sit beside cache_dir, not in it.
- A video-memory sample over 1 TB (a counter that underflowed) is left out of
the mean and the peak, and the summary says how many were.
- A comma inside a switch value ('A=1,2,3') stays in the value.
- host.rs: the Meter writes a frame-times line every 5 s (diagnostics builds),
the lengths taken from the frame meter's intervals.
- capture.rs: a file named `now` in the capture folder saves the next frame,
so a tool can look at the screen of a title running in the background.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ater light tile lists All off by default. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s textures only with VICTORY_TABLES_ONCE=1 With the switch off the branch for a table another stage made is as in VIctory-NVIDIA again (no texture_slot_tabled / mirror_after there), and the longer copy's records are hashed again only in diagnostics builds or with the switch on. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Hw2UBhLdHXyf9znVoP6cYo
|
@ldanyyl, thanks for I tried it on main If #1099 lands first, this PR can drop its copy of the script. If you'd rather keep it here, tell me and I'll close #1099. |
|
Thanks for this. I'm closing it without merging because it conflicts with the current main in several places (main has moved a lot since it was opened, with about 100 pull requests merged today), and I can't resolve that safely on your behalf. If you'd still like it in, please rebase it on the current main and open a new pull request. |
Fixes for the title's own ray tracing (
VICTORY_BVH_BUILDER=1), new opt-in switches for the descriptor slots, ray walkers and water light, counters, and a benchmark script. With every new switch off, the default path is VIctory-NVIDIA's, except for counters and log lines; the two ray-tracing budgets only act withVICTORY_BVH_BUILDER=1.Part of this is fxceless's work (credited with
Co-authored-byon those commits).Ray tracing (only with
VICTORY_BVH_BUILDER=1)VICTORY_BVH_BUILDER_WAIT_MS, default 2000: on by default, against the switch rule, because the old path ends the run.VICTORY_BVH_BUILDER_ON_THE_SPOT=1restores the old behaviour.memory.rs).New switches, all off by default (on with
=1)VICTORY_DYNAMIC_WAITalt: on and off in turns, for A/B)VICTORY_THIN_GATEVICTORY_TABLES_ONCEVICTORY_MEMORY_NEARVICTORY_WATER_TILE_SLOTSThe documentation is in
docs/fork-ray-tracing.mdand in comments where each switch is read.Counters and diagnostics
Benchmark
scripts/bench.ps1is based on PR #617. It runs the diagnostics build unattended throughvictory playwith chosen switches. It writes:framelog: frame timesline built from the frame meter's intervals;Options:
-RayTracing,-Dlss,-FrameGen,-Switches,-Seconds,-Warmup,-CaptureEvery,-Compare.Also
is_multiple_of,checked_div, explicit precedence), with no change in behaviour.Tests
On Windows (toolchain from
rust-toolchain.toml):cargo clippy --workspace --all-targets --locked -- -D warnings: cleancargo test -p victory-gpu --lib --locked -- --test-threads=1: 465 passedcargo test -p victory-shader --locked: 295 passedcargo test -p victory --locked: passedcargo xtask policy: okIn game, on a Ryzen 5 9600X with 32 GB and an RTX 5060 Ti 16 GB: Series X profile, 2560x1440, DLSS and frame generation off, diagnostics build of this branch, 4-minute windows with
scripts/bench.ps1.VICTORY_BVH_BUILDER=1These are single runs on one machine; the new switches were not A/B-measured on this base.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Hw2UBhLdHXyf9znVoP6cYo