Skip to content

mega PR closeout, XGDK memory hints, stuttering no more. - #1967

Open
edwardteach247 wants to merge 49 commits into
trustno1-coder:mainfrom
edwardteach247:main
Open

edwardteach247 wants to merge 49 commits into
trustno1-coder:mainfrom
edwardteach247:main

Conversation

@edwardteach247

Copy link
Copy Markdown

Baseline from main 11/28/2026 (Cycle 1) vs. Current Results

R7 7700x 5ghz + 3080 TI 12gb Vram + 32gb DDR5
Tested on NVIDIA RTX 3080 Ti (12 GB VRAM), 8-Core / 16-Thread CPU, 32 GB RAM, Windows 11 at 1440p (2458×1353).

Metric Baseline (Cycle 1 f6e1754) Cycle 44 (cd938ec Counselor/Boat) Current (Cycle 46 9c4aaf7 Mandy Money) Improvement vs Baseline
VRAM Usage 11,236 MB 8,123 MB 8,500 MB (dense strip) -3,113 MB (-27.7%)
Peak Private RAM 29,159 MB 24,059 MB 25,700 MB -5,100 MB (-17.5%)
GPU Stall / Wait (Standing) 18.3 ms 3.6 ms 2.6 ms -15.7 ms (-85.8%)
GPU Stall / Wait (Chaos) 21.0 ms 7.6 ms 4.9 ms -16.1 ms (-76.7%)
Scene Complexity (Draws/frame) ~3,133 ~3,477 7,773 – 9,061 +189% geometry/materials handled
Real Dropped Draws / Dispatches 140 – 168 / frame 0.0 / frame 1.0 / frame -99.4% to -100%
Refused Shaders (Wave64) 4 0 5 (new outdoor area) Wave32 parity achieved
D3D12 Redundant Calls Elided 0 / frame 19,684 / frame ~19,000 / frame ~19k API calls avoided per frame
Full Texture Reuploads (reuploadFull) 1,062× 28× 33× -97.4% reupload thrashing
Severe Hitches (>100 ms) in Chaos 3 0 1 Near-zero stutter
Boot to World Time 49.6 s 47.0 s 48.2 s -2.6 s

Merged PRs & Major Upstream Imports

Memory, VRAM & Cache

CPU Host, Submission & Descriptor Performance

Shaders, Ray Tracing & Visual Fixes

Queues, Synchronization & System

101Leafy and others added 30 commits November 28, 2026 21:43
…om one shared buffer in card memory, not an upload buffer per copy (VICTORY_SHARED_ZEROS)
XMemMapPhysicalPages, and with it the scatter form, and the page-mapping
copy (map_alias) leave the views alone when every page asked for is shown
at its address already: same bytes, and the guards of the views stay valid.
The counts are said in the log (first, then every 4,096th).
VICTORY_REMAP_SAME=0 maps them again.

Two tests that remapped the same pages to exercise a mapping now move a page
first. New test: a mapping of the same pages leaves the view alone (a
protection set on the view survives, which a new view would not), while
other pages, or a page moved, are mapped as before.
release_held dereferenced the address of a queue the title may have
released meanwhile, and a queued wait or signal read a fence by address
after the title had released and freed it.

A queue's line is now an Arc<QueueLine> with a retired flag, registered in
WAITING with its address (for diagnostics only) and retired and taken off
the list by the queue's drop, so release_held reads a line it holds a
reference to. A queued wait or signal (queue::Held, the line's Job::Wait,
Job::Signal and Joined signals, and host::Late::Signal) holds a FenceRef, a
reference to the fence, instead of its address, so a fence the title
released is not read after it is freed. The line's diagnostic label no
longer reads the queue.

Tests: the line a thread runs a queue's commands from outlives the queue and
is retired and off the list when the queue is gone; a queued wait or signal
keeps its fence whatever the title does with its own reference, and lets it
go when the command has run or the queue is gone.
A request's source, its zlib intermediate and the buffer of a write to
scattered pages were each vec![0; size], faulting in all their pages again
for every request. A worker now keeps up to three spare buffers of at most
32 MiB (VICTORY_DSTORAGE_BUFFERS, on), zeroed before reuse, and all workers
together keep at most 256 MB of them (VICTORY_DSTORAGE_BUFFER_BUDGET, in
megabytes, 0 for no bound): 16 workers by 3 by 32 MiB could hold 1.5 GB for
the run in a process the PC has little memory left for. A buffer that does
not fit is freed at the end of its request.

Tests: a spare buffer is reused (same memory), zeroed again, counted while
kept and not kept past the most a worker keeps; a worker keeps three spare
buffers at most; the budget bounds what all workers keep, counts a buffer
again when it leaves, and is no bound when 0.
…ives up and is counted, no longer waits forever
…e reads (VICTORY_PLANE_SAME, VICTORY_PLANE_PIN, from FoxHound v0.8)
Wrap host command lists so adjacent ResourceBarrier calls can be held and emitted together under VICTORY_JOIN_BARRIERS=1. The default path remains unchanged.
Add an opt-in command-list wrapper with conflict-aware batching, strong resource references through flush, counters, and focused conflict-index and resource-identity tests.
…at the same address

When a known packed structure gave way to another one at the same address,
`land` called `gone`: the pages went back to the free list (last in, first
out) and the re-insert placed them elsewhere, while the submission had
already asked the write watch. The builder unpacked the new structure where
the card's directory still pointed, the packed bytes went up to the new
places, and rays walked them as nodes until their iteration limit.

`Memory::replaced` drops the structure as `gone` does but keeps its pages
where they are, so the new structure takes the same places.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The pass over the textures picked by index walked a placed view's pages
(VirtualQuery, whole textures at a time) before it asked whether the
card's fullness holds the slot: held ones threw the answer away. The
held decision is made first now, and held ones are counted where they
skip the walk (HEAP_TEXTURES_HELD_SKIP, in the 5 s line).

What changes besides the order: a held slot that streamed out is told
Held without the walk (it was told Away), and its host copy is not let
go until a pass with room walks it again — about four seconds, or as
soon as the card has room.

Point 4 of trustno1-coder#1521; the issue's other three are covered by 0174844 (the
shadow copy state lock, merged) and the open trustno1-coder#614, trustno1-coder#1133, trustno1-coder#1556, trustno1-coder#1637.

Co-Authored-By: Claude Code <noreply@anthropic.com>
…nts as input)

Ported from the older checkout: crates/victory-hle/src/awake.rs holds PowerRequestDisplayRequired and PowerRequestSystemRequired on one power request for the whole run, let go when main returns. VICTORY_KEEP_AWAKE=0 leaves the power plan alone. The title pad talks through GameInput, which the host activity timer never counts, so Windows turned the picture off mid-session.
… the loop's exit, 16-bit writes over registers the host lacks

Found with the shader oracle (diff_tests, GDK Scarlett compiler):

- A wave64 mesh program sets all 64 lanes on and newer compilers give
  lanes 32-63 of a 32-thread group vertices and primitives to export;
  the host group now has whole console waves (and mesh_stride with it).
- A mesh loop whose latch jumps back unconditionally stopped at the
  limit through a `ret`; even untaken, it lost the group's LDS round
  trip and triangles on NVIDIA. The limit now joins a branch out of
  the loop that dominates every such latch.
- The 2026 compiler writes f16 results with v_fma_mixlo_f16 into a
  vertex program's v2 (the primitive id, which a host vertex shader
  lacks) and masks the kept half off; that half is now zeros.

The oracle runs on main again (HostWave guard, raw and structured
views per side) and gains a WARP-only runaway mesh loop case.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ers off CCD0

On dual-CCD V-Cache CPUs (9950X3D, trustno1-coder#1093 / trustno1-coder#1662), confining the process to
the 7 shared cores of CCD0 leaves the 8 list translators (victory-list-*,
~2.86 cores CPU) running at ABOVE_NORMAL via VICTORY_HELPER_PRIORITY=1 beside
the submit-blocking helpers (victory-heap-sync, victory-wide, victory-under,
victory-records, victory-views) and ahead of normal-priority title/cutscene
threads and uploads ahead workers.

On a placed V-Cache CCD:
- keep_list_worker keeps victory-list-* inheriting CCD0's CPU sets (avoiding
  cross-CCD HostList traffic on plan_card) while dropping their priority to
  BELOW_NORMAL (overridable via VICTORY_LIST_PRIORITY=-2..=2). When not
  placed (non-X3D, single-CCD, Intel hybrid, VICTORY_CACHE_CORES=0), the
  existing VICTORY_HELPER_PRIORITY behaviour is preserved unchanged.
- uploads ahead, victory-picked, and victory-ahead call
  keep_off_the_frames_cores so they use the idle frequency CCD (CCD1).

Strict interleaved ABABAB (3x main d4b5d51 vs 3x this commit, 150 s each,
Ryzen 9 9950X3D + RTX 5090, 1440p DLSS Quality, FG OFF):
- Median: 28.17 -> 26.47 ms (35.5 -> 37.8 fps, +2.3 fps / +6.5%, zero overlap)
- p95: 34.90 -> 33.58 ms (-1.32 ms, zero overlap)
- Prep: 27.15 -> 25.20 ms; heaps_end: 0.97 -> 0.40 ms (-2.4x, zero overlap);
  under: 2.50 -> 2.23 ms; refreshes: 7.70 -> 7.27 ms; plan_card: 2.52 -> 2.30 ms
- texture::ahead: latency 0.7-1.2 -> 0.2-0.3 ms, turned down 28k-46k -> 11k-12k
- DLSS frames (150 s): 3,828 -> 3,992 (+164, zero overlap)
…later lists, back at the next frame or when a table finds no room (VICTORY_PARK_TABLES=1)
101Leafy and others added 19 commits November 28, 2026 21:43
…made this frame from the same records at another table (VICTORY_SAME_TABLES=1); FreshSameUsed, FreshSameUsedSlots
…ueueMakeResident, waited for before descriptor slots are written and on the card before lists are sent

The count of protection changes by caller from the same commit on our branch is left out here.
…y wait for flights are made on a thread of ours behind a queue fence, not waited on the submitting thread (off by default)
…screen instead

Cause: DXGI_MWA_NO_ALT_ENTER was set only on the Streamline-proxied
swap chain. The FSR 3 frame interpolation swap chain (FidelityFX) and the
plain one kept DXGI's built-in Alt+Enter, which switches the chain to
exclusive full screen; with FSR 3 frame generation that hangs the game
until Alt+Enter is pressed again.

Change:
- One helper, no_alt_enter, called after every creation path: it takes
  the swap chain's parent factory (GetParent) and calls
  MakeWindowAssociation(hwnd, DXGI_MWA_NO_ALT_ENTER) on it.
- The window procedure handles Alt+Enter (WM_SYSKEYDOWN/UP/SYSCHAR with
  VK_RETURN and the Alt bit) itself and does not pass it on: it toggles a
  borderless WS_POPUP window over the window's monitor
  (MonitorFromWindow/GetMonitorInfoW) and restores the previous style and
  rectangle on the way back. VICTORY_FULLSCREEN's startup path shares the
  same helper, so Alt+Enter also leaves that mode.
- The swap chain's buffers stay at the title's render size and DXGI scales
  to the window, so no ResizeBuffers or FSR 3 context recreation is
  involved in the toggle.
- Unit tests for the style math and the key test; README and docs/dlss.md.

Research (Microsoft Learn: IDXGIFactory::MakeWindowAssociation, DXGI
flip-model and full-screen guidance; Streamline programming guide 12.0;
FidelityFX frame interpolation swap chain notes): MakeWindowAssociation
must be called on the factory that created the swap chain, and
DXGI_MWA_NO_ALT_ENTER stops DXGI from handling Alt+Enter; for flip model,
borderless windowed is recommended and exclusive full screen is not needed
for tearing/VRR with ALLOW_TEARING; Streamline wants frame generation off
across a windowed/full-screen change. Not re-read in this session (the
docs tool was unavailable); cited from the existing code comment and
prior knowledge.

On upstream main, VICTORY_FULLSCREEN places an aspect-fitted box with a
black backdrop window behind it; that box goes through the same
enter_borderless helper, and Alt+Enter back to windowed also removes the
backdrop.

This change was made with AI assistance (Claude Code).
Adapt the LDS accumulator analysis from fxceless/victory-fork a918163. Assign the initializer to one host thread and synchronize the group before any dispatch-count guard or console branch.
…k ranged, pending_len, and Arc card_dirty integration
…ing_up (cuts ~46k per-frame Step::Refresh entries to ~191 and skips repeated sets in O(1) across copy_spans, refresh_ahead, card_steps, and run_deferred)
…, SeqLock ranged, pending_len, and Arc card_dirty integration"

This reverts commit 1396e72.
…pe merge_stripe, CopyState RwLock, O(log N) ahead_contains, atomic Done, inline constant_slots_batch 2fbac6e, immediate CardPlan sync dc216b6)
…RootArg calls, separate intentional RT builder skips from real DROPPED (now 0/frame), and label GDKX Deserialize*PipelineStateX
@anxiousCamel

Copy link
Copy Markdown

Feedback de Teste em RTX 5060 Ti (16 GB) - Build Local com PRs Integrados

Testei localmente uma build integrando os PRs #1888, #1890 e #1891 em uma RTX 5060 Ti 16GB + Windows 11 (HAGS ativado via registro). O jogo inicia e atinge 120 FPS estáveis na tela de diagnóstico, mas encontrei dois problemas críticos ao tentar ativar o DLSS Frame Generation:

1. Reflexos Severamente Bugados com VICTORY_AMBIENT_SPECULAR

Ao usar VICTORY_AMBIENT_SPECULAR=1 (juntamente com VICTORY_AMBIENT=0.8), os reflexos em superfícies e olhos de NPCs ficam completamente estourados, causando artefatos visuais severos. O fallback de ambient specular não considera o roughness dos materiais, aplicando reflexão full-strength indiscriminadamente. Recomendação: Documentar explicitamente que essas variáveis são experimentais e causam regressão visual até que o RT/DXR nativo seja implementado.

2. Queda Brusca de FPS ao Ativar DLSS + Frame Generation

  • Sem DLSS/FG: 120 FPS estáveis, GPU ~60% ocupada.
  • Com DLSS Quality + FG ativado: FPS cai para ~25, GPU 100%, frame time sobe para 40+ ms.
  • Causa identificada no overlay: NOTE: 51 DRAWS SKIPPED. THEIR SHADERS CANNOT BE CONVERTED YET.

Quando o DLSS/FG é ativado, o pipeline tenta usar shaders que ainda falham na tradução Wave64→Wave32. O fallback força a GPU por um caminho extremamente lento, tornando o Frame Generation inutilizável nesta build. O PR #1938 (Reflex frame pacing) parece relacionado — testei com VICTORY_CARD_AWAKE=0 conforme sugerido lá, mas o gargalo persiste porque os shaders rejeitados são o limitante real, não o awake job.

Ambiente de Teste

  • GPU: NVIDIA RTX 5060 Ti 16 GB
  • OS: Windows 11 Home 26300 (HAGS ativo)
  • Streamline: 2.14.16
  • Resolução: 1440p

Sugestão

Os PRs de desempenho (#1888, #1890, #1891) funcionam corretamente isolados. O bloqueio atual é puramente na tradução de shaders para o caminho DLSS-G. Priorizar a recuperação dos shaders wave64 rejeitados seria o próximo passo mais impactante para tornar o Frame Generation utilizável em placas NVIDIA da série 40/50.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.