Textures: unchanged textures re-uploaded every frame (measured 344-444 MB/frame in world streaming) #3269
Labels
No labels
accessibility
area: build
area: formats
area: gpu
area: loader
area: runtime
area: shader
bug
documentation
duplicate
enhancement
good first issue
gpu: amd
gpu: intel
gpu: nvidia
help wanted
host: wine
invalid
out of scope
question
request
run report
triage: confirmed
triage: has patch
triage: merge candidate
triage: needs info
triage: needs rebase
triage: needs work
triage: proposed close
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/Marvisak--VIctory#3269
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?
@Moonwolf711 on GitHub · 2026-11-26 15:12 UTC · original
Measured on RX 6600 XT, current tip with #3252's VICTORY_NO_TDR=1 (so the run survives long enough to measure)
In the world-streaming phase, the per-frame host line shows texture uploads that dwarf everything else:
Textures alone account for 380-600 ms of CPU time per frame. The GPU is executing 300-540 ms — heavy but not the primary wall; the upload path is.
crates/victory-gpu/src/texture.rsuploads texture memory each time it is picked, with no record of whether the bytes changed. An 8 GB card streaming a ~5 GB working set then re-uploads textures continuously.Fix direction (validated by the same scene running at 5-6 fps on the same hardware with these implemented)
With all four, the same world-streaming phase on the same card moves from 1 fps with ~344-444 MB of per-frame texture traffic to 5-6 fps with single-digit MB on steady frames and a 167 MB spike only at world entry. The remaining per-frame cost is then dominated by unwatched-shadow whole copies (~30 ms) and the GPU itself.
Happy to share the full per-frame logs from both runs if useful.
@andrewpozdnakov7-jpg on GitHub · 2026-11-26 15:41 UTC · original
On current main
63bcca4, the frame line'stextures … MBcounts bytes read byStaging::refresh_now, including bytes read for an unchanged texture's digest. It can grow even when the refresh returns no staging upload. Counter at the refresh call, unchanged digest checkI checked a synthetic 64×64 RGBA8 texture on app-local WARP 1.0.22. The first refresh read 16,384 bytes and staged one subresource in both cases. On the next refresh with identical content, the tracked case read 0 bytes and staged 0, and the untracked case read 16,384 bytes and staged 0. Both existing heap-texture tests passed. Current main also already selects changed subresources for tracked textures. Tracked subresource selection
Could you share the exact source commit and the
copies per frametexture counters from matching runs? The diagnostic line splits watched-and-changed, hashed, and hashed-bytes-that-changed. Comparing those would show how much of the 344–444 MB figure was spent checking unchanged content. Diagnostic countersAI-assisted with Codex.