feat(gpu): pré-drena texturas na fila durante telas de loading (low-draw) e adiciona VICTORY_TEXTURE_PASS_MB #125
No reviewers
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/uiliannn--VItoriaBr!125
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-125"
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?
@ItzMeGamer on GitHub · 2026-11-26 15:31 UTC · original
ItzMeGamer:feat/loading-screen-texture-drain→main· +491 −52 · 3 files · 2 commits · openResumo
Acelera o esvaziamento da fila
textures picked by indexdurante as próprias telas de loading e menus 2D (< 150draws/frame), evitando que milhares de texturas (como pele/rosto de personagens em interiores e LODs) fiquem acumuladas por centenas de quadros após entrar no mundo 3D.O que foi corrigido e implementado (
crates/victory-gpu)draw.rs,descriptor/host.rs,resource.rs):< 150draws/frame) quando há slots vencidos (due) na filatextures picked by index,State::early_textureseleva automaticamente o orçamento de upload por quadro de12 ms / 64 MiBpara400 ms / 256 MiB(limitado a1500 msabaixo do TDR de 2 s do Windows e respeitando o saldo restante deVICTORY_TEXTURE_BUDGET_MB).EARLY_FRAMEantes de verificar se o draw possui view heap vinculado.PER_TEXTURE_BUDGETemheap_textures(draw.rs):PER_TEXTURE_BUDGET.min(bytes_at_most / 4)) para que passes de<= 64 MiBnão interrompam o loop após subir apenas uma única textura.VICTORY_TEXTURE_PASS_MBeVICTORY_LOADING_DRAIN):VICTORY_TEXTURE_PASS_MB: permite definir explicitamente o limite de bytes por quadro nos passes de upload de texturas.VICTORY_LOADING_DRAIN=0: permite desativar o boost automático em telas de loading (ativado por padrão).Testes e Validação
crates/victory-gpu/src/draw.rs(loading_screen_boosts_pass_budget_when_due_and_low_drawepass_budget_respects_env_overrides_and_tdr_and_texture_budget).cargo test -p victory-gpu-> 207 passed, 0 failed.(Assistido por IA com Antigravity).
@uiliannn
@ItzMeGamer on GitHub · 2026-11-26 16:02 UTC · original
Nota sobre uso de RAM em sistemas de 16 GB + HDD: Como a pré-drenagem em telas de loading envia mais texturas simultaneamente (
256 MiB / 400 ms), nos testes em sistema com 16 GB de RAM + HDD o uso total de RAM chegou a 95–98% durante a carga (sem crash quando combinado com #107 + #111 e pagefile manual no SSD). Em máquinas com pouca RAM livre, pode-se reduzir o teto viaVICTORY_TEXTURE_PASS_MB(ex.:64ou128) ou desativar o boost comVICTORY_LOADING_DRAIN=0.@uiliannn
@fladit123 on GitHub · 2026-11-26 19:54 UTC · original · requested changes
Reviewed HEAD
4bfbf98e139643ab93996f79c069efe996e013a5against the current main.The loading-screen texture pre-drain is an interesting approach, especially for 8 GB GPUs. However, I found three points worth addressing before enabling this behavior by default.
1. Existing early-pass disable semantics
compute_early_pass_budget()can select the 400 ms loading-drain path even whenVICTORY_EARLY_TEXTURES_MS=0andVICTORY_BAKE_TEXTURES_MS=0.Previously, these settings disabled early texture passes. Please preserve the existing opt-out behavior, or explicitly document the changed semantics and add a regression test for this configuration.
2. Active-world texture starvation
The active-3D cap reduces the regular texture upload budget from 192 MiB to 32 MiB, and a catch-up pass can fall from 576 MiB to 32 MiB.
This may improve frame times while extending the time needed to drain a large texture backlog. It would be useful to measure queue depth, texture readiness, time to drain, visual correctness and frame-time percentiles together.
3. TDR and memory pressure
A CPU preparation-time budget below 2 seconds does not guarantee that GPU execution remains below the TDR threshold.
The reported 95–98% RAM utilization on a 16 GB machine also suggests that memory-pressure-aware admission may be safer than relying exclusively on draw counts and fixed upload budgets.
I would recommend retaining the previous defaults until the loading-drain behavior has been independently qualified, or keeping the new policy opt-in initially.
Static source review only. No local build or gameplay validation performed.
AI-assisted review using OpenAI ChatGPT.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.