Perfil -LowVram para placas de 6 GB (RTX 2060), mip drop e pool que esvazia blocos #9

Merged
Dimasaas merged 13 commits from upstream-pr/9 into dev 2026-11-29 01:11:32 +00:00
Dimasaas commented 2026-11-28 01:42:29 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by Dimasaas on 2026-11-28T01:42:29Z.


Perfil para placas de 6 GB, testado numa RTX 2060 6 GB (Ryzen 5 5500, 16 GB de RAM, Windows 11, perfil Series S). Com ele o jogo chega no mundo e roda; antes, na mesma máquina, caía na tela de pausa (E_OUTOFMEMORY) ou com a GPU removida.

RTX 2060 6 GB, -LowVram, prisão, 15 fps

O que muda

  • scripts/play.ps1 -LowVram: 720p; VICTORY_TEXTURE_POOL=0 e VICTORY_LATE_WAIT_LISTS=256 (de Marvisak/VIctory#3552, RTX 3060 Laptop 6 GB); VICTORY_CARD_BUFFERS_MB=1024, VICTORY_CARD_WINDOWS_MB=256 e VICTORY_TEXTURE_MIP_DROP=1 (de Impre-visible/victory-gtx1660, GTX 1660 6 GB: ~280 → ~100 ms por quadro).
  • VICTORY_TEXTURE_MIP_DROP=0..3 (padrão 0, sem mudança): portado de Marvisak/VIctory#2146 (antikohza). Em vez de um segundo mecanismo, a redução sobe o HostTexture::base que o fork já tem, então staging, detiling, pool, upload adiantado e o rebase das views (from_base) já tratam disso. Só texturas 2D amostradas, de uma fatia, sem MSAA, sem RT/DS/UAV, lados potência de 2 ≥ 1024. Cópias mapeiam subrecursos para a cópia do host; CopyResource entre bases diferentes copia nível a nível (mesma família de formato).
  • Pool de texturas: um pedaço vai para o bloco mais cheio em que cabe (antes: o primeiro com espaço), para os outros esvaziarem e saírem; blocos vazios guardados limitados a 1/8 do orçamento da placa (antes: até 64 blocos, 4 GiB, abaixo de 85%). O descanso de 2,5 s e os blocos maduros ficam como estavam. Ainda não medido em jogo (o -LowVram usa TEXTURE_POOL=0); dá para testar com -More @{VICTORY_TEXTURE_POOL='1'}.

Medido

Uma máquina, uma sessão na prisão, cache de pipelines quente (warm --used):

fps 1,5 a 15 (15 fps, 2.880 draws, no print acima)
VRAM 4,5 GB de 5,1 GB de orçamento
RAM 0,3 GB livre, ~34,6 GB de commit com 16 GB físicos

Com 16 GB de RAM o limite é a memória do PC: o jogo pagina para o SSD e os quedas para 1,5 fps vêm daí (o log mostra "0.0 on the GPU" nesses quadros). Os relatos de 6 GB que rodam melhor têm 32 GB (3060) e 62 GB (1660).

Problema visual conhecido: personagens parecem com "chams"

Como dá para ver no print, a personagem aparece clara, de cor chapada e sem sombra, destacada do cenário escuro, parecendo um wallhack com chams ligado. Com VICTORY_RT_MISS=1 o jogo não tem a luz indireta e as sombras de ray tracing; no lugar entra a luz ambiente de substituição (VICTORY_AMBIENT=constant:0.1:0.5, VICTORY_AMBIENT_AIR=0.3), que ilumina o personagem por igual. Não é causado por este PR, mas fica mais visível em 720p. Valores menores de VICTORY_AMBIENT ou o -RayTracing devem reduzir o efeito; não testei ainda.

Testes

  • cargo build --locked --release -p victory: ok.
  • cargo test -p victory-gpu --release: 381 passaram (mip drop), testes do pool 6 passaram, incluindo pieces_go_to_the_fullest_block_so_the_others_empty.
<!-- greyfinch-sync:edsuuu/VI-BR-PORT:issue:5535469101 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9). Originally posted by [Dimasaas](https://github.com/Dimasaas) on 2026-11-28T01:42:29Z. --- Perfil para placas de 6 GB, testado numa **RTX 2060 6 GB** (Ryzen 5 5500, 16 GB de RAM, Windows 11, perfil Series S). Com ele o jogo chega no mundo e roda; antes, na mesma máquina, caía na tela de pausa (E_OUTOFMEMORY) ou com a GPU removida. ![RTX 2060 6 GB, -LowVram, prisão, 15 fps](https://raw.githubusercontent.com/Dimasaas/VI-BR-PORT/media/media/rtx2060-lowvram-prisao.png) ## O que muda - **`scripts/play.ps1 -LowVram`**: 720p; `VICTORY_TEXTURE_POOL=0` e `VICTORY_LATE_WAIT_LISTS=256` (de Marvisak/VIctory#3552, RTX 3060 Laptop 6 GB); `VICTORY_CARD_BUFFERS_MB=1024`, `VICTORY_CARD_WINDOWS_MB=256` e `VICTORY_TEXTURE_MIP_DROP=1` (de Impre-visible/victory-gtx1660, GTX 1660 6 GB: ~280 → ~100 ms por quadro). - **`VICTORY_TEXTURE_MIP_DROP=0..3`** (padrão 0, sem mudança): portado de Marvisak/VIctory#2146 (antikohza). Em vez de um segundo mecanismo, a redução sobe o `HostTexture::base` que o fork já tem, então staging, detiling, pool, upload adiantado e o rebase das views (`from_base`) já tratam disso. Só texturas 2D amostradas, de uma fatia, sem MSAA, sem RT/DS/UAV, lados potência de 2 ≥ 1024. Cópias mapeiam subrecursos para a cópia do host; `CopyResource` entre bases diferentes copia nível a nível (mesma família de formato). - **Pool de texturas**: um pedaço vai para o bloco *mais cheio* em que cabe (antes: o primeiro com espaço), para os outros esvaziarem e saírem; blocos vazios guardados limitados a 1/8 do orçamento da placa (antes: até 64 blocos, 4 GiB, abaixo de 85%). O descanso de 2,5 s e os blocos maduros ficam como estavam. **Ainda não medido em jogo** (o `-LowVram` usa `TEXTURE_POOL=0`); dá para testar com `-More @{VICTORY_TEXTURE_POOL='1'}`. ## Medido Uma máquina, uma sessão na prisão, cache de pipelines quente (`warm --used`): | | | |---|---| | fps | 1,5 a 15 (15 fps, 2.880 draws, no print acima) | | VRAM | 4,5 GB de 5,1 GB de orçamento | | RAM | 0,3 GB livre, ~34,6 GB de commit com 16 GB físicos | Com 16 GB de RAM o limite é a memória do PC: o jogo pagina para o SSD e os quedas para 1,5 fps vêm daí (o log mostra "0.0 on the GPU" nesses quadros). Os relatos de 6 GB que rodam melhor têm 32 GB (3060) e 62 GB (1660). ## Problema visual conhecido: personagens parecem com "chams" Como dá para ver no print, a personagem aparece clara, de cor chapada e sem sombra, destacada do cenário escuro, parecendo um wallhack com chams ligado. Com `VICTORY_RT_MISS=1` o jogo não tem a luz indireta e as sombras de ray tracing; no lugar entra a luz ambiente de substituição (`VICTORY_AMBIENT=constant:0.1:0.5`, `VICTORY_AMBIENT_AIR=0.3`), que ilumina o personagem por igual. Não é causado por este PR, mas fica mais visível em 720p. Valores menores de `VICTORY_AMBIENT` ou o `-RayTracing` devem reduzir o efeito; não testei ainda. ## Testes - `cargo build --locked --release -p victory`: ok. - `cargo test -p victory-gpu --release`: 381 passaram (mip drop), testes do pool 6 passaram, incluindo `pieces_go_to_the_fullest_block_so_the_others_empty`.
Dimasaas commented 2026-11-28 02:03:44 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by Dimasaas on 2026-11-28T02:03:44Z.


Segunda sessão: 8 a 12,5 fps estáveis na RTX 2060 6 GB

Mesma máquina e mesmo -LowVram do PR, segunda sessão no mundo (prisão, área comum com vários NPCs), já com luz e cenário completos:

RTX 2060 6 GB, -LowVram, segunda sessão, 8 fps, 5.438 draws

1ª sessão 2ª sessão
fps (linhas do log, a cada 5 s) 1,5 a 8 8,4 a 12,5
ms preparando por quadro 75 a 276 54 a 70
draws por quadro ~4.600 4.200 a 5.400

O que mudou entre as duas, sem mudar código:

  1. Pipelines: a 1ª sessão ainda criava pipelines durante o jogo (o arquivo da biblioteca foi reescrito 15 vezes, o último 5,6 s antes de um device removed 0x887A0005 com a placa ociosa). Na 2ª, a maioria já estava pronta. Dica para placas fracas: rodar victory.exe warm --used depois de cada sessão nas primeiras vezes.
  2. RAM do Windows: com 16 GB físicos o jogo usa ~35 GB de commit e o resto vai para o pagefile. Fechar tudo em segundo plano (Steam, navegador, webviews, widgets, spooler, telemetria) e desligar transparência e animações do Windows reduziu a disputa por memória. A RAM livre continua em ~0,3 GB durante o jogo: 16 GB é o limite real; os relatos de 6 GB com 32 GB e 62 GB de RAM vão melhor.

Problemas visuais que ainda aparecem: a luz ambiente de substituição (sem ray tracing) deixa personagens com aspecto de "chams" em algumas cenas, e no print dá para ver faixas de cor (posterização) nas paredes e no chão.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:comment:7232103231 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#issuecomment-7232103231). Originally posted by [Dimasaas](https://github.com/Dimasaas) on 2026-11-28T02:03:44Z. --- ## Segunda sessão: 8 a 12,5 fps estáveis na RTX 2060 6 GB Mesma máquina e mesmo `-LowVram` do PR, segunda sessão no mundo (prisão, área comum com vários NPCs), já com luz e cenário completos: ![RTX 2060 6 GB, -LowVram, segunda sessão, 8 fps, 5.438 draws](https://raw.githubusercontent.com/Dimasaas/VI-BR-PORT/media/media/rtx2060-lowvram-sessao2.png) | | 1ª sessão | 2ª sessão | |---|---|---| | fps (linhas do log, a cada 5 s) | 1,5 a 8 | **8,4 a 12,5** | | ms preparando por quadro | 75 a 276 | **54 a 70** | | draws por quadro | ~4.600 | 4.200 a 5.400 | O que mudou entre as duas, sem mudar código: 1. **Pipelines**: a 1ª sessão ainda criava pipelines durante o jogo (o arquivo da biblioteca foi reescrito 15 vezes, o último 5,6 s antes de um device removed `0x887A0005` com a placa ociosa). Na 2ª, a maioria já estava pronta. Dica para placas fracas: rodar `victory.exe warm --used` depois de cada sessão nas primeiras vezes. 2. **RAM do Windows**: com 16 GB físicos o jogo usa ~35 GB de commit e o resto vai para o pagefile. Fechar tudo em segundo plano (Steam, navegador, webviews, widgets, spooler, telemetria) e desligar transparência e animações do Windows reduziu a disputa por memória. A RAM livre continua em ~0,3 GB durante o jogo: 16 GB é o limite real; os relatos de 6 GB com 32 GB e 62 GB de RAM vão melhor. Problemas visuais que ainda aparecem: a luz ambiente de substituição (sem ray tracing) deixa personagens com aspecto de "chams" em algumas cenas, e no print dá para ver faixas de cor (posterização) nas paredes e no chão.
Dimasaas commented 2026-11-28 02:54:20 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by Dimasaas on 2026-11-28T02:54:20Z.


Análise de RAM para PCs com 16 GB (só código, ainda sem teste no jogo)

Com 16 GB o limite deixa de ser a placa e passa a ser a RAM: num build de diagnóstico na RTX 2060, o jogo chegou a ~21 GB de memória privada, a RAM livre caiu para 0,3 GB e o Windows passou a paginar a memória do jogo (~244 mil page faults por quadro). A linha do próprio runtime:

the PC's shared with the card: budget 7473 MB, in use 7654 MB

Ou seja, ~7,6 GB de RAM do PC são memória D3D12 do layer, além dos ~10 GB do jogo (não é a memória do jogo contada duas vezes: VICTORY_INPLACE estava desligado). Como é memória residente da GPU, o Windows não a pagina, e pagina o jogo no lugar.

Para onde vão os 7,6 GB

O quê MB Onde Medido / estimado
Cópias no PC das windows de memória do jogo (shared_buffer, grade de 4 MiB) 4.116 (978 windows) shadow.rs loose(), WINDOW medido
Espelho no PC das cópias de buffers do jogo (quase todas também têm cópia na placa com CARD_BUFFERS_MIN_KB=64) ~883 shadow.rs medido (4.999 − 4.116)
Chunks de scratch das listas (834 MB, 537 sobrando) 834 host.rs SPARE_KEPT = 1 GiB medido
Resto sem linha no log (allocators de listas paradas, DRED em toda lista, memória de envio guardada até 768 MB) ~1.760 list.rs IDLE_MOST, host.rs DRED, send.rs kept() estimado

O que este PR adiciona para testar

  1. VICTORY_LOW_RAM (código, commit 6017d2e): liga sozinho com ≤ 20 GiB de RAM (=0 volta ao de antes). Chunks de scratch guardados 1 GiB → 256 MiB, memória de envio guardada 768 → 128 MiB, listas paradas 512 → 256 (não 128: o comentário do código mede 12% da thread de envio com 128). Estimativa: −1 a −1,4 GB. Teste de unidade só da detecção.
  2. play.ps1 -LowRam: VICTORY_WINDOW_KB=256 + VICTORY_WINDOW_TAILS=1 (windows do tamanho do que é pedido; o log mostra só 2.450 MB de páginas de windows copiadas de fato, contra 4.116 na grade de 4 MiB) e VICTORY_D3D12_DRED=0. Estimativa: −1,5 a −2 GB. Custa um pouco mais de CPU.
  3. play.ps1 -InPlace: VICTORY_INPLACE_PROBE=1 + VICTORY_INPLACE=1, a placa lê as windows direto da memória do jogo, sem cópia no PC. Até −3,7 GB, se o driver aceitar OpenExistingHeapFromAddress (NVIDIA não confirmado; o probe escreve no log). Windows em reservas de views mapeadas (~0xb8c460000 para cima) são recusadas por esse modo.

Como medir (quem tiver 16 GB)

scripts\play.ps1 -Exe <seu exe> -Build diag -LowVram                    # referência
scripts\play.ps1 -Exe <seu exe> -Build diag -LowVram -LowRam
scripts\play.ps1 -Exe <seu exe> -Build diag -LowVram -LowRam -InPlace

Comparar no log: the PC's shared with the card: ... in use N MB, a linha host copies of title memory ... windows, as linhas de fps e a RAM livre do Windows. Usar o mesmo save e o mesmo tempo no mundo (o tempo de quadro sobe nos primeiros minutos).

Próximo passo de código (não feito)

O espelho no PC dos buffers que já têm cópia na placa (~0,9 GB) existe só para mandar as mudanças para cima. Trocar por um buffer de upload pequeno e rotativo que envia os trechos direto da memória do jogo cortaria quase tudo, mas mexe no caminho de envio/comparação/relay — risco médio-alto.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:comment:7232668692 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#issuecomment-7232668692). Originally posted by [Dimasaas](https://github.com/Dimasaas) on 2026-11-28T02:54:20Z. --- ## Análise de RAM para PCs com 16 GB (só código, ainda sem teste no jogo) Com 16 GB o limite deixa de ser a placa e passa a ser a RAM: num build de diagnóstico na RTX 2060, o jogo chegou a ~21 GB de memória privada, a RAM livre caiu para 0,3 GB e o Windows passou a paginar a memória do jogo (~244 mil page faults por quadro). A linha do próprio runtime: > the PC's shared with the card: budget 7473 MB, **in use 7654 MB** Ou seja, ~7,6 GB de RAM do PC são memória D3D12 do layer, **além** dos ~10 GB do jogo (não é a memória do jogo contada duas vezes: `VICTORY_INPLACE` estava desligado). Como é memória residente da GPU, o Windows não a pagina, e pagina o jogo no lugar. ### Para onde vão os 7,6 GB | O quê | MB | Onde | Medido / estimado | |---|---|---|---| | Cópias no PC das *windows* de memória do jogo (`shared_buffer`, grade de 4 MiB) | **4.116** (978 windows) | `shadow.rs` `loose()`, `WINDOW` | medido | | Espelho no PC das cópias de buffers do jogo (quase todas também têm cópia na placa com `CARD_BUFFERS_MIN_KB=64`) | ~883 | `shadow.rs` | medido (4.999 − 4.116) | | Chunks de scratch das listas (834 MB, 537 sobrando) | 834 | `host.rs` `SPARE_KEPT = 1 GiB` | medido | | Resto sem linha no log (allocators de listas paradas, DRED em toda lista, memória de envio guardada até 768 MB) | ~1.760 | `list.rs` `IDLE_MOST`, `host.rs` DRED, `send.rs` `kept()` | estimado | ### O que este PR adiciona para testar 1. **`VICTORY_LOW_RAM`** (código, commit `6017d2e`): liga sozinho com ≤ 20 GiB de RAM (`=0` volta ao de antes). Chunks de scratch guardados 1 GiB → 256 MiB, memória de envio guardada 768 → 128 MiB, listas paradas 512 → 256 (não 128: o comentário do código mede 12% da thread de envio com 128). Estimativa: −1 a −1,4 GB. Teste de unidade só da detecção. 2. **`play.ps1 -LowRam`**: `VICTORY_WINDOW_KB=256` + `VICTORY_WINDOW_TAILS=1` (windows do tamanho do que é pedido; o log mostra só 2.450 MB de páginas de windows copiadas de fato, contra 4.116 na grade de 4 MiB) e `VICTORY_D3D12_DRED=0`. Estimativa: −1,5 a −2 GB. Custa um pouco mais de CPU. 3. **`play.ps1 -InPlace`**: `VICTORY_INPLACE_PROBE=1` + `VICTORY_INPLACE=1`, a placa lê as windows direto da memória do jogo, sem cópia no PC. Até −3,7 GB, **se o driver aceitar** `OpenExistingHeapFromAddress` (NVIDIA não confirmado; o probe escreve no log). Windows em reservas de views mapeadas (~0xb8c460000 para cima) são recusadas por esse modo. ### Como medir (quem tiver 16 GB) ```powershell scripts\play.ps1 -Exe <seu exe> -Build diag -LowVram # referência scripts\play.ps1 -Exe <seu exe> -Build diag -LowVram -LowRam scripts\play.ps1 -Exe <seu exe> -Build diag -LowVram -LowRam -InPlace ``` Comparar no log: `the PC's shared with the card: ... in use N MB`, a linha `host copies of title memory ... windows`, as linhas de fps e a RAM livre do Windows. Usar o mesmo save e o mesmo tempo no mundo (o tempo de quadro sobe nos primeiros minutos). ### Próximo passo de código (não feito) O espelho no PC dos buffers que já têm cópia na placa (~0,9 GB) existe só para mandar as mudanças para cima. Trocar por um buffer de upload pequeno e rotativo que envia os trechos direto da memória do jogo cortaria quase tudo, mas mexe no caminho de envio/comparação/relay — risco médio-alto.
ToxicmaggotRP commented 2026-11-28 08:35:51 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by ToxicmaggotRP on 2026-11-28T08:35:51Z.


[QA] RTX 4060 Ti 8 GB + Ryzen 7 5800X3D @ 1080p: 9–21 fps, VRAM at the limit, rectangular artifacts on water/terrain

Test session on 2026-11-28, 08:58–09:23, about 25 minutes. The window title overlay was used for fps, ms/frame and draws/frame.

Environment

CPU AMD Ryzen 7 5800X3D (8C/16T)
GPU NVIDIA GeForce RTX 4060 Ti 8 GB (Ventus 3X), driver 32.0.16.2140 (21/11/2026), D3D12 FL 12.2
RAM 32 GB (2x16 GB Corsair CMK32GX4M2E3200C16), running at 2133 MHz
Board / BIOS MSI B450-A PRO, BIOS A.I1 (2023-05-17)
Storage Crucial P3 1 TB NVMe
OS Windows 11 Home 64-bit, build 26300.9711
Power plan Balanced
Display 1080p, VICTORY_DISPLAY_MODE=1920x1080
Build commit <hash> — env vars used: <paste victory_env.txt>

Measurements

Time Scene FPS ms/frame Draws/frame
08:58 Cutscene (prison office) 17 58.3 1833
08:59 Cutscene / gameplay (user notes) 16–19 / 13–14 – –
09:00 Gameplay (docks) 13 79.6 6966
09:01 Gameplay (NPCs close-up) 11 91.9 6612
09:03 Cutscene (close-up face) 21 (peak) 47.7 1459
09:03 Cutscene (aerial, bridge) 15 67.7 2928
09:05 Boat segment ("Segui l'aereo") 13 75.8 3519
09:06 First mission ("Chi dorme") 13–15 – –
09:17 "Cerca Donnie nel campo" (dense enemy area) 9 114.1 9679

Frame time clearly grows with draws/frame.

Resource usage (Task Manager)

Time CPU RAM used Commit GPU 3D VRAM dedicated VRAM shared GPU temp
09:02 89–96% 28.0/31.9 GB (88%) 49.5/55.9 GB 51% 7.6/8.0 GB 8.5/16 GB 43 °C
09:06 89–98% 27.3–28.0 GB (86–88%) 48.7/55.9 GB 64–66% 7.5/8.0 GB 7.3/16 GB 51–54 °C
09:18 73–94% 28.1–29.1 GB (88–91%) – 80–81% 7.5/8.0 GB 7.9/16 GB 45–46 °C

Observations (not conclusions):

  • CPU is at 89–98% in every scene while GPU 3D is only 51–66% in lighter scenes, which suggests a CPU-side limit (HLE/translation). In the dense area (9679 draws) the GPU rose to 80%.
  • Dedicated VRAM is pinned at 7.5–7.6 of 8.0 GB the whole time, so texture eviction is probably active.
  • System RAM reaches 91% and commit charge about 49.5 of 55.9 GB.
  • No crash or device loss in 25 minutes of testing.

Visual issues

New, not listed in "Problemas conhecidos":

  1. Dark/blurred rectangular blocks over water and terrain in the aerial bridge cutscene (09:03) and in the boat segment (09:05). They look like tiles that were not resolved or streamed.
  2. Over-exposed white halo around character models in close-up gameplay (09:01), with very noisy hair.

Possibly already known:
3. Police/NPC textures black or undefined in gameplay (09:01).
4. Some textures not fully clean/high-res (08:59–09:01).
5. Graphical artifacts during the first mission (09:06).

Comparison with the README

The README (state of 25/11) reports 1–5 fps in cutscenes and 4–7 fps in gameplay at 1080p. Here I measured 16–21 fps in cutscenes and 9–15 fps in gameplay. This may be due to commits after 25/11 or to the settings above; please tell me which commit your table refers to.

Questions

  • Is the fps gain expected with the current main?
  • Are the rectangular blocks (1) a known texture/tile streaming issue?
  • Would you like a run with VICTORY_CAPTURE and VICTORY_D3D12_DRED=1 on a specific scene?
0qXYt2jHc8 3UU5tCUCKP 9dh7uPl2cR BE6M3BDw1M dRoutmCaiX GPGxJqbwmr H8yL1X6mA3 hVPwbmJwkl J1IWIpjuAd jAFJ3vvIQI JYVQmEpNwW kGB3xErwd9 Oe4SmvYU35 oS4olQowO4 qnMtVYEVA3 Qwff54QZxs RH14HatFkX UOm0dI5oYH uyHDfmakMo victory_LBC5gMYwgc VzP3L8iH04 Wfs5W6SVcg XcoOfhRwcs XTIeN8puCt YYV6OhtF0g
<!-- greyfinch-sync:edsuuu/VI-BR-PORT:comment:7236685808 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#issuecomment-7236685808). Originally posted by [ToxicmaggotRP](https://github.com/ToxicmaggotRP) on 2026-11-28T08:35:51Z. --- ## [QA] RTX 4060 Ti 8 GB + Ryzen 7 5800X3D @ 1080p: 9–21 fps, VRAM at the limit, rectangular artifacts on water/terrain Test session on 2026-11-28, 08:58–09:23, about 25 minutes. The window title overlay was used for fps, ms/frame and draws/frame. ### Environment | | | |---|---| | CPU | AMD Ryzen 7 5800X3D (8C/16T) | | GPU | NVIDIA GeForce RTX 4060 Ti 8 GB (Ventus 3X), driver 32.0.16.2140 (21/11/2026), D3D12 FL 12.2 | | RAM | 32 GB (2x16 GB Corsair CMK32GX4M2E3200C16), **running at 2133 MHz** | | Board / BIOS | MSI B450-A PRO, BIOS A.I1 (2023-05-17) | | Storage | Crucial P3 1 TB NVMe | | OS | Windows 11 Home 64-bit, build 26300.9711 | | Power plan | Balanced | | Display | 1080p, `VICTORY_DISPLAY_MODE=1920x1080` | | Build | commit `<hash>` — env vars used: `<paste victory_env.txt>` | ### Measurements | Time | Scene | FPS | ms/frame | Draws/frame | |---|---|---|---|---| | 08:58 | Cutscene (prison office) | 17 | 58.3 | 1833 | | 08:59 | Cutscene / gameplay (user notes) | 16–19 / 13–14 | – | – | | 09:00 | Gameplay (docks) | 13 | 79.6 | 6966 | | 09:01 | Gameplay (NPCs close-up) | 11 | 91.9 | 6612 | | 09:03 | Cutscene (close-up face) | 21 (peak) | 47.7 | 1459 | | 09:03 | Cutscene (aerial, bridge) | 15 | 67.7 | 2928 | | 09:05 | Boat segment ("Segui l'aereo") | 13 | 75.8 | 3519 | | 09:06 | First mission ("Chi dorme") | 13–15 | – | – | | 09:17 | "Cerca Donnie nel campo" (dense enemy area) | 9 | 114.1 | 9679 | Frame time clearly grows with draws/frame. ### Resource usage (Task Manager) | Time | CPU | RAM used | Commit | GPU 3D | VRAM dedicated | VRAM shared | GPU temp | |---|---|---|---|---|---|---|---| | 09:02 | 89–96% | 28.0/31.9 GB (88%) | 49.5/55.9 GB | 51% | 7.6/8.0 GB | 8.5/16 GB | 43 °C | | 09:06 | 89–98% | 27.3–28.0 GB (86–88%) | 48.7/55.9 GB | 64–66% | 7.5/8.0 GB | 7.3/16 GB | 51–54 °C | | 09:18 | 73–94% | 28.1–29.1 GB (88–91%) | – | 80–81% | 7.5/8.0 GB | 7.9/16 GB | 45–46 °C | Observations (not conclusions): - CPU is at 89–98% in every scene while GPU 3D is only 51–66% in lighter scenes, which suggests a CPU-side limit (HLE/translation). In the dense area (9679 draws) the GPU rose to 80%. - Dedicated VRAM is pinned at 7.5–7.6 of 8.0 GB the whole time, so texture eviction is probably active. - System RAM reaches 91% and commit charge about 49.5 of 55.9 GB. - No crash or device loss in 25 minutes of testing. ### Visual issues New, not listed in "Problemas conhecidos": 1. **Dark/blurred rectangular blocks over water and terrain** in the aerial bridge cutscene (09:03) and in the boat segment (09:05). They look like tiles that were not resolved or streamed. 2. **Over-exposed white halo around character models** in close-up gameplay (09:01), with very noisy hair. Possibly already known: 3. Police/NPC textures black or undefined in gameplay (09:01). 4. Some textures not fully clean/high-res (08:59–09:01). 5. Graphical artifacts during the first mission (09:06). ### Comparison with the README The README (state of 25/11) reports 1–5 fps in cutscenes and 4–7 fps in gameplay at 1080p. Here I measured 16–21 fps in cutscenes and 9–15 fps in gameplay. This may be due to commits after 25/11 or to the settings above; please tell me which commit your table refers to. ### Questions - Is the fps gain expected with the current `main`? - Are the rectangular blocks (1) a known texture/tile streaming issue? - Would you like a run with `VICTORY_CAPTURE` and `VICTORY_D3D12_DRED=1` on a specific scene? <img width="1920" height="1080" alt="0qXYt2jHc8" src="https://github.com/user-attachments/assets/f9af9aac-3134-4db4-a81a-62bb61369bfd" /> <img width="1920" height="1080" alt="3UU5tCUCKP" src="https://github.com/user-attachments/assets/559682ae-f431-484c-8397-2e8e394f19ea" /> <img width="1920" height="1080" alt="9dh7uPl2cR" src="https://github.com/user-attachments/assets/354fd64a-6123-4860-859a-08422be24483" /> <img width="1920" height="1080" alt="BE6M3BDw1M" src="https://github.com/user-attachments/assets/09660993-444d-4e9c-a610-3df5e89d88c9" /> <img width="1920" height="1080" alt="dRoutmCaiX" src="https://github.com/user-attachments/assets/7e254fa8-50d5-41ac-bff8-ff1fc2638a28" /> <img width="1920" height="1080" alt="GPGxJqbwmr" src="https://github.com/user-attachments/assets/4f8a402d-9941-40a8-9e1a-6f74511cfd3a" /> <img width="1920" height="1080" alt="H8yL1X6mA3" src="https://github.com/user-attachments/assets/c9fc2a22-0d6c-4450-b20a-4f998e7980f4" /> <img width="1920" height="1080" alt="hVPwbmJwkl" src="https://github.com/user-attachments/assets/12b18a69-15ca-4bb1-add8-b456de08fc8d" /> <img width="1920" height="1080" alt="J1IWIpjuAd" src="https://github.com/user-attachments/assets/2d4cc41c-8738-471c-b549-5790ed00e1e5" /> <img width="1920" height="1079" alt="jAFJ3vvIQI" src="https://github.com/user-attachments/assets/a701defc-2535-437e-b982-dc16545d04de" /> <img width="2265" height="1080" alt="JYVQmEpNwW" src="https://github.com/user-attachments/assets/47b29f66-6188-4530-a91c-b90dcb617daf" /> <img width="1920" height="1080" alt="kGB3xErwd9" src="https://github.com/user-attachments/assets/22001903-f571-4df4-a07c-13630c4bf916" /> <img width="1920" height="1080" alt="Oe4SmvYU35" src="https://github.com/user-attachments/assets/4c5a707c-6e6a-41ee-850a-82dff7c3806d" /> <img width="1920" height="1080" alt="oS4olQowO4" src="https://github.com/user-attachments/assets/4a2c566c-80f9-40fe-b750-ddf4f23b2a9e" /> <img width="1920" height="1080" alt="qnMtVYEVA3" src="https://github.com/user-attachments/assets/93ca203d-5953-43bb-b6d9-27aeae807623" /> <img width="1920" height="1080" alt="Qwff54QZxs" src="https://github.com/user-attachments/assets/33c62dba-a763-43f5-8a6f-8ec107efc3c0" /> <img width="1920" height="1080" alt="RH14HatFkX" src="https://github.com/user-attachments/assets/017b7c26-d316-4f15-9255-20464823be25" /> <img width="1920" height="1080" alt="UOm0dI5oYH" src="https://github.com/user-attachments/assets/86c54f62-ae47-456f-a15a-4bac6d5817d0" /> <img width="1920" height="1080" alt="uyHDfmakMo" src="https://github.com/user-attachments/assets/01d34384-5211-470c-a738-17d9be6ede8b" /> <img width="1920" height="1032" alt="victory_LBC5gMYwgc" src="https://github.com/user-attachments/assets/1046470c-4506-4201-a7a3-c2e092612d7c" /> <img width="1920" height="1080" alt="VzP3L8iH04" src="https://github.com/user-attachments/assets/29dc383a-94f1-4e05-a014-e59eb8fd68b1" /> <img width="1920" height="1080" alt="Wfs5W6SVcg" src="https://github.com/user-attachments/assets/0784437d-aa3d-497d-86ff-adbc873fb4bd" /> <img width="1920" height="1080" alt="XcoOfhRwcs" src="https://github.com/user-attachments/assets/b490b1a5-6e58-43c0-8c4d-f888dbac7999" /> <img width="1920" height="1080" alt="XTIeN8puCt" src="https://github.com/user-attachments/assets/76ef25a2-42dc-43a2-9b1d-ee02957c415f" /> <img width="1920" height="1080" alt="YYV6OhtF0g" src="https://github.com/user-attachments/assets/5bcebfeb-e120-46b2-8f5e-40a1bd8d123f" />
edsuuu commented 2026-11-28 14:48:36 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:48:36Z.

Review: CHANGES_REQUESTED


Oi, Dimasaas, obrigado pelo PR. As medidas reais na 2060 (1,5-8 fps na 1ª sessão, 8-12,5 fps na 2ª) e a análise de RAM, com a tabela de para onde vão os 7,6 GB, estão muito boas e dão base para decidir. O VICTORY_TEXTURE_MIP_DROP já nasce desligado por padrão, com testes de unidade para o mapeamento de subresources, e o -LowVram é um perfil claro para placas de 6 GB.

Peço mudanças em poucos pontos, quase todos sobre o que fica ligado por padrão sem medida no jogo:

  1. Opt-in até medir. A regra deste fork é: chave nova fica desligada por padrão até haver medida no jogo. Dois comportamentos novos valem para todo mundo sem medida: VICTORY_LOW_RAM (liga sozinho com <= 20 GiB) e a mudança do pool ("bloco mais cheio" mais o limite de 1/8 em blocos vazios, que o PR diz "ainda não medido em jogo"). Peço que os dois fiquem opt-in (=1 liga) ou que venham as medidas (fps, RAM livre, page faults) com e sem. Detalhes nos comentários das linhas.
  2. -LowVram mistura luz com VRAM. VICTORY_AMBIENT_AIR=0.3 não poupa VRAM; é o que dá o aspecto de "chams" que você mesmo relatou. Peço para tirar do perfil (ou criar um switch separado). O VICTORY_LATE_WAIT_LISTS=256 já é o padrão da main, então também sobra.
  3. Formatação. A indentação do match em give_chunks está fora do rustfmt.
  4. Rebase. A main andou em scripts/play.ps1 desde a base do PR (ed21d00dc e outros). Hoje a fusão ainda sai sem conflito, mas por favor faça rebase na main atual e rode de novo os testes do crate victory-gpu antes de pedir nova revisão.
  5. Nomes em inglês. Conferi: todas as chaves (VICTORY_*), os parâmetros do play.ps1 (-LowVram, -LowRam, -InPlace), os comentários de código e as mensagens de commit estão em inglês. Está certo, por favor mantenha assim (o xtask confere os fontes).

Sem os itens 1 e 2 eu não consigo aprovar; o resto é pequeno. Se você trouxer as medidas do item 1 eu volto a olhar com prazer, e o -LowRam/-InPlace como switches opt-in (já marcados "untested") podem entrar como estão.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review:6098460239 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#pullrequestreview-6098460239). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:48:36Z. **Review:** CHANGES_REQUESTED --- Oi, Dimasaas, obrigado pelo PR. As medidas reais na 2060 (1,5-8 fps na 1ª sessão, 8-12,5 fps na 2ª) e a análise de RAM, com a tabela de para onde vão os 7,6 GB, estão muito boas e dão base para decidir. O `VICTORY_TEXTURE_MIP_DROP` já nasce desligado por padrão, com testes de unidade para o mapeamento de subresources, e o `-LowVram` é um perfil claro para placas de 6 GB. Peço mudanças em poucos pontos, quase todos sobre o que fica ligado por padrão sem medida no jogo: 1. **Opt-in até medir.** A regra deste fork é: chave nova fica desligada por padrão até haver medida no jogo. Dois comportamentos novos valem para todo mundo sem medida: `VICTORY_LOW_RAM` (liga sozinho com <= 20 GiB) e a mudança do pool ("bloco mais cheio" mais o limite de 1/8 em blocos vazios, que o PR diz "ainda não medido em jogo"). Peço que os dois fiquem opt-in (`=1` liga) ou que venham as medidas (fps, RAM livre, page faults) com e sem. Detalhes nos comentários das linhas. 2. **`-LowVram` mistura luz com VRAM.** `VICTORY_AMBIENT_AIR=0.3` não poupa VRAM; é o que dá o aspecto de "chams" que você mesmo relatou. Peço para tirar do perfil (ou criar um switch separado). O `VICTORY_LATE_WAIT_LISTS=256` já é o padrão da main, então também sobra. 3. **Formatação.** A indentação do `match` em `give_chunks` está fora do `rustfmt`. 4. **Rebase.** A main andou em `scripts/play.ps1` desde a base do PR (ed21d00dc e outros). Hoje a fusão ainda sai sem conflito, mas por favor faça rebase na main atual e rode de novo os testes do crate `victory-gpu` antes de pedir nova revisão. 5. **Nomes em inglês.** Conferi: todas as chaves (`VICTORY_*`), os parâmetros do `play.ps1` (`-LowVram`, `-LowRam`, `-InPlace`), os comentários de código e as mensagens de commit estão em inglês. Está certo, por favor mantenha assim (o xtask confere os fontes). Sem os itens 1 e 2 eu não consigo aprovar; o resto é pequeno. Se você trouxer as medidas do item 1 eu volto a olhar com prazer, e o `-LowRam`/`-InPlace` como switches opt-in (já marcados "untested") podem entrar como estão.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/host.rs; line 378

@@ -363,6 +363,48 @@ pub(crate) fn keep_freed() -> bool {
     *ON.get_or_init(|| std::env::var_os("VICTORY_KEEP_FREED").is_none_or(|v| v != "0"))
 }
 
+/// Whether the PC has little memory (`VICTORY_LOW_RAM=1`, or unset and at
+/// most 20 GiB of RAM; `=0`: never). On 16 GB the title's ~10 GB and our
+/// ~7.6 GB of PC memory shared with the card (RTX 2060 run, 2026-11-27) left
+/// 0.3 GB free and Windows paged the title out: the caches of memory kept
+/// "for later" are then smaller (scratch chunks, send memory, idle lists).
+pub(crate) fn low_ram() -> bool {
+    static ON: OnceLock<bool> = OnceLock::new();
+    *ON.get_or_init(|| {
+        let on = match std::env::var("VICTORY_LOW_RAM").as_deref() {
+            Ok("1") => true,
+            Ok("0") => false,
+            _ => total_physical_ram().is_some_and(|total| low_ram_for(total)),
+        };

Aqui o VICTORY_LOW_RAM liga sozinho com <= 20 GiB, ou seja, muda o comportamento de todo PC de 16 GB sem ninguém ter medido no jogo (o PR diz "só código, ainda sem teste no jogo"). Regra do fork: chave nova fica desligada por padrão até medir. Peço que o caso _ (sem a variável) devolva false e que =1 ligue; quando houver medida (fps, RAM livre, page faults, com e sem), a gente liga o automático em outro PR.

Detalhe pequeno: is_some_and(|total| low_ram_for(total)) pode ser is_some_and(low_ram_for) (clippy redundant_closure).

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499880 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499880). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/host.rs`; line 378 ~~~~diff @@ -363,6 +363,48 @@ pub(crate) fn keep_freed() -> bool { *ON.get_or_init(|| std::env::var_os("VICTORY_KEEP_FREED").is_none_or(|v| v != "0")) } +/// Whether the PC has little memory (`VICTORY_LOW_RAM=1`, or unset and at +/// most 20 GiB of RAM; `=0`: never). On 16 GB the title's ~10 GB and our +/// ~7.6 GB of PC memory shared with the card (RTX 2060 run, 2026-11-27) left +/// 0.3 GB free and Windows paged the title out: the caches of memory kept +/// "for later" are then smaller (scratch chunks, send memory, idle lists). +pub(crate) fn low_ram() -> bool { + static ON: OnceLock<bool> = OnceLock::new(); + *ON.get_or_init(|| { + let on = match std::env::var("VICTORY_LOW_RAM").as_deref() { + Ok("1") => true, + Ok("0") => false, + _ => total_physical_ram().is_some_and(|total| low_ram_for(total)), + }; ~~~~ --- Aqui o `VICTORY_LOW_RAM` liga sozinho com <= 20 GiB, ou seja, muda o comportamento de todo PC de 16 GB sem ninguém ter medido no jogo (o PR diz "só código, ainda sem teste no jogo"). Regra do fork: chave nova fica desligada por padrão até medir. Peço que o caso `_` (sem a variável) devolva `false` e que `=1` ligue; quando houver medida (fps, RAM livre, page faults, com e sem), a gente liga o automático em outro PR. Detalhe pequeno: `is_some_and(|total| low_ram_for(total))` pode ser `is_some_and(low_ram_for)` (clippy `redundant_closure`).
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/host.rs; line 1977

@@ -1926,7 +1970,11 @@ fn give_chunks(chunks: Vec<(Chunk, u64)>) {
         let mut spare = SPARE.lock().unwrap_or_else(|e| e.into_inner());
         for (chunk, size) in chunks {
             let back = if scratch_pool() {
-                spare.give(chunk, size, if keep_freed() { SPARE_KEPT } else { SPARE_MOST })
+                spare.give(chunk, size, match (keep_freed(), low_ram()) {
+            (true, false) => SPARE_KEPT,
+            (true, true) => SPARE_KEPT_LOW_RAM,
+            (false, _) => SPARE_MOST,
+        })

A indentação deste match está fora do formato (os braços e o }) estão no nível do if, não do argumento). Rode cargo fmt no crate, ou mova o match para um let kept = match (keep_freed(), low_ram()) { ... }; antes do spare.give(chunk, size, kept), que fica mais legível.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499884 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499884). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/host.rs`; line 1977 ~~~~diff @@ -1926,7 +1970,11 @@ fn give_chunks(chunks: Vec<(Chunk, u64)>) { let mut spare = SPARE.lock().unwrap_or_else(|e| e.into_inner()); for (chunk, size) in chunks { let back = if scratch_pool() { - spare.give(chunk, size, if keep_freed() { SPARE_KEPT } else { SPARE_MOST }) + spare.give(chunk, size, match (keep_freed(), low_ram()) { + (true, false) => SPARE_KEPT, + (true, true) => SPARE_KEPT_LOW_RAM, + (false, _) => SPARE_MOST, + }) ~~~~ --- A indentação deste `match` está fora do formato (os braços e o `})` estão no nível do `if`, não do argumento). Rode `cargo fmt` no crate, ou mova o `match` para um `let kept = match (keep_freed(), low_ram()) { ... };` antes do `spare.give(chunk, size, kept)`, que fica mais legível.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/host/send.rs; line 131

@@ -120,7 +120,15 @@ static SPARE: Mutex<Vec<Memory>> = Mutex::new(Vec::new());
 
 /// At most this much is kept (of the card's memory, with [`on_card`]).
 fn kept() -> u64 {
-    if on_card() { 256 << 20 } else { 768 << 20 }
+    // (Little PC memory: 128 MiB, at ~23 MB sent a frame still several
+    // frames of it.)
+    if on_card() {
+        256 << 20
+    } else if super::low_ram() {
+        128 << 20
+    } else {
+        768 << 20
+    }

128 MiB de memória de envio guardada (contra 768) é um valor sem medida: o comentário ("at ~23 MB sent a frame still several frames of it") é uma conta, não um fps medido. Se faltar memória guardada, a thread de envio volta a alocar a cada quadro. Fica atrás do opt-in, e peço o fps/ms de envio com 128 e 768 antes de virar padrão.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499887 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499887). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/host/send.rs`; line 131 ~~~~diff @@ -120,7 +120,15 @@ static SPARE: Mutex<Vec<Memory>> = Mutex::new(Vec::new()); /// At most this much is kept (of the card's memory, with [`on_card`]). fn kept() -> u64 { - if on_card() { 256 << 20 } else { 768 << 20 } + // (Little PC memory: 128 MiB, at ~23 MB sent a frame still several + // frames of it.) + if on_card() { + 256 << 20 + } else if super::low_ram() { + 128 << 20 + } else { + 768 << 20 + } ~~~~ --- 128 MiB de memória de envio guardada (contra 768) é um valor sem medida: o comentário ("at ~23 MB sent a frame still several frames of it") é uma conta, não um fps medido. Se faltar memória guardada, a thread de envio volta a alocar a cada quadro. Fica atrás do opt-in, e peço o fps/ms de envio com 128 e 768 antes de virar padrão.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/list.rs; line 272

@@ -263,6 +263,14 @@ static IDLE: std::sync::Mutex<(Vec<Idle>, u64)> = std::sync::Mutex::new((Vec::ne
 #[cfg(windows)]
 const IDLE_MOST: (usize, u64) = (512, 256 << 20);
 
+/// How many idle lists are kept: half of [`IDLE_MOST`] with little PC memory
+/// (`crate::host::low_ram`), whose allocators keep what they grew to (not
+/// 128: that cost 12 % of the submitting thread).
+#[cfg(windows)]
+fn idle_most() -> usize {
+    if crate::host::low_ram() { IDLE_MOST.0 / 2 } else { IDLE_MOST.0 }
+}

Aqui o comentário diz que 128 listas paradas custaram 12% da thread de envio e escolhe 256 sem ter medido o 256 (metade de 512 pode custar bem mais que 0%). Peço a medida com 256 (e 512) antes de ligar isso para quem não pediu.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499891 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499891). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/list.rs`; line 272 ~~~~diff @@ -263,6 +263,14 @@ static IDLE: std::sync::Mutex<(Vec<Idle>, u64)> = std::sync::Mutex::new((Vec::ne #[cfg(windows)] const IDLE_MOST: (usize, u64) = (512, 256 << 20); +/// How many idle lists are kept: half of [`IDLE_MOST`] with little PC memory +/// (`crate::host::low_ram`), whose allocators keep what they grew to (not +/// 128: that cost 12 % of the submitting thread). +#[cfg(windows)] +fn idle_most() -> usize { + if crate::host::low_ram() { IDLE_MOST.0 / 2 } else { IDLE_MOST.0 } +} ~~~~ --- Aqui o comentário diz que 128 listas paradas custaram 12% da thread de envio e escolhe 256 sem ter medido o 256 (metade de 512 pode custar bem mais que 0%). Peço a medida com 256 (e 512) antes de ligar isso para quem não pediu.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/pool.rs; line 53

@@ -47,7 +47,11 @@ pub(crate) fn room(memory: Option<[u64; 4]>) {
 
 fn spares(memory: Option<[u64; 4]>, keep: bool) -> usize {
     match memory {
-        Some([budget, used, ..]) if keep && u128::from(used) * 100 < u128::from(budget) * 85 => SPARE_KEPT,
+        // Empty blocks are card memory no texture uses: an eighth of the
+        // budget at most (6 GB card, ~4.3 GB budget: 8 blocks, not 64).
+        Some([budget, used, ..]) if keep && u128::from(used) * 100 < u128::from(budget) * 85 => {
+            SPARE_KEPT.min((budget / BLOCK / 8) as usize).max(SPARE)

O pool de texturas é o padrão de todas as placas, e esta linha muda o número de blocos vazios guardados para qualquer GPU com used < 85% do orçamento (o min(budget / BLOCK / 8)), não só as de 6 GB. O PR diz "ainda não medido em jogo", e o -LowVram desliga o pool (VICTORY_TEXTURE_POOL=0), então nem o perfil novo exercita esse caminho. Peço o opt-in (ex.: uma chave nova =1) ou medidas de uma placa de 8-12 GB e uma de 24 GB mostrando que não piora (fps, tempo de criação de textura, VRAM usada).

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499895 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499895). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/pool.rs`; line 53 ~~~~diff @@ -47,7 +47,11 @@ pub(crate) fn room(memory: Option<[u64; 4]>) { fn spares(memory: Option<[u64; 4]>, keep: bool) -> usize { match memory { - Some([budget, used, ..]) if keep && u128::from(used) * 100 < u128::from(budget) * 85 => SPARE_KEPT, + // Empty blocks are card memory no texture uses: an eighth of the + // budget at most (6 GB card, ~4.3 GB budget: 8 blocks, not 64). + Some([budget, used, ..]) if keep && u128::from(used) * 100 < u128::from(budget) * 85 => { + SPARE_KEPT.min((budget / BLOCK / 8) as usize).max(SPARE) ~~~~ --- O pool de texturas é o padrão de todas as placas, e esta linha muda o número de blocos vazios guardados para qualquer GPU com `used < 85%` do orçamento (o `min(budget / BLOCK / 8)`), não só as de 6 GB. O PR diz "ainda não medido em jogo", e o `-LowVram` desliga o pool (`VICTORY_TEXTURE_POOL=0`), então nem o perfil novo exercita esse caminho. Peço o opt-in (ex.: uma chave nova `=1`) ou medidas de uma placa de 8-12 GB e uma de 24 GB mostrando que não piora (fps, tempo de criação de textura, VRAM usada).
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/pool.rs; line 239

@@ -209,15 +223,25 @@ impl<B: Clone> Pool<B> {
             return None;
         }
         self.rested(now);
+        // The fullest ripe block it fits in, so that pieces gather in few
+        // blocks and the others empty and go: the first with room spread
+        // them, and blocks holding a few textures each kept ~3 GB of a 6 GB
+        // card committed and empty (Marvisak/VIctory#3552).
+        let fullest = self
+            .blocks
+            .iter()
+            .enumerate()
+            .filter_map(|(i, b)| {
+                let b = b.as_ref()?;
+                (ripe.is(b) && b.free.fits(len, align)).then(|| (b.free.free_bytes(), i))
+            })
+            .min()
+            .map(|(_, i)| i);

Mesma questão na escolha do bloco: percorrer todos os blocos e fazer fits (varredura nos intervalos livres) a cada take é custo novo em caminho quente, e a troca de "primeiro com espaço" para "mais cheio" muda onde cada textura cai em todas as placas. O teste de unidade pieces_go_to_the_fullest_block... está bom, mas não mostra o efeito no jogo. Opt-in ou medida (tempo de take e VRAM comprometida, antes e depois), por favor.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499900 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499900). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/pool.rs`; line 239 ~~~~diff @@ -209,15 +223,25 @@ impl<B: Clone> Pool<B> { return None; } self.rested(now); + // The fullest ripe block it fits in, so that pieces gather in few + // blocks and the others empty and go: the first with room spread + // them, and blocks holding a few textures each kept ~3 GB of a 6 GB + // card committed and empty (Marvisak/VIctory#3552). + let fullest = self + .blocks + .iter() + .enumerate() + .filter_map(|(i, b)| { + let b = b.as_ref()?; + (ripe.is(b) && b.free.fits(len, align)).then(|| (b.free.free_bytes(), i)) + }) + .min() + .map(|(_, i)| i); ~~~~ --- Mesma questão na escolha do bloco: percorrer todos os blocos e fazer `fits` (varredura nos intervalos livres) a cada `take` é custo novo em caminho quente, e a troca de "primeiro com espaço" para "mais cheio" muda onde cada textura cai em todas as placas. O teste de unidade `pieces_go_to_the_fullest_block...` está bom, mas não mostra o efeito no jogo. Opt-in ou medida (tempo de `take` e VRAM comprometida, antes e depois), por favor.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: crates/victory-gpu/src/list.rs; line 1067

@@ -1021,6 +1029,49 @@ pub(crate) static CLIPPED_COPIES: [std::sync::atomic::AtomicU64; 2] =
 #[cfg(windows)]
 pub(crate) static SELF_COPIES: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0);
 
+/// A whole-resource copy from host copy `from` to `to` whose first levels
+/// are other levels of the title's (`VICTORY_TEXTURE_MIP_DROP`): each level
+/// and slice both have, of the same size, as its own copy. Ported from
+/// Marvisak/VIctory#2146 (antikohza).
+#[cfg(windows)]
+fn copy_levels(list: &crate::host::HostList, to: &crate::resource::HostTexture, from: &crate::resource::HostTexture) {
+    use windows::Win32::Graphics::Direct3D12::{
+        D3D12_RESOURCE_DESC, D3D12_RESOURCE_DIMENSION_TEXTURE3D, D3D12_TEXTURE_COPY_LOCATION,
+        D3D12_TEXTURE_COPY_LOCATION_0, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, ID3D12Resource,
+    };
+    // SAFETY: live resources.
+    let (a, b) = unsafe { (to.texture.GetDesc(), from.texture.GetDesc()) };
+    if a.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D
+        || a.Dimension != b.Dimension
+        || a.SampleDesc.Count != b.SampleDesc.Count
+        || crate::resource::family(a.Format.0 as u32) != crate::resource::family(b.Format.0 as u32)
+    {
+        tracing::debug!("a copy between host copies of other levels and unlike formats left out");
+        return;
+    }
+    let mips = |d: &D3D12_RESOURCE_DESC| u32::from(d.MipLevels).max(1);
+    let size = |d: &D3D12_RESOURCE_DESC, level: u32| ((d.Width >> level).max(1), (d.Height >> level).max(1));
+    let slices = u32::from(a.DepthOrArraySize.min(b.DepthOrArraySize)).max(1);
+    let last = (mips(&a) + to.base).min(mips(&b) + from.base);
+    let at = |texture: &ID3D12Resource, sub: u32| D3D12_TEXTURE_COPY_LOCATION {
+        // SAFETY: borrowed for the call; the list holds both textures.
+        pResource: unsafe { std::mem::transmute_copy(texture) },
+        Type: D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX,
+        Anonymous: D3D12_TEXTURE_COPY_LOCATION_0 { SubresourceIndex: sub },
+    };
+    for slice in 0..slices {
+        for level in to.base.max(from.base)..last {
+            let (x, y) = (level - to.base, level - from.base);
+            if size(&a, x) != size(&b, y) {
+                continue;
+            }

Sem teste direto: a copy_levels (e o mapeamento nos resolve/read_back) só é coberta indiretamente por map_sub. Como está desligada por padrão, não bloqueia, mas vale extrair o cálculo de níveis (last/x/y) para uma função pura com teste, e pôr uma contagem em log das cópias puladas (o continue por tamanho diferente é silencioso), para quem ligar o -LowVram poder dizer se isso está acontecendo.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499902 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499902). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `crates/victory-gpu/src/list.rs`; line 1067 ~~~~diff @@ -1021,6 +1029,49 @@ pub(crate) static CLIPPED_COPIES: [std::sync::atomic::AtomicU64; 2] = #[cfg(windows)] pub(crate) static SELF_COPIES: std::sync::atomic::AtomicU64 = std::sync::atomic::AtomicU64::new(0); +/// A whole-resource copy from host copy `from` to `to` whose first levels +/// are other levels of the title's (`VICTORY_TEXTURE_MIP_DROP`): each level +/// and slice both have, of the same size, as its own copy. Ported from +/// Marvisak/VIctory#2146 (antikohza). +#[cfg(windows)] +fn copy_levels(list: &crate::host::HostList, to: &crate::resource::HostTexture, from: &crate::resource::HostTexture) { + use windows::Win32::Graphics::Direct3D12::{ + D3D12_RESOURCE_DESC, D3D12_RESOURCE_DIMENSION_TEXTURE3D, D3D12_TEXTURE_COPY_LOCATION, + D3D12_TEXTURE_COPY_LOCATION_0, D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, ID3D12Resource, + }; + // SAFETY: live resources. + let (a, b) = unsafe { (to.texture.GetDesc(), from.texture.GetDesc()) }; + if a.Dimension == D3D12_RESOURCE_DIMENSION_TEXTURE3D + || a.Dimension != b.Dimension + || a.SampleDesc.Count != b.SampleDesc.Count + || crate::resource::family(a.Format.0 as u32) != crate::resource::family(b.Format.0 as u32) + { + tracing::debug!("a copy between host copies of other levels and unlike formats left out"); + return; + } + let mips = |d: &D3D12_RESOURCE_DESC| u32::from(d.MipLevels).max(1); + let size = |d: &D3D12_RESOURCE_DESC, level: u32| ((d.Width >> level).max(1), (d.Height >> level).max(1)); + let slices = u32::from(a.DepthOrArraySize.min(b.DepthOrArraySize)).max(1); + let last = (mips(&a) + to.base).min(mips(&b) + from.base); + let at = |texture: &ID3D12Resource, sub: u32| D3D12_TEXTURE_COPY_LOCATION { + // SAFETY: borrowed for the call; the list holds both textures. + pResource: unsafe { std::mem::transmute_copy(texture) }, + Type: D3D12_TEXTURE_COPY_TYPE_SUBRESOURCE_INDEX, + Anonymous: D3D12_TEXTURE_COPY_LOCATION_0 { SubresourceIndex: sub }, + }; + for slice in 0..slices { + for level in to.base.max(from.base)..last { + let (x, y) = (level - to.base, level - from.base); + if size(&a, x) != size(&b, y) { + continue; + } ~~~~ --- Sem teste direto: a `copy_levels` (e o mapeamento nos `resolve`/`read_back`) só é coberta indiretamente por `map_sub`. Como está desligada por padrão, não bloqueia, mas vale extrair o cálculo de níveis (`last`/`x`/`y`) para uma função pura com teste, e pôr uma contagem em log das cópias puladas (o `continue` por tamanho diferente é silencioso), para quem ligar o `-LowVram` poder dizer se isso está acontecendo.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: scripts/play.ps1; line 57

@@ -43,6 +51,27 @@ if ($Safe) {
 # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader
 # cache is keyed on this one: `victory shaders` has to run with the same value.
 if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' }
+if ($LowVram) {
+    # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty,
+    # so the card went over budget and new textures were refused (Marvisak/VIctory#3552).
+    $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0'

Este comentário (e o VICTORY_TEXTURE_POOL = '0') ficou velho: dizem que o pool segura ~3 GB vazios, que é justamente o que o commit "pool: pieces go to the fullest block" tenta consertar. Qual dos dois vale? Se o pool novo resolve, o perfil deveria deixá-lo ligado (e medir assim); se o perfil precisa desligar o pool, a mudança de pool só mexe em quem não usa -LowVram e é mais um motivo para ficar opt-in.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499904 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499904). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `scripts/play.ps1`; line 57 ~~~~diff @@ -43,6 +51,27 @@ if ($Safe) { # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader # cache is keyed on this one: `victory shaders` has to run with the same value. if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' } +if ($LowVram) { + # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty, + # so the card went over budget and new textures were refused (Marvisak/VIctory#3552). + $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0' ~~~~ --- Este comentário (e o `VICTORY_TEXTURE_POOL = '0'`) ficou velho: dizem que o pool segura ~3 GB vazios, que é justamente o que o commit "pool: pieces go to the fullest block" tenta consertar. Qual dos dois vale? Se o pool novo resolve, o perfil deveria deixá-lo ligado (e medir assim); se o perfil precisa desligar o pool, a mudança de pool só mexe em quem não usa `-LowVram` e é mais um motivo para ficar opt-in.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: scripts/play.ps1; line 58

@@ -43,6 +51,27 @@ if ($Safe) {
 # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader
 # cache is keyed on this one: `victory shaders` has to run with the same value.
 if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' }
+if ($LowVram) {
+    # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty,
+    # so the card went over budget and new textures were refused (Marvisak/VIctory#3552).
+    $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0'
+    $settings.VICTORY_LATE_WAIT_LISTS = '256'; $settings.VICTORY_AMBIENT_AIR = '0.3'

Dois itens aqui: (1) VICTORY_AMBIENT_AIR = '0.3' é luz, não VRAM (a main usa 0.8); é o que dá o aspecto de "chams" e as faixas de cor que você relatou. Peço para tirar do -LowVram ou pôr em um switch separado, para o perfil mexer só no que é memória. (2) VICTORY_LATE_WAIT_LISTS = '256' já é o padrão da main (host.rs, unwrap_or(256)), então a linha não faz nada.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499909 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499909). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `scripts/play.ps1`; line 58 ~~~~diff @@ -43,6 +51,27 @@ if ($Safe) { # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader # cache is keyed on this one: `victory shaders` has to run with the same value. if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' } +if ($LowVram) { + # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty, + # so the card went over budget and new textures were refused (Marvisak/VIctory#3552). + $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0' + $settings.VICTORY_LATE_WAIT_LISTS = '256'; $settings.VICTORY_AMBIENT_AIR = '0.3' ~~~~ --- Dois itens aqui: (1) `VICTORY_AMBIENT_AIR = '0.3'` é luz, não VRAM (a main usa 0.8); é o que dá o aspecto de "chams" e as faixas de cor que você relatou. Peço para tirar do `-LowVram` ou pôr em um switch separado, para o perfil mexer só no que é memória. (2) `VICTORY_LATE_WAIT_LISTS = '256'` já é o padrão da main (`host.rs`, `unwrap_or(256)`), então a linha não faz nada.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: scripts/play.ps1; line 62

@@ -43,6 +51,27 @@ if ($Safe) {
 # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader
 # cache is keyed on this one: `victory shaders` has to run with the same value.
 if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' }
+if ($LowVram) {
+    # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty,
+    # so the card went over budget and new textures were refused (Marvisak/VIctory#3552).
+    $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0'
+    $settings.VICTORY_LATE_WAIT_LISTS = '256'; $settings.VICTORY_AMBIENT_AIR = '0.3'
+    # Title buffers and memory windows on the card, room made by one mip level less of large
+    # sampled textures: ~280 -> ~100 ms a frame on a GTX 1660 6 GB (Impre-visible/victory-gtx1660).
+    $settings.VICTORY_CARD_BUFFERS_MB = '1024'; $settings.VICTORY_CARD_WINDOWS_MB = '256'
+    $settings.VICTORY_TEXTURE_MIP_DROP = '1'

VICTORY_TEXTURE_MIP_DROP = '1' dentro do perfil está ok (a chave em si é opt-in e a medida da 1660 ajuda). Só peço que fique registrado no README/problemas conhecidos que isso reduz a nitidez das texturas grandes e que shaders que pedem o tamanho da textura veem a menor, como diz o comentário do código.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499911 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499911). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `scripts/play.ps1`; line 62 ~~~~diff @@ -43,6 +51,27 @@ if ($Safe) { # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader # cache is keyed on this one: `victory shaders` has to run with the same value. if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' } +if ($LowVram) { + # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty, + # so the card went over budget and new textures were refused (Marvisak/VIctory#3552). + $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0' + $settings.VICTORY_LATE_WAIT_LISTS = '256'; $settings.VICTORY_AMBIENT_AIR = '0.3' + # Title buffers and memory windows on the card, room made by one mip level less of large + # sampled textures: ~280 -> ~100 ms a frame on a GTX 1660 6 GB (Impre-visible/victory-gtx1660). + $settings.VICTORY_CARD_BUFFERS_MB = '1024'; $settings.VICTORY_CARD_WINDOWS_MB = '256' + $settings.VICTORY_TEXTURE_MIP_DROP = '1' ~~~~ --- `VICTORY_TEXTURE_MIP_DROP = '1'` dentro do perfil está ok (a chave em si é opt-in e a medida da 1660 ajuda). Só peço que fique registrado no README/problemas conhecidos que isso reduz a nitidez das texturas grandes e que shaders que pedem o tamanho da textura veem a menor, como diz o comentário do código.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Code review location: scripts/play.ps1; line 68

@@ -43,6 +51,27 @@ if ($Safe) {
 # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader
 # cache is keyed on this one: `victory shaders` has to run with the same value.
 if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' }
+if ($LowVram) {
+    # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty,
+    # so the card went over budget and new textures were refused (Marvisak/VIctory#3552).
+    $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0'
+    $settings.VICTORY_LATE_WAIT_LISTS = '256'; $settings.VICTORY_AMBIENT_AIR = '0.3'
+    # Title buffers and memory windows on the card, room made by one mip level less of large
+    # sampled textures: ~280 -> ~100 ms a frame on a GTX 1660 6 GB (Impre-visible/victory-gtx1660).
+    $settings.VICTORY_CARD_BUFFERS_MB = '1024'; $settings.VICTORY_CARD_WINDOWS_MB = '256'
+    $settings.VICTORY_TEXTURE_MIP_DROP = '1'
+}
+if ($LowRam) {
+    # 16 GB PCs (untested in the game): windows of title memory cut to what is asked (4.1 GB of PC
+    # memory shared with the card were 4 MiB-grid windows on an RTX 2060 run), no command-list
+    # breadcrumbs. Smaller caches come from VICTORY_LOW_RAM, on by itself at <= 20 GiB.
+    $settings.VICTORY_WINDOW_KB = '256'; $settings.VICTORY_WINDOW_TAILS = '1'; $settings.VICTORY_D3D12_DRED = '0'

VICTORY_D3D12_DRED = '0' não poupa RAM em quem joga no release: o DRED só existe no build de diagnóstico (no release a chave nem é lida). E no diag ele desliga justamente os breadcrumbs que ajudaram a diagnosticar o 0x887A0005 da sua 1ª sessão. Sugiro tirar do -LowRam.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review-comment:4727499917 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#discussion_r4727499917). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Code review location:** `scripts/play.ps1`; line 68 ~~~~diff @@ -43,6 +51,27 @@ if ($Safe) { # Every ray test answers "nothing hit", unless the title's own ray tracing is asked for. The shader # cache is keyed on this one: `victory shaders` has to run with the same value. if ($RayTracing) { $settings.VICTORY_BVH_BUILDER = '1' } else { $settings.VICTORY_RT_MISS = '1' } +if ($LowVram) { + # One allocation per texture: on 6 GB the pool's 64 MiB blocks held ~3 GB committed but empty, + # so the card went over budget and new textures were refused (Marvisak/VIctory#3552). + $settings.VICTORY_DISPLAY_MODE = '1280x720'; $settings.VICTORY_TEXTURE_POOL = '0' + $settings.VICTORY_LATE_WAIT_LISTS = '256'; $settings.VICTORY_AMBIENT_AIR = '0.3' + # Title buffers and memory windows on the card, room made by one mip level less of large + # sampled textures: ~280 -> ~100 ms a frame on a GTX 1660 6 GB (Impre-visible/victory-gtx1660). + $settings.VICTORY_CARD_BUFFERS_MB = '1024'; $settings.VICTORY_CARD_WINDOWS_MB = '256' + $settings.VICTORY_TEXTURE_MIP_DROP = '1' +} +if ($LowRam) { + # 16 GB PCs (untested in the game): windows of title memory cut to what is asked (4.1 GB of PC + # memory shared with the card were 4 MiB-grid windows on an RTX 2060 run), no command-list + # breadcrumbs. Smaller caches come from VICTORY_LOW_RAM, on by itself at <= 20 GiB. + $settings.VICTORY_WINDOW_KB = '256'; $settings.VICTORY_WINDOW_TAILS = '1'; $settings.VICTORY_D3D12_DRED = '0' ~~~~ --- `VICTORY_D3D12_DRED = '0'` não poupa RAM em quem joga no release: o DRED só existe no build de diagnóstico (no release a chave nem é lida). E no diag ele desliga justamente os breadcrumbs que ajudaram a diagnosticar o `0x887A0005` da sua 1ª sessão. Sugiro tirar do `-LowRam`.
edsuuu commented 2026-11-28 14:50:11 +00:00 (Migrated from github.com)

Imported from edsuuu/VI-BR-PORT. Originally posted by edsuuu on 2026-11-28T14:50:11Z.

Review: COMMENTED


Estou pedindo alterações neste PR. Os comentários abaixo marcam no diff o trecho de cada ponto; o resumo e o veredito estão na review anterior. Quando os itens 1 e 2 (opt-in até medir e o -LowVram só com memória) estiverem resolvidos, peça nova revisão que eu olho de novo.

<!-- greyfinch-sync:edsuuu/VI-BR-PORT:review:6098471995 --> Imported from [edsuuu/VI-BR-PORT](https://github.com/edsuuu/VI-BR-PORT/pull/9#pullrequestreview-6098471995). Originally posted by [edsuuu](https://github.com/edsuuu) on 2026-11-28T14:50:11Z. **Review:** COMMENTED --- Estou pedindo alterações neste PR. Os comentários abaixo marcam no diff o trecho de cada ponto; o resumo e o veredito estão na review anterior. Quando os itens 1 e 2 (opt-in até medir e o `-LowVram` só com memória) estiverem resolvidos, peça nova revisão que eu olho de novo.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Reference
edsuuu/VI-BR-PORT!9
No description provided.