Skip to content

[pr-performance] Batch GPU constant snapshots and tune renderer worker scheduling - #40

Draft
matrixfede wants to merge 1 commit into
Kemerd:mainfrom
matrixfede:pr/opt-in-renderer-throughput
Draft

matrixfede wants to merge 1 commit into
Kemerd:mainfrom
matrixfede:pr/opt-in-renderer-throughput

Conversation

@matrixfede

@matrixfede matrixfede commented Nov 30, 2026 •

Copy link
Copy Markdown

What it changes

The renderer can collect constant-buffer ranges into slot-aligned snapshots on the GPU and batch descriptor writes. The command list retains the descriptor resources it references until retirement. The patch also changes how image uploads are staged and submitted, adds worker-placement controls for hybrid CPUs on Windows, and keys cached shaders by their translation settings. The archive loader recognizes AppleDouble companion files.

How it was tested

Fixed-input 300-second scene on Windows, Core i9-14900HX, RTX 4090 Laptop GPU and 64 GiB RAM. Series X profile, 2560×1440 SDR, DLSS Quality (1706×960 internal), frame generation off, default ray-tracing selection. FPS counts frames produced by the renderer.

Build and profile Native FPS 95th percentile frame time
Official rt-test-14 (3c6961e) 23.03 76.47 ms
Earlier prototype based on dc12c3d, tuned profile 31.30 47.92 ms
Proposed cd6aeea, tuned profile 32.65 48.81 ms

Each row is one accepted run. The proposed build gained 9.62 native FPS (+41.8%) against the official release in this scene. The comparison includes both code and renderer settings. The relative contribution of each change is unknown. The proposed build produced 9,794 frames in 299.966 s. Grouped frame telemetry independently gave 32.65 FPS. Four image checks at 50, 120, 150 and 260 s stayed within the scene-matching threshold. The run logged zero out-of-memory pipeline failures or device-loss errors. An earlier attempt was discarded at 50 s because its camera view differed from the reference.

Shader unit tests cover both wave32 and wave64 paths. The scene was run on one NVIDIA GPU with the renderer's default wave selection. Forced wave sizes and other GPUs still need validation.

The proposed source passed a locked release build, cargo check -p victory-gpu --locked --release and cargo xtask policy --staged. Release-mode tests passed for the GPU library (1,701), HLE library (468), shader library (619) and CLI binary (145), with 75 ignored. Precompilation built 3,577 of 3,578 requested pipelines. One compute pipeline could not be translated.

Explicit renderer settings used for the comparison

Official release run:

VICTORY_CARD_DIRECT_COPY=1
VICTORY_DECLARE_ACROSS_LISTS=1
VICTORY_DSTORAGE_STATS=1
VICTORY_FILES_BUFFERED=1
VICTORY_MEMORY_ARENAS_AHEAD=1
VICTORY_MEMORY_ASK_RUNS=1
VICTORY_MEMORY_BUFFER_FAULTS=1
VICTORY_MEMORY_DIRTY=1
VICTORY_MEMORY_FAULT_PAGES=40000
VICTORY_MEMORY_FRESH=1
VICTORY_MEMORY_LAND_SENT=1
VICTORY_MEMORY_LEAN=1
VICTORY_MEMORY_QUIET=1
VICTORY_MIXED_INTERP=1
VICTORY_PIPELINE_PIECES=1
VICTORY_PIPELINE_PIECES_ONLY=graphics
VICTORY_PIPELINE_PIECES_REFUSE_UNTRANSLATED=1
VICTORY_PIPELINE_SAMPLER_TABLE=1
VICTORY_PIPELINE_SLOW_WORKERS=8
VICTORY_PIPELINE_WAIT_BACKLOG=64
VICTORY_PIPELINE_WAIT_ONCE=1
VICTORY_REFLEX=boost
VICTORY_REFRESH_PREFILTER=0
VICTORY_REFRESH_PROBE_TEXTURES=1
VICTORY_REFRESH_PROBE_US=300
VICTORY_REFRESH_SET=1
VICTORY_REFRESH_SPLIT=1
VICTORY_SEND_COPIED_FIND=1
VICTORY_SEND_THREAD=1
VICTORY_SEND_WHEN_EMPTY=0
VICTORY_STAGING_NO_ZERO=1
VICTORY_TEXTURE_LOOK_ONCE=1
VICTORY_TEXTURE_READ_AHEAD=1
VICTORY_TITLE_WRITE_RANGE=1
VICTORY_UNDER_PARTS=1
VICTORY_UNIFORM_MASK_SCC=1
VICTORY_WAIT_SPLIT=1

Tuned-profile overrides and additions on top of those settings (last setting wins):

VICTORY_ALLOCATOR_TRIM=1
VICTORY_ALLOCATOR_TRIM_S=10
VICTORY_ASK_FIRST=1
VICTORY_ASK_HOLD_ALL=0
VICTORY_BUDGET_PACK=1
VICTORY_CARD_FILL_LOOKUP=1
VICTORY_CARD_GATHER_CONSTANTS=1
VICTORY_CARD_METER=0
VICTORY_CARD_PACK_SLOTS=1
VICTORY_CARD_STEPS_JOIN=4096
VICTORY_CBV_ONCE=0
VICTORY_DLSS_RR=0
VICTORY_DSTORAGE_STATS=0
VICTORY_FAST_CORES=1
VICTORY_FAULT_UNLOCKED=1
VICTORY_GUARD_REST=1000
VICTORY_HEAP_SYNC_FIRST=1
VICTORY_HELPER_PRIORITY=0
VICTORY_IMAGE=1
VICTORY_IMAGE_CHUNK_MEMCPY=1
VICTORY_IMAGE_GATHER_LAYOUT=group
VICTORY_IMAGE_INDIRECT_GATHER=0
VICTORY_IMAGE_PACK_UPLOAD=1
VICTORY_IMAGE_PARTS=0
VICTORY_IMAGE_UPLOAD_CLOCK=0
VICTORY_INDEPENDENT_FILLS=1
VICTORY_JOIN_LISTS=96
VICTORY_KEEP_GUARD_LOCK=1
VICTORY_LAND_THREADS=6
VICTORY_LIST_PRIORITY=0
VICTORY_LIST_SLOT_LIFETIME=1
VICTORY_PASSES_HOT=1
VICTORY_PIPELINE_SLOW_WORKERS=2
VICTORY_PIPELINE_WORKERS=3
VICTORY_PROCESS_MEMORY=0
VICTORY_PROMPTS=keys
VICTORY_REFLEX_ORIGIN_SLEEP=0
VICTORY_REFRESH_PROBE_US=70
VICTORY_REFRESH_SKIP_GAPS=0
VICTORY_REFRESH_SPLIT=0
VICTORY_RELAY=2
VICTORY_RELAY_COPY=1
VICTORY_RETIRE_BATCH=1
VICTORY_SCRATCH_BAR_MB=0
VICTORY_SEND_BESIDE=1
VICTORY_SEND_OWN=1
VICTORY_SUBMIT_PRIORITY=2
VICTORY_SUBMIT_SPLIT=1
VICTORY_SWEEP_ASYNC=1
VICTORY_SYNC_FINE=0
VICTORY_TABLE_BATCH=1
VICTORY_TARGETS_ONCE=1
VICTORY_THIN_COALESCE=1
VICTORY_THIN_THREADS=16
VICTORY_TITLE_AFFINITY=physical
VICTORY_TITLE_PHYSICAL_SPREAD=1
VICTORY_UPLOAD_POOL_MB=192
VICTORY_UPLOAD_QUEUE=4
VICTORY_VIEW_THREADS=6
VICTORY_WAIT_SPLIT=0
VICTORY_WARMUP_RESTART=0
VICTORY_WIDE_THREADS=8

Checked for overlap

  • Searched upstream open pull requests before submission. No open PR covered these changes.

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