Repository navigation
Conversation
… the buffer's creation Host::read_back_buffer took its POOL mutex for the whole call, with the pool off too, so every list thread closing a list with read backs waited for the others' CreateCommittedResource. A WPR profile (RTX 3070 + 5800X3D, 2026-11-29) had the six list threads waiting 302 ms a second there, for the ocean's texture read backs under memory pressure. Bench (same save, Series S, DLSS performance, no frame generation): VICTORY_READ_BACK_POOL=1 alone 15.85 -> 16.5 fps. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit b3c12cf4e89a90cc3f3a213ee133d7b6d6025d5f)
Each silent exit of prepare_for, bind, rectangles and dispatch names its cause on its thread; every drop counts it. A new line 'dropped draws and dispatches by cause, per frame' follows the frame line. Runs on an RTX 3070 (2026-11-29) dropped ~2,400 of 7,000-9,800 draws a frame for a minute at a time, with only the total to go by. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 1b9a9a326ee91f116c17406b147cd54184738d30)
…me (VICTORY_REFRESH_CENSUS, on) Every 5 s: MB refreshed per frame in all, in how many copies, how much of it not write-watched, and the 12 largest copies (title address, size, MB, ms and refreshes per frame). Refreshes cost 21-28 ms a frame for 60-70 MB on an RTX 3070 + 5800X3D, about 2.5 GB/s, and nobody knew which buffers they are (the council of 2026-11-29, step 4). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 952f62e32c9e64c4d4c7fec71359e898133053b7)
…ite-watched, card copy or not A second line every 5 s: per kind of host copy (write-watched or guarded, with or without a copy in the card's memory) the updates, those that copied, MB, ms, and of them the ms asking the write watch and the guards what was written. The 6 MB windows refresh at ~0.5 GB/s and the constants heap at ~2.7 GB/s on an RTX 3070 + 5800X3D; this says whether asking or copying takes the time. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 9facfcad779b9985476e41282b694905ac89cad5)
…, the kernel's write watch and the guards Guarded copies (view memory) spent ~65 of ~80 ms a frame (summed over threads) asking what was written on an RTX 3070 + 5800X3D, and VICTORY_GUARD_HOT=50 did not lower it, so re-protecting is not the cost. The census by kind now splits the asking three ways. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit fb758b6c02d3c09fa1ce93f828897311ab9694a2)
…_FIRST_UPLOAD_CARD_HEADROOM_MB) The 80% ceiling weighs texture copies alone (main's fix for render targets counted twice), so with the pool off only the whole-card guard was left, at 100% of the budget: a burst of first uploads filled an RTX 3070 to 6,881 of 7,109 MB and every upload after it waited. Default 0 (as before); play-small sets 768. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit 357146a1a10c2980974253eee2042a0532acdb4f)
…_APU_ASYNC=1) XApuEnqueueCommand decoded each command (Opus, conversion) on the title's thread that queued it. A WPR CPU profile of an RTX 3070 + 5800X3D run (2026-11-29) had the title's busiest thread running 870 ms a second, 330 of them in XApuEnqueueCommand decoding Opus. With the switch, a connection's thread (victory-apu) takes the commands in order and makes their results, as the console's audio processor does beside the title; the title dequeues them once made (PENDING_RESULTS until then, or the connection's event). Off unless asked for; without it the commands are made at once as before, through the same code. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> (cherry picked from commit f97a1dd3cba1a6c18f3843787d4d8e1da78b61ba)
For the 8 GB profile (Series S, play --series-s) and DLSS ultra performance, which play accepts since trustno1-coder#1115. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tics builds, sort_by_key) Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
1 task done
Broodguy
pushed a commit
to Broodguy/VIctory-NVIDIA
that referenced
this pull request
Nov 29, 2026
…ock fix (port trustno1-coder#3271) Port of upstream PR trustno1-coder#3271 (B0tis, open). apu.rs merged with a 3-way apply onto our scratch-buffer port (4671109): the worker's run() keeps the reused Opus PCM scratch. - VICTORY_APU_ASYNC=1 (off unless given; the launcher sets it): each XApu connection gets a "victory-apu" thread that makes the results (Opus decode, conversion), as the console's audio processor does; the title dequeues a result once made (PENDING_RESULTS until then). The PR's CPU profile (RTX 3070 + 5800X3D) had the title's busiest thread at 870 ms/s, 330 of them in Opus decoding inside XApuEnqueueCommand. Aimed at the audio crackle: the decode no longer waits behind a title thread that is late at 6-15 fps. - Host::read_back_buffer no longer holds the pool's lock across CreateCommittedResource (default; list threads closing lists with read backs waited on each other, worst under memory pressure). - Drop causes per frame and the refresh census in the 5 s lines; the census is OFF by default here (VICTORY_REFRESH_CENSUS=1 turns it on): it takes a global lock for every refresh that copies. - VICTORY_TEXTURE_FIRST_UPLOAD_CARD_HEADROOM_MB=<MB>: opt-in, off. - The connections' threads run at VICTORY_APU_PRIORITY (default 2, HIGHEST, like the XMA decoder; new here). Expected: audio: fewer underruns when the title's threads are busy; fps: 0-2 ms where the title's audio thread limits the frame, plus the read-back lock. Switches: VICTORY_APU_ASYNC (0/unset = decode at enqueue, as before). Shader preload: not needed. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
System Information:
Summary of Test Session:
Technical Highlights from Log:
Notes/Outcome:
Attachment: |
ForthtuN
added a commit
to ForthtuN/VIctory-NVIDIA
that referenced
this pull request
Nov 29, 2026
…load buffer churn Selective upstream trustno1-coder#1279, trustno1-coder#3271 and trustno1-coder#3411. Preserve list identity, refusal diagnostics, memory caps, critical commit purge, shader translator and cache keys. Include upstream planner and spare retention tests; run targeted host tests in CI.
JustOptimize
added a commit
to JustOptimize/VIctory-Enhanced
that referenced
this pull request
Nov 30, 2026
… opt-in APU async and upload (PR trustno1-coder#3271) Port of trustno1-coder#3271, one conflict in shadow.rs update_free: kept this branch's prev load (for the guarded/unguarded decision) with the PR's timing around watch::writes (LAST_ASK_US). Host::read_back_buffer no longer holds the pool's lock across CreateCommittedResource; every silent exit in prepare_for, bind, rectangles and dispatch records a cause, shown as 'dropped draws and dispatches by cause, per frame' every 5 s; 'refresh census per frame' and 'by kind' lines (VICTORY_REFRESH_CENSUS=0 turns them off); two opt-in APU switches in hle apu.rs (off by default); bench.ps1 reads the new lines. Defaults change nowhere except the lock fix and the log lines. Upstream: scene measurements on a CPU-bound open-world frame, no frame-rate figure.
JustOptimize
added a commit
to JustOptimize/VIctory-Enhanced
that referenced
this pull request
Nov 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[pr-performance] [pr-diagnostics]
What it changes
In heavy open-world scenes the frame is CPU-bound: lowering the render resolution does not raise fps. This PR removes one lock that held list threads up, adds two cheap log lines that show where the CPU time goes, and adds two opt-in switches. Defaults change nowhere except the lock fix and the log lines.
Fix
Host::read_back_buffer). The lock was held acrossCreateCommittedResource, even with the pool off, so every list thread that closed a list with read backs waited for the other threads' buffer creations. This hurts most under host memory pressure, when read-back buffers are made anew every frame.Diagnostics (release builds, every 5 s)
dropped draws and dispatches by cause, per frame: every silent exit inprepare_for,bind,rectanglesanddispatchnow records a cause (no pipeline, root, table slots, memory views, index, builder stage off, …). This separates real losses from expected ones. In the scenes measured, nearly all drops were ray-tracing builder stages that are switched off.refresh census per frameandrefresh census by kind per frame(VICTORY_REFRESH_CENSUS=0turns them off):Opt-in switches (off by default)
VICTORY_TEXTURE_FIRST_UPLOAD_CARD_HEADROOM_MB=<MB>: first uploads leave this much of the card's budget free. The existing 80% ceiling counts texture copies only, so a burst of first uploads can fill a small card, and every upload after it waits. On 8 GB cards, 768 kept the upload queue moving.VICTORY_APU_ASYNC=1: each XApu connection gets a worker thread that produces the results (Opus decode, conversion), as the console's audio processor does. The title dequeues a result once it is ready. This takes most of a core's work off the title's busiest thread. Whether fps rises depends on whether that thread limits the frame.Bench
bench.ps1 -SeriesSand-Dlss ultraperformance.How it was tested
bench.ps1 -SeriesS -Dlss performance -FrameGen off -Seconds 150 -Warmup 45. The diagnostics build needs Diagnostics build: define mb() in copystat, stop the stage timer shadowing timing() #2498 (or Diagnostics builds compile again #2744 / Diagnostics build: compile again #2593 / Diagnostics build compiles again #2386) and the frame-line wording from Bench: read the frame line's new "draws or dispatches" wording #2475. Identical runs differ by up to ±0.6 fps.cargo test -p victory-gpu --lib: 914 pass. The one failure,every_switch_of_the_translator_is_in_the_key, also fails on main, becauseVICTORY_SCALAR_SPLITSstayed in the key list after the revert a1fe835.cargo test -p victory-hle --lib: 423 pass.cargo clippy -p victory-gpu -p victory-hle --lib --no-deps -D warnings: clean on the lines this PR touches.Notes for further CPU work (not part of the diff)
Existing switches that helped in the bench:
VICTORY_READ_BACK_POOL=1TABLE_SAME,ROOT_SAME,ROOT_TAILS,THIN_COALESCEVICTORY_SETTLE_UNLOCKED=1: in WPR, the submitting thread's waits insidesubmitfell from 67 to 11.5 ms/s.No gain or worse in the bench:
THIN_THREADS)TITLE_AFFINITY,SUBMIT_CORE_ALONEKEEP_GUARD_LOCK+ALIAS_DIRECTLAZY_COMPAREWhere the time goes: on a timeline of heavy frames, the critical chain was spread across these:
The card's idle time is mostly the submitting thread. Only about 7% of lists repeat word for word, so translation reuse would not pay.
Guarded view memory: the streamed windows, remapped page by page, are the costliest kind of refresh. The cost is guards-mutex contention and
VirtualProtectunder the lock, not copying.Tried for guarded view memory and dropped:
publish(): publishings were skipped and refreshes got slower.In-place reads are not possible for these windows (scattered single 64 KiB views). For the constants heap they lose on Ampere (Renderer port #1 (VICTORY_PORT_CONSTANTS=1) on Ampere: the submitting thread saves ~9 ms, but the card waits ~25 ms a frame on the in-place heap #1223).
Checked for overlap
🤖 Generated with Claude Code