Ajuste para o pc se comportar como o xb. #1910

Open
opened 2026-11-26 04:48:27 +00:00 by github-bot · 3 comments
Owner

@⁠zaltronvitor-glitch on GitHub · 2026-11-25 00:41 UTC · original

metodologia de engenharia da Etapa 6, fazendo o meu PC (Intel Core i5-13420H de 4 P-Cores/8 threads + 4 E-Cores + RTX 4050 6GB VRAM + 16GB RAM) se comportar exatamente como a arquitetura de hardware do Xbox Series S:

ALOCAÇÃO DE PROCESSADOR IGUAL AO XBOX SERIES S (7 Núcleos Jogo + 1 Núcleo Sistema):

Reserve 1 núcleo físico (RESERVED_CPUS=1) para despacho de sistema/GPU.
Aloque exatamente 4 threads nos P-Cores (SHADER_THREADS=4 / workers=4) para compilação/tarefas pesadas, deixando os demais núcleos livres para as threads principais do jogo e para o módulo de Culling (campo de visão), sem causar inanição de CPU.

SIMULAÇÃO DA MEMÓRIA UNIFICADA DO SERIES S (Pools Rápido e Lento sem Gargalo PCIe):

O Xbox Series S divide a memória em 8 GB rápidos (224 GB/s para GPU) e 2 GB lentos (56 GB/s). Como minha RTX 4050 tem 6 GB (5.152 MB úteis no driver), isole a VRAM em dois pools que nunca estourem esse limite e nunca vazem para a RAM via PCIe:
Espelho de Buffers (Mirrors): 1700 MB fixos na VRAM.
Cache de Texturas Ativas: 1200 MB com compactação só em 90% (COMPACT_PCT=90) e retenção mínima de 300 frames (EVICT_MIN_UNUSED=300) para eliminar o thrashing de recarregar as mesmas texturas.
Reciclagem automática de memória virtual no Windows ativa (IMPORT_HIGH=80, IMPORT_LOW=65).
Corte o write-back inútil de listas de culling pela PCIe (WB_MAX_KB=512, WB_SHADOW_MB=128, WB_DIFF=1 / lazy write-back), sincronizando apenas os bytes modificados.

PERFIL GRÁFICO E ANTI-FLICKER DO SERIES S (Etapa 6):

Desative a resolução dinâmica (DYNRES=0) para o motor nunca destruir e recriar render targets no meio do gameplay (eliminando o bug "upload over a drawn image").
Trave a saída base em 1536x864 (ou 1080p) com escala 3D fixa em 67% (0.6667 = 1024x576), igual ao alvo interno de performance do Series S a 60 FPS.
Ative robustBufferAccess (ROBUST=1 / robust_buffers=2) para evitar flashes pretos no passe de GPU Culling.

DESPACHO IMEDIATO CPU -> GPU (MENOR MS POR FRAME):

Desative a retenção em lote (BATCH=0) e mantenha submissão direta com leitura parcial de readback (READBACK_PART=1) para o medidor de exposição de luz não piscar.
Ative descompressão/unswizzle de texturas direto nos Compute Shaders da GPU (GPU_UNSWIZZLE=1, LOW_VRAM_MIPS=1, TEX_MAX_DIM=1024).
Se houver shaders novos em tempo real, limite a espera a 2 ms e jogue o restante para segundo plano sem travar o frame.

INGLES************

Stage 6 engineering methodology, making my PC (Intel Core i5-13420H with 4 P-Cores/8 threads + 4 E-Cores + RTX 4050 6GB VRAM + 16GB RAM) behave exactly like the Xbox Series S hardware architecture:

  1. PROCESSOR ALLOCATION MATCHING XBOX SERIES S (7 Game Cores + 1 System Core):
  • Reserve 1 physical core (RESERVED_CPUS=1) for system/GPU dispatch.
  • Allocate exactly 4 threads on the P-Cores (SHADER_THREADS=4 / workers=4) for compilation/heavy tasks, leaving the remaining cores free for the main game threads and the Culling module (field of view), without causing CPU starvation.
  1. SERIES S UNIFIED MEMORY SIMULATION (Fast and Slow Pools without PCIe Bottleneck):
  • The Xbox Series S splits memory into 8 GB fast (224 GB/s for GPU) and 2 GB slow (56 GB/s). Since my RTX 4050 has 6 GB (5,152 MB usable in the driver), isolate the VRAM into two pools that never overflow this limit and never spill over to RAM via PCIe:

  • Buffer Mirroring (Mirrors): Fixed 1700 MB in VRAM.

  • Active Texture Cache: 1200 MB with compaction only at 90% (COMPACT_PCT=90) and minimum retention of 300 frames (EVICT_MIN_UNUSED=300) to eliminate thrashing from reloading the same textures.

  • Automatic virtual memory recycling on Windows enabled (IMPORT_HIGH=80, IMPORT_LOW=65).

  • Cut unnecessary write-back of culling lists over PCIe (WB_MAX_KB=512, WB_SHADOW_MB=128, WB_DIFF=1 / lazy write-back), syncing only modified bytes.

  1. SERIES S GRAPHICS & ANTI-FLICKER PROFILE (Stage 6):
  • Disable dynamic resolution (DYNRES=0) so the engine never destroys and recreates render targets mid-gameplay (eliminating the "upload over a drawn image" bug).
  • Lock the base output at 1536x864 (or 1080p) with a fixed 3D render scale at 67% (0.6667 = 1024x576), matching the Series S internal performance target at 60 FPS.
  • Enable robustBufferAccess (ROBUST=1 / robust_buffers=2) to prevent black flashes during the GPU Culling pass.
  1. IMMEDIATE CPU -> GPU DISPATCH (LOWEST MS PER FRAME):
  • Disable batch retention (BATCH=0) and maintain direct submission with partial readback (READBACK_PART=1) so the light exposure meter doesn't flicker.
  • Enable texture decompression/unswizzle directly on the GPU Compute Shaders (GPU_UNSWIZZLE=1, LOW_VRAM_MIPS=1, TEX_MAX_DIM=1024).
  • If new real-time shaders occur, cap the wait time at 2 ms and offload the rest to the background without stalling the frame.
**@⁠zaltronvitor-glitch** on GitHub · 2026-11-25 00:41 UTC · [original](https://github.com/Marvisak/VIctory/issues/1910) metodologia de engenharia da Etapa 6, fazendo o meu PC (Intel Core i5-13420H de 4 P-Cores/8 threads + 4 E-Cores + RTX 4050 6GB VRAM + 16GB RAM) se comportar exatamente como a arquitetura de hardware do Xbox Series S: ALOCAÇÃO DE PROCESSADOR IGUAL AO XBOX SERIES S (7 Núcleos Jogo + 1 Núcleo Sistema): Reserve 1 núcleo físico (RESERVED_CPUS=1) para despacho de sistema/GPU. Aloque exatamente 4 threads nos P-Cores (SHADER_THREADS=4 / workers=4) para compilação/tarefas pesadas, deixando os demais núcleos livres para as threads principais do jogo e para o módulo de Culling (campo de visão), sem causar inanição de CPU. SIMULAÇÃO DA MEMÓRIA UNIFICADA DO SERIES S (Pools Rápido e Lento sem Gargalo PCIe): O Xbox Series S divide a memória em 8 GB rápidos (224 GB/s para GPU) e 2 GB lentos (56 GB/s). Como minha RTX 4050 tem 6 GB (5.152 MB úteis no driver), isole a VRAM em dois pools que nunca estourem esse limite e nunca vazem para a RAM via PCIe: Espelho de Buffers (Mirrors): 1700 MB fixos na VRAM. Cache de Texturas Ativas: 1200 MB com compactação só em 90% (COMPACT_PCT=90) e retenção mínima de 300 frames (EVICT_MIN_UNUSED=300) para eliminar o thrashing de recarregar as mesmas texturas. Reciclagem automática de memória virtual no Windows ativa (IMPORT_HIGH=80, IMPORT_LOW=65). Corte o write-back inútil de listas de culling pela PCIe (WB_MAX_KB=512, WB_SHADOW_MB=128, WB_DIFF=1 / lazy write-back), sincronizando apenas os bytes modificados. PERFIL GRÁFICO E ANTI-FLICKER DO SERIES S (Etapa 6): Desative a resolução dinâmica (DYNRES=0) para o motor nunca destruir e recriar render targets no meio do gameplay (eliminando o bug "upload over a drawn image"). Trave a saída base em 1536x864 (ou 1080p) com escala 3D fixa em 67% (0.6667 = 1024x576), igual ao alvo interno de performance do Series S a 60 FPS. Ative robustBufferAccess (ROBUST=1 / robust_buffers=2) para evitar flashes pretos no passe de GPU Culling. DESPACHO IMEDIATO CPU -> GPU (MENOR MS POR FRAME): Desative a retenção em lote (BATCH=0) e mantenha submissão direta com leitura parcial de readback (READBACK_PART=1) para o medidor de exposição de luz não piscar. Ative descompressão/unswizzle de texturas direto nos Compute Shaders da GPU (GPU_UNSWIZZLE=1, LOW_VRAM_MIPS=1, TEX_MAX_DIM=1024). Se houver shaders novos em tempo real, limite a espera a 2 ms e jogue o restante para segundo plano sem travar o frame. INGLES************ Stage 6 engineering methodology, making my PC (Intel Core i5-13420H with 4 P-Cores/8 threads + 4 E-Cores + RTX 4050 6GB VRAM + 16GB RAM) behave exactly like the Xbox Series S hardware architecture: 1. **PROCESSOR ALLOCATION MATCHING XBOX SERIES S (7 Game Cores + 1 System Core):** * Reserve 1 physical core (`RESERVED_CPUS=1`) for system/GPU dispatch. * Allocate exactly 4 threads on the P-Cores (`SHADER_THREADS=4` / `workers=4`) for compilation/heavy tasks, leaving the remaining cores free for the main game threads and the Culling module (field of view), without causing CPU starvation. 2. **SERIES S UNIFIED MEMORY SIMULATION (Fast and Slow Pools without PCIe Bottleneck):** * The Xbox Series S splits memory into 8 GB fast (224 GB/s for GPU) and 2 GB slow (56 GB/s). Since my RTX 4050 has 6 GB (5,152 MB usable in the driver), isolate the VRAM into two pools that never overflow this limit and never spill over to RAM via PCIe: * Buffer Mirroring (Mirrors): Fixed `1700 MB` in VRAM. * Active Texture Cache: `1200 MB` with compaction only at 90% (`COMPACT_PCT=90`) and minimum retention of 300 frames (`EVICT_MIN_UNUSED=300`) to eliminate thrashing from reloading the same textures. * Automatic virtual memory recycling on Windows enabled (`IMPORT_HIGH=80`, `IMPORT_LOW=65`). * Cut unnecessary write-back of culling lists over PCIe (`WB_MAX_KB=512`, `WB_SHADOW_MB=128`, `WB_DIFF=1` / lazy write-back), syncing only modified bytes. 3. **SERIES S GRAPHICS & ANTI-FLICKER PROFILE (Stage 6):** * Disable dynamic resolution (`DYNRES=0`) so the engine never destroys and recreates render targets mid-gameplay (eliminating the "upload over a drawn image" bug). * Lock the base output at `1536x864` (or 1080p) with a fixed 3D render scale at `67%` (`0.6667` = `1024x576`), matching the Series S internal performance target at 60 FPS. * Enable `robustBufferAccess` (`ROBUST=1` / `robust_buffers=2`) to prevent black flashes during the GPU Culling pass. 4. **IMMEDIATE CPU -> GPU DISPATCH (LOWEST MS PER FRAME):** * Disable batch retention (`BATCH=0`) and maintain direct submission with partial readback (`READBACK_PART=1`) so the light exposure meter doesn't flicker. * Enable texture decompression/unswizzle directly on the GPU Compute Shaders (`GPU_UNSWIZZLE=1`, `LOW_VRAM_MIPS=1`, `TEX_MAX_DIM=1024`). * If new real-time shaders occur, cap the wait time at 2 ms and offload the rest to the background without stalling the frame.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 04:48:27 +00:00
Author
Owner

@⁠DesertGamer on GitHub · 2026-11-25 02:27 UTC · original

VIctory V2: community PRs, merged and tested

Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch.

Where it stands today: launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1).

⚠️ Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk.

Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help:
https://DesertGamer/VIctory-V2

Unofficial community fork of Marvisak/VIctory, GPL-3.0.

**@⁠DesertGamer** on GitHub · 2026-11-25 02:27 UTC · [original](https://github.com/Marvisak/VIctory/issues/1910#issuecomment-7150756571) ### VIctory V2: community PRs, merged and tested Open PRs sitting in the queue? V2 pulls them into one build, screens each one (binaries, build scripts, hooks, new deps) and runs tests after every batch. **Where it stands today:** launches, runs the menu at 30 fps, plays the intro video, reaches the start screen and loads the world (~50 s). Entering the world is the current blocker: rendering fails with a GPU "device removed" error (tracked in issue #1). :warning: Entering the world on a real GPU can hang it and make Windows reset the driver. Try it at your own risk. Not playable yet, but every batch of merged fixes moves it closer. If you have a PR that's stuck, or a GPU to test on, I'd love your help: https://DesertGamer/VIctory-V2 *Unofficial community fork of Marvisak/VIctory, GPL-3.0.*
Author
Owner

@⁠Calvix2k on GitHub · 2026-11-25 03:37 UTC · original

Uma correção útil antes de vocês investirem nisso: o VIctory não agenda as threads do título. O --console series-s só muda o que o jogo vê da máquina:

  • XSystemGetConsoleMode passa a devolver o modo Series S (0x60, xsystem.rs);
  • memória de título: 7.776 MiB em vez de 10 GiB / 3,5 GiB (victory-gpu/src/console.rs);
  • unidades de computação da GPU: 20 em vez de 52.

Não existe RESERVED_CPUS/SHADER_THREADS no projeto; fixar núcleos é coisa do Windows, não do VIctory. Se quiser testar isso, o caminho é start /affinity <máscara> victory.exe run ... (ou Process Lasso). No i5-13420H, os 4 P-cores é que interessam — os E-cores são bem mais lentos e costumam piorar o stutter da tradução de shaders e do culling, não melhorar.

E o ponto que provavelmente decide o resultado: sua RTX 4050 tem 6 GB de VRAM, abaixo dos 7,7 GB que o perfil Series S reporta. Ativar series-s tende a deixar o jogo mais perto do limite de memória de GPU, não mais rápido. Vale medir os dois perfis (series-x vs series-s) com o mesmo save e comparar fps e estabilidade antes de fixar qualquer coisa.

**@⁠Calvix2k** on GitHub · 2026-11-25 03:37 UTC · [original](https://github.com/Marvisak/VIctory/issues/1910#issuecomment-7152087932) Uma correção útil antes de vocês investirem nisso: o VIctory **não agenda as threads do título**. O `--console series-s` só muda o que o jogo *vê* da máquina: - `XSystemGetConsoleMode` passa a devolver o modo Series S (0x60, `xsystem.rs`); - memória de título: 7.776 MiB em vez de 10 GiB / 3,5 GiB (`victory-gpu/src/console.rs`); - unidades de computação da GPU: 20 em vez de 52. Não existe `RESERVED_CPUS`/`SHADER_THREADS` no projeto; fixar núcleos é coisa do Windows, não do VIctory. Se quiser testar isso, o caminho é `start /affinity <máscara> victory.exe run ...` (ou Process Lasso). No i5-13420H, os 4 P-cores é que interessam — os E-cores são bem mais lentos e costumam piorar o stutter da tradução de shaders e do culling, não melhorar. E o ponto que provavelmente decide o resultado: sua RTX 4050 tem **6 GB de VRAM**, abaixo dos 7,7 GB que o perfil Series S reporta. Ativar `series-s` tende a deixar o jogo mais perto do limite de memória de GPU, não mais rápido. Vale medir os dois perfis (`series-x` vs `series-s`) com o mesmo save e comparar fps e estabilidade antes de fixar qualquer coisa.
Author
Owner

@⁠Marvisak on GitHub · 2026-11-25 12:52 UTC · original

Automated triage for the maintainers.

None of the switches listed here exist in VIctory (main 940d32f): RESERVED_CPUS, SHADER_THREADS, COMPACT_PCT, EVICT_MIN_UNUSED, DYNRES, GPU_UNSWIZZLE, READBACK_PART, WB_MAX_KB and the rest appear nowhere in the code, so setting them changes nothing. VIctory's console choice is --console series-x|series-s (README, run). As the comment above explains, it changes what the title is told about the machine (console mode, title memory size, GPU compute units). It does not pin threads or split VRAM into pools. Thread affinity is a Windows setting (start /affinity). With 6 GB of VRAM, the Series S profile's larger memory figure may well make things worse rather than better; comparing both profiles on the same machine would show it.

If you have a concrete change in mind for VIctory itself, please open it as a pull request with measurements.

Nenhuma dessas variáveis existe no VIctory; a única opção é --console series-x|series-s.


Generated by Claude Code

**@⁠Marvisak** on GitHub · 2026-11-25 12:52 UTC · [original](https://github.com/Marvisak/VIctory/issues/1910#issuecomment-7162982893) <!-- victory-issue-triage v1 verdict=answered seen=2026-11-25T03:37:24Z at=2026-11-25T12:52:36Z --> Automated triage for the maintainers. None of the switches listed here exist in VIctory (`main` `940d32f`): `RESERVED_CPUS`, `SHADER_THREADS`, `COMPACT_PCT`, `EVICT_MIN_UNUSED`, `DYNRES`, `GPU_UNSWIZZLE`, `READBACK_PART`, `WB_MAX_KB` and the rest appear nowhere in the code, so setting them changes nothing. VIctory's console choice is `--console series-x|series-s` (README, `run`). As the comment above explains, it changes what the title is told about the machine (console mode, title memory size, GPU compute units). It does not pin threads or split VRAM into pools. Thread affinity is a Windows setting (`start /affinity`). With 6 GB of VRAM, the Series S profile's larger memory figure may well make things worse rather than better; comparing both profiles on the same machine would show it. If you have a concrete change in mind for VIctory itself, please open it as a pull request with measurements. Nenhuma dessas variáveis existe no VIctory; a única opção é `--console series-x|series-s`. --- _Generated by [Claude Code](https://claude.ai/code)_
This discussion has been locked. Commenting is limited to contributors.
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.

Dependencies

No dependencies set

Reference
github/Marvisak--VIctory#1910
No description provided.