gpu: windows outside buffers on a 1 MiB grid with tails by default (1-2 GB less RAM) #106
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!106
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-106"
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?
@martindevbr on GitHub · 2026-11-26 00:29 UTC · original
martindevbr:pr/window-grid→main· +26 −15 · 1 files · 1 commits · openProblema / Problem
Uma janela de memória do título fora de buffers é um buffer do host na RAM do PC, inteiro residente por menos que seja lido: 2,5–3,3 GB numa rodada, cerca de metade fora do que foi pedido. Numa máquina de 32 GB a RAM livre acaba enquanto o mundo faz streaming, e os quadros acima de 1 s (page faults, remaps esperando o kernel) dominam o fps.
Windows of title memory outside buffers are fully resident host buffers: 2.5–3.3 GB per run, about half never asked for. On 32 GB machines free RAM runs out during streaming and >1 s frames dominate.
Mudança / Change
Liga por padrão os switches que já existiam (desligados):
VICTORY_WINDOW_KB=1024eVICTORY_WINDOW_TAILS=1. Para voltar:VICTORY_WINDOW_KB=4096 VICTORY_WINDOW_TAILS=0. Testes de grade/tails atualizados (cargo test -p victory-gpu window: 10 ok).Medido / Measured
RTX 3060 12 GB, Ryzen 5 5600GT, 32 GB RAM, preset do README; 3 rodadas de cada lado + 1 de confirmação com o padrão novo; primeiros 120 s no mundo (as rodadas entram no mundo em momentos diferentes):
Sem perda de dispositivo nem crash; últimos quadros renderizam normalmente (não comparados no mesmo ponto da cena). Como o próprio código das janelas avisa, uma grade mais fina pode manter a mesma memória em mais de uma janela: os bytes copiados por quadro subiram na única amostra comparada (380 vs 262 MB). A redução de RAM se repetiu em todas as rodadas; o efeito nos quadros longos vai na direção certa mas ainda está dentro do ruído.
@fladit123 on GitHub · 2026-11-26 19:56 UTC · original
I reviewed the window allocation path on current VItoriaBr main (
1361e190).The smaller grid and tails proposed here look promising. However,
loose()can still allocate overlapping windows when an existing containing window begins in an earlier 4 MiB cell.I reproduced this behavior in a small synthetic model of the selection algorithm: three requests produced 5 MiB of logical window allocations, although one existing 3 MiB window could satisfy all three.
This is an algorithm-level result, not a D3D12 or gameplay measurement.
I also found fxceless/victory-fork#1362, which implements opt-in window reuse and superseded-window reclamation, with encouraging results on an RTX 3060 Ti 8 GB.
I would like to investigate adapting and independently validating that approach on VItoriaBr with my RTX 4060 8 GB and 32 GB of RAM, preserving the original author's attribution.
A four-way comparison could separate the effects of the smaller grid, window reuse, and their combination.
Would this be a useful complementary contribution to your PR?
AI-assisted source analysis 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.