VIctory: GPU-side performance fixes for title-memory shaders (GTA VI) #2695
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#2695
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?
@Olliee96 on GitHub · 2026-11-25 18:23 UTC · original
O jogo melhorou: GPU de 850–1450 ms para 200–345 ms por quadro, e fps de 0,4–0,7 para 1,4–1,5. Agora vou levantar todas as mudanças para o documento do PR.
Gerei o pacote do PR em inglês em
E:\Temp\pr-victory\. Não fiz commit nem publiquei nada.Arquivos:
PR-DESCRIPTION.md: descrição completa em inglês, com o problema, a correção, as medições, os testes e as ressalvas de cada patch.1-wave-dedupe-memory-marks.patch(tradutor,lower.rs): é o ganho desta rodada.2-root-uav-view-marks.patch(draw.rs,host.rs,memory.rs,shadow.rs): a correção dos snapshots.3-dstorage-late-page-lists.patch(dstorage.rs,xmem.rs): espera de até ~1 s pelas listas de páginas atrasadas, mais logs.4-diag-no-view-marks.patch: só a chave de diagnóstico, opcional.O que o teste isolado do
e63d22mostrou:atomicOrna mesma palavra do bitmap, que fica na RAM do sistema. Isso serializa o dispatch inteiro.Ressalvas, também escritas no PR:
victory-shaderfalham, mas já falhavam com a correção desligada. Os outros 246 passam.Próximo passo natural, se quiser: levar o bitmap para a VRAM e copiá-lo de volta uma vez por envio, ou partir para os shaders wave64 que deixam a tela branca.VIctory: GPU-side performance fixes for title-memory shaders (GTA VI)
@Marvisak on GitHub · 2026-11-25 18:48 UTC · original
Automated triage for the maintainers.
This describes four local patches (wave-level dedupe of memory write marks, root UAV view marks, waiting for late DirectStorage page lists, a diagnostics switch) with measurements, but the patches themselves are only on your machine. Pull requests are open to everyone: please open one PR per patch against main so they can be reviewed and tested (also say which VIctory commit the measurements were taken on).
For the first patch: in main (
13f91ca) the write-mark code incrates/victory-shader/src/emit/lower.rsalready loads the bitmap word first and issues theatomicOronly for lanes that find the bit clear; there is no per-wave dedupe, so a PR should be measured against that.(Resumo: os patches só existem localmente; abra um PR por patch contra a main para revisão.)
Generated by Claude Code
@Calvix2k on GitHub · 2026-11-25 18:49 UTC · original
Independent reconstruction on
main13f91ca(private tree, no branch published), with the #486 test-binaries runtime so the marks test runs on hardware. One safety point first, because it changes the shape of the fix:"One atomic per wave" is only equivalent when the lanes mark the same page/word. Lanes of a 64-lane store can mark different pages (a strided write), and for a 16-byte store some lanes cross a page while others do not. Deduping all of them to one lane loses marks. Also, the first lane outright can be one with nothing left to set (its second page equals its first, already marked), so gating on
WaveIsFirstLanealone can drop the shared atomic.The shape I tested:
WaveAnyTrue(clear)— if no lane has a bit to set, no wave ops beyond this;WaveActiveAllEqual(page);WaveActiveMin(lane, -1)over the lanes whereclear) does the one atomic; pages differ → every lane withcleardoes its own, as today.That keeps the per-lane path for the mixed case and still collapses the common contiguous write to one atomic per marked page.
Tests on Windows 10 19045 + RX 7800 XT (driver 32.0.32029.2010),
view_marks: true:lane * 4: exactly bit 100 set (the shared-atomic path);lane * 0x10000: bits 100..163 set (the mixed path, no mark lost);cargo test -p victory-shader --lib --locked: 271 passed, 0 failed, 3 ignored, every DXIL module validated.I did not measure the in-game or isolated-dispatch speedup, so I make no claim on the 10x number; this is correctness-only. The patch is ~35 lines in
Lower::mark_view_writeplus the two-lane test. Happy to paste the diff or send it to you if useful — I did not open a PR because the patch package is yours.@Cuebert on GitHub · 2026-11-26 20:35 UTC · original
I can add one implementation-specific data point. In a warmed 4K RT startup on my Cool Fox-based path, compute selector
e63d22c4def9ba6atranslated, joined a host pipeline, and first-bound. The lowerer I inspected handles missing-page writes with a branch-guarded raw fault-list store; I don't see the dirty-bitmapatomicOrpath described here. A selector match alone therefore doesn't make the reported speedup transferable to this implementation. Per-dispatch GPU timestamps on the exact lowering path would be needed before attributing a gain.