Repository navigation
Conversation
Open
1 task done
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.
Summary
Two small, low-risk CPU frame-preparation optimizations tested on Ryzen 9 5950X + RTX 3090 24 GB + 32 GB RAM (Windows 11, Series S profile, DLSS Performance, FG off):
crates/victory-gpu/src/watch.rs— Lock-free fast-path & bounded spin inAskedFirst::wait()AtomicBoolcompletion flag checked withAcquirebefore taking theMutex/Condvar.victory-askis still finishing, spins up tocrate::shadow::wait_spin()(VICTORY_WAIT_SPIN) before falling back toCondvar::wait, avoiding ~150–300 µs Windows thread wakeup penalties across ~17 submissions/frame.crates/victory-gpu/src/host.rs— Largest-first texture ordering inrefresh_front&refresh_texturesduetextures by descending byte size (memory().1) alongsidelongest_first(&mut spans)inrefresh_frontand beforewide_each_scopedinrefresh_textures, reducing straggler tail latency at worker joins.Measured results (RTX 3090 24 GB + Ryzen 9 5950X, RT off, FG off)
Steady world gameplay (
~4,500–4,900draws/frame,VICTORY_REFLEX_ORIGIN_SLEEP=0,VICTORY_IMAGE=1,VICTORY_MEMORY_LEAN=1,VICTORY_STAGING_NO_ZERO=1,VICTORY_WC_BAR=1,VICTORY_WAIT_SPIN=800):3c6961e):18.0 fpsavg (20.8 fpsmax),57.2 ms/frame(48.6 msmin),36.7–43.9 mspreparing,18.5–20.0 mscopy-back.+ VICTORY_INPLACE=1): up to22.2–22.5 fpsrendered (45.0–46.8 ms/frame),34.2–34.7 mspreparing,12.1–12.3 mscopy-back,0.1–0.2 msGPU wait,0refused/invalidated in-place windows (78windows /498 MB).Extra telemetry note for RTX 3090 (Ampere, 32 GB RAM) with
VICTORY_RT_HW=nativeTested
rt-test-14(VICTORY_RT_NATIVE=1,VICTORY_RT_HW=native) on RTX 3090 24 GB:3,609BLAS structures /384 MiB,4–5TLAS/frame with~496instances).~36.5–72.7 ms(rehydrate) +~57.8 ms(tracenative hardware) with process private commit reaching~34.2 GB(pressured=trueon 32 GB RAM), whereas RT off sits at~25.5–25.8 GBcommit and0.1 msGPU wait.Verification
cargo build --release -p victory,x86-64-v3).AI-assisted analysis, profiling, and patch authoring: Antigravity (Google DeepMind), verified and benchmarked locally on RTX 3090 24 GB + Ryzen 9 5950X.