[Report + Patches] RTX 3080 (10 GB) / 7800X3D / 32 GB RAM: 3–5 fps → 20–30 fps (95–99% GPU Busy), 3 Code Fixes, NVIDIA Wave32 Refusals & Visual/Lip-Sync Findings #346
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Belobug--VIctory-Belobug-AMD#346
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@ToolxMaster on GitHub · 2026-11-26 21:22 UTC · original
Test Environment
vram_budget_mb = 9283, Driver32.0.16.2124)1920x1080, Series X profile, LTOreleasebuild (after initialdiagbaselines)Performance Progression (10 Iterative Runs)
VICTORY_THIN(all threads)ASYNC_SUBMITdiag)ADAPTER=NVIDIA+ all 5PORT_*43 msflight wait)60.8 s)16.8 ms(283 MB/frame) CPU snapshotsdiag)WAIT_RESIDENT=0,RESIDENCY=1,KEEP_FREED=0,CARD_BUFFERS=1MB/2048MB, droppedPORT_CBV0.0 msflight wait)16.8 → 1.6 ms, RAM27.3 → 24.2 GB; bottlenecked by716CreateCommittedResource/frame inshadow::exact()diag)shadow::exact()recycled buffer pooldiag)shadow::exact();CARD_BUFFERS_MIN_KB=64/2560 MB0.0 msCPU snapshots; frequent 2–5 fps hitches from defaultPIPELINE_WAIT_MS=500+ 10 workers on 8 coresrelease)release+PIPELINE_WAIT_MS=15,PIPELINE_WORKERS=4>60 msidle spike in 3 min; visible 16×16 non-RT probe halos around hair/clothing + brown indoor fogrelease)VICTORY_AMBIENT_MOST=0,AMBIENT_AIR=1.5,BAKE_TEXTURES_MS=400020.5 stexture memory waitrelease)ambient.rs;TEXTURE_LOOK_MS=300,PIPELINE_WAIT_MS=40,WORKERS=6-36%; rainbow confetti on counselor/waitress faces (PS_BakeDecorationsvsWAIT_RESIDENT=0)release, RT)VICTORY_WAIT_RESIDENT=textures;-RayTracing(MEMORY_CARD_MB=2048,CARD_BUFFERS_MB=1536)158 ms)release)WAIT_RESIDENT=textures+PIPELINE_WAIT_MS=15,WORKERS=4,TEXTURE_LOOK_MS=1000696 ms)PORT_DESCRIPTORS=1release)PORT_DESCRIPTORS;EARLY_TEXTURES_MS=50,TEXTURE_LOOK_MS=500,AMBIENT=0.95,AIR=1.4<1 s)PORT_JOURNAL=1lane wait only+1.3 ms:3.57 → 4.88 ms), texture wait17.7 → 14.4 s, fully GPU-bound on RTX 30803 Code Changes That Delivered the Biggest Wins
All three changes are hardware-adaptive or gated behind
VICTORY_*env vars so AMD / 64 GB defaults remain untouched:1.
crates/victory-gpu/src/shadow.rs— Lock-Free Allocation + Quarantined Recycled Pool inshadow::exact()shadow::exact()was making ~716CreateCommittedResourcecalls/frame while holding the globalEXACTmutex and running a per-missO(N)map.retain()over ~4,454 entries (~3.2M COMAddRef/Releasecalls/frame), blowingVICTORY_THINup to2,377 ms.next_prune) instead of scanningmapon every miss.host()?.shared_buffer(alloc_size)and excessShadowdrops completely outside theEXACTmutex.MIN_ALLOC = 64 KiB, capped at256 MiBwhenresidency::limited_host_ram()else320 MiB) with 4-frame GPU quarantine (IDLE_FRAMES = 2+QUARANTINE_FRAMES = 2) and trailing-byte zeroing (data[len..old_len] = 0) on reuse.VICTORY_THINdropped 2,377 ms → 130–326 ms, heap pass 67–88 ms → 10.3 ms, present wait 254 ms → 5–11 ms, 95.2% pool hit rate,shadow::window_tests8/8 passing.2.
crates/victory-gpu/src/host.rs—VICTORY_WAIT_RESIDENT=texturesSplit ModeVICTORY_WAIT_RESIDENT=1caused 212,000 waits (60.8 s) on committed buffer allocations, killing FPS to 3–5. SettingVICTORY_WAIT_RESIDENT=0fixed FPS, but causedPS_BakeDecorationsto sample unmapped 64 MiB texture pool heaps (pool.rs:685), baking rainbow confetti onto NPC faces/arms.wait_resident_buffers()(false for"0" | "textures") while keepingwait_resident()true for"textures". Texture pool heaps (pool.rs) and depth twins (resource.rs) still wait forMakeResident+ GPU mapping, while committed buffers skip per-buffer stalls.3.
crates/victory-gpu/src/ambient.rs—VICTORY_AMBIENT_MOST=0+ Lifted Shadow Floormost = 4.0lets untraced 16×16 screen-probe blocks bleed up to 4× over the smooth depth-aware GI estimate, creating bright blocky halos around hair/foreheads/clothing.VICTORY_AMBIENT_MOST=<float>(default4.0to preserve upstream). When<= 0.0,raise()writes the smooth depth-aware estimatefounddirectly (dir_scale = 0.65,min_floor = 0.48,room_mix = 0.38) so 16×16 probe halos vanish and backlit faces don't crush to pitch black.Key NVIDIA / 10 GB VRAM / 32 GB RAM Findings for Developers
1. Six Compute Shaders Refused by NVIDIA Wave32 (
E_INVALIDARG 0x80070057)On RTX 3080 (
host wave lanes min=32 max=32), these 6 compute shaders fail host PSO creation with0x80070057(presumably still emittingWaveSize(64)when wave32 lowering fails withoutVICTORY_WAVE_WIDE):diagRun #4):compute 02384a60fda6f2d0(size=3104, first bound frame 1086)compute 369cbe906ea72764(size=2180, first bound frame 1087)compute 2da4beb386509b77(size=4920, first bound frame 1087)compute 6b82bc7d22016cb5compute 5dc3b25986622949(size=12216, first bound frame 1709)compute 6f225b641c5b0708(size=18016, first bound frame 1709)2.
VICTORY_PORT_DESCRIPTORS=1Missed 427,634 View RecordsIn Run #9, Renderer Port #2's
memcpy/memmovehook marked0records out of ~1,813 copies/frame, and the 16-page/frame fallback caught 427,634 missed view records (~145/frame on the checked pages alone), with these top unpatched writers:0x7ff8b669c26f(external DLL):151,250title+0x18849c:104,0470x7ff80c4e0000(external DLL):43,680title+0x4e9b4e2:41,1980x7ff8b669c1d3(external DLL):14,888title+0x2474afc:14,360Disabling
VICTORY_PORT_DESCRIPTORSwhile keepingVICTORY_PORT_JOURNAL=1only increased lane wait from3.57 ms → 4.88 ms(12.6 mstotal for all ~387 dirty pages / 399k slots/frame in parallel) and eliminated all 427k missed view records.3. NVIDIA View Heap Cap & 10 GB VRAM Buffer Placement
VICTORY_PORT_CBV=1has0hits on NVIDIA because NVIDIA caps shader-visible CBV/SRV/UAV heaps at1,000,000(PORTABLE_VIEWS), disabling raw descriptor twins (RAW_TWINS = 1 << 21).card_limits()on<= 12 GiBVRAM (16 MiB min / 512 MiB max) leaves ~253+ MB/frame of hot buffers in system RAM over PCIe. Overriding toVICTORY_CARD_BUFFERS_MIN_KB=64+VICTORY_CARD_BUFFERS_MB=2560dropped CPU snapshots from16.8 ms → 0.0 msand pushed RTX 3080 utilization to 95–99%.VICTORY_PIPELINE_WAIT_MS=500+ 10 compiler workers caused frequent 2–5 fps stalls on the 7800X3D;VICTORY_PIPELINE_WAIT_MS=15+VICTORY_PIPELINE_WORKERS=4eliminated>100 mspipeline freezes.Remaining Visual & Animation Issues Observed (Runs #1–#10)
02384a60fda6f2d0,369cbe906ea72764,2da4beb386509b77) handles facial morph/blendshape skinning.VICTORY_BVH_BUILDER=0.PS_BakeDecorationsskin corruption: Even withWAIT_RESIDENT=textures,PORT_DESCRIPTORS=0, andBAKE_TEXTURES_MS=4000, forearms/hands (e.g., prison guard) or small forehead patches still occasionally bake pale/purple-speckled, suggesting an upstream race betweenPS_BakeDecorationsand unmapped/streaming texture slots.EARLY_TEXTURES_MS=50+TEXTURE_LOOK_MS=500,textures shown ... after waiting for memorystill averages~14.4 s(improved from20.5 s), causing late-loading walls/eye textures in early cutscenes.Best Config Tested for RTX 3080 (10 GB) / 8-Core CPU / 32 GB RAM (Non-RT)
@upipibi on GitHub · 2026-11-26 21:56 UTC · original
On the frozen lips: a-publier reads the integer-view word only for views picked from the heap (
slot_word, emit/lower.rs:8205), and dynamic table slots get no word (nodynamic_wordin descriptor/host.rs). avatarmanz/VIctory-7900XTX#114 (still open there) and ZSlayerHQ/victory-world-runtime#15 add both, and #15 reports moving faces on an RTX 4080 SUPER. So our guess is that this, not the refused compute programs, freezes the lips. By reading, not run.AI-assisted (Claude Code, Claude Opus 5.5).
@mattkajorinc on GitHub · 2026-11-26 22:24 UTC · original
Hardware: NVIDIA GeForce RTX 4070 (12 GB VRAM), Intel Core i9-14900F, 32 GB RAM, Windows 11.
Profile: Series X profile on Windows 11.
Findings & Progression:
VICTORY_AMBIENTfrom default0.80down to0.25–0.35completely resolved the severe blinding interior orange bloom blowout. Running with-RayTracingcured the coarse, splotchy probe dither on the ceiling and room corners.0x80070057 (E_INVALIDARG):compute 02384a60fda6f2d0compute 2da4beb386509b77compute 369cbe906ea72764Along with the other three startup refusals:
5dc3b25986622949,6f225b641c5b0708,2cc4c197ee29e291.~2,700 elements asked for per frame (refused and read zeros; VICTORY_VIEW_BYTES=0).@Miquella135 on GitHub · 2026-11-26 22:34 UTC · original
Another 3080-class data point: RTX 3080 Ti 12 GB, i9-9900K, 32 GB, Windows 10 22H2 (19045), non-RT, 1920x1080, Series X profile,
diagbuild. It also confirms that your three fixes do work when they are implemented from the description alone: they are not ina-publierand your account has no public repo, so we reimplemented them from the text.0. On Windows 10 this build needs the Agility SDK first, or it renders nothing. The inbox
d3d12core(10.0.19041.5794) refuses the heap-directly-indexed root signature flags withE_INVALIDARG(root signature flags c00), every host root signature is then refused and every frame endsdrawn=0. WithD3D12SDKVersion=610andD3D12\D3D12Core.dllbeside the exe, the same call succeeds and the title renders. Before that:1.2 fps, 833 ms/frame (126 preparing, 466 on the GPU, 71 copying back), 2622 draws/frame, GPU 33% busy, ~11.6 logical cores busy; menus were 30 fps even then (4-48 draws), so it is only 3D scenes.1.
VICTORY_PIPELINE_WAIT_MS=15can leave a black picture with working sound. The draws dropped while pipelines compile are the whole scene (dropped 1000-3000 without a host pipeline); subtitles and audio keep going, the screen stays black. At150the picture is there, 2.8-6 fps on this machine. Worth a line in the config notes: "cutscene is black but the audio works" points at this, not at the renderer.2. Your config, measured. Everything from your list except
PORT_CBVandPORT_DESCRIPTORS: 4.7-11.5 fps, GPU time 466 -> 7-31 ms, menus still 30 fps, no black frames.3. The three fixes, as numbers. Reimplemented: throttled eviction plus allocation outside the
EXACTmutex inshadow::exact();wait_resident_buffers()soVICTORY_WAIT_RESIDENT=texturesskips per-buffer residency waits;VICTORY_AMBIENT_MOST. Same scene, before -> after: 3.4-4.1 fps / 244-294 ms -> 5.1-8.9 fps / 112-195 ms, GPU 33-38 ms -> 14-29 ms, the 16x16 probe halos around hair and clothing are gone, andshadow::exact()went from2084 asks / 321 creations per frameto1856 / 279.4. What we did not do, and what is left. We did not implement the 4-frame quarantined pool: it needs
Drop for Shadowand we did not want to guess at the quarantine bookkeeping. We still create ~279 committed buffers per frame, so that is probably the biggest remaining win if you can publish the actual diff. Also open here: the six compute shaders are refused every frame (2da4beb386509b77,369cbe906ea72764,02384a60fda6f2d0,6b82bc7d22016cb5,6f225b641c5b0708,5dc3b25986622949, 1151 refusals in five minutes); remaining CPU islists' steps40 ms andcopies into the card's memory23 ms per frame; private memory 23 GB of 32 GB; and lips still do not move, which matches thedynamic_wordnote in the comment above.@JFIREonFIRE on GitHub · 2026-11-26 23:09 UTC · original
Two data points from an RTX 3090 (24 GB, driver 32.0.16.2101) / i9-9900K / 32 GB, for the findings above.
VICTORY_WAIT_RESIDENT=textureson a cool_fox-based tree. I wrote the split as described (plain buffers made withoutCREATE_NOT_RESIDENTand not waited for, incl. theirmapped()wait; texture blocks and textures as before). Waits per 4-minute run fell from ~120,000 to 1,000 (an 11-minute run had 332,000 waits, 150 s in all). Frame time did not change on that tree (134 ms mean vs ~118–121 before, a heavier scene), but the working set fell ~1.5 GB (15.9 GB avg / 16.8 peak vs 17.5 / 19.2). No device removal, no black frames,VICTORY_D3D12_DRED=lighton.VICTORY_PIPELINE_WAIT_MS=15+PIPELINE_WORKERS=4+CARD_BUFFERS_MB=2560made it worse there (world later, 182 ms mean), so those look specific to this fork's defaults.The six refused compute programs reproduce on the RTX 3090.
a-publier@cd8dfc0,victory translate --list --pipelineswithVICTORY_TRANSLATE_ONLYon the six hashes: all six are emitted, and all six host pipelines fail with "The parameter is incorrect" (02384a60fda6f2d0vfx_triangleClip:CS_DefragHeap_ComputeRelocations, 6b82bc7d22016cb5vfx_triangleClip:CS_CollectTriangles_Meshlets, 369cbe906ea72764GpuParticleUpdate:CS_Visibility, 2da4beb386509b77alphaResolve:CS_AlphTransmissionPrefilterMip, 5dc3b25986622949 and 6f225b641c5b0708water_shading:CS_TransmissionVolumetrics_Tiled[_LocalLights]). The cool_fox tree refuses three of them earlier, at translation ("no wave32 lowering for this wave64 program"); withVICTORY_WAVE_WHY=1the retries stop at "a wave reduction where not every lane runs" (0x7e8, 0x2e94, 0x4e0c) and "a first-lane read where not every lane runs" (0x1ee0, 0x1fa8). On the same card, #128's branch had not finishedtranslate --pipelineson the six after 30 minutes; I'll report #128, #345 and #366 on these hashes separately.Measured and written with Claude Code (AI).
@ToolxMaster on GitHub · 2026-11-26 23:12 UTC · original · edited 2026-11-26 23:13 UTC
@Miquella135 Thanks for testing and reproducing all of this! Good catch on
VICTORY_PIPELINE_WAIT_MS=15too that worked cleanly here only because myhost-pipelines.binwas already warmed up (~2,770 pipelines cached); on a cold cache,150(or warming first) definitely avoids black cutscenes.For the 4-frame quarantined pool in
shadow::exact(), it actually does not needDrop for Shadowat all:exact()during throttled pruning oncenow_frame >= last_frame + IDLE_FRAMES(2) andArc::strong_count(shadow) == 1 && crate::host::references(&shadow.buffer) == 1.EXACTclonesshadow.buffer, stashes(now_frame, bucket, buffer, shadow.data as usize, old_len)intoquarantine: VecDeque, and dropsshadow(leaving theID3D12Resourcealive with COM refcount 1 inquarantine).QUARANTINE_FRAMES(2) more full frames (4 frames total), it graduates fromquarantineinto the power-of-2pool(MIN_ALLOC = 64 KiB), and trailing bytes[len..old_len]are zeroed on reuse.shadow::window_testsstays 8/8 passing andshadow::exact()dropped to ~95.2% pool hits.Here is the exact
ExactCache/exact()/exact_line()replacement incrates/victory-gpu/src/shadow.rs:Also huge thanks to @upipibi for pointing out
dynamic_wordfor the frozen lips and @JFIREonFIRE for identifying the exact names of all 6 refused compute shaders!@BE29ZZ on GitHub · 2026-11-27 02:27 UTC · original
Opened #451 targeting \-publier\ implementing item 1 from this report (\shadow::exact()\ out-of-lock allocation + throttled pruning + power-of-two GPU-quarantined recycling pool, with shared read-lock hits, submission-fence + frame quarantine, stale-byte zeroing, and pressure trimming in \let_go_idle()). Verified locally on an RTX 3060 (Clippy default & --all-features, \ictory-gpu\ 402/402 passing including 6 new unit/GPU tests, \xtask\ 9/9) — credit to @ToolxMaster and @Miquella135! Ready for in-game testing.