perf(gpu): skip 1500 ms synchronous full-heap texture pass before bakes when VICTORY_BAKE_SOURCES is on #423
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/423"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by wike1701 on 2026-11-27T22:15:57Z.
Problem
In open-world gameplay, every time an NPC or vehicle spawns and runs a decoration bake draw, State::early_textures runs self.heap_textures(bake_list, ...) synchronously with a default budget of 1,500 ms / 2 GiB (VICTORY_BAKE_TEXTURES_MS=1500) and then blocks on gpu.execute_sync_internal(bake_list).
In real open-world captures on an RTX 5060 Ti 16 GB, this caused 500–1,850 ms freezes every 5 seconds (2 before bakes (1850 ms), 5 before bakes (1122 ms), 9 before bakes (1003 ms), 2.6 fps / 385 ms/frame), even though State::bring_bake_sources() (VICTORY_BAKE_SOURCES=1, on by default) already scans the bake draw's exact texture references and uploads all of them synchronously (akes=256, sources=2899, failed=0).
Setting VICTORY_BAKE_TEXTURES_MS=0 previously disabled is_bake altogether, which also disabled ring_bake_sources.
Fix