Repository navigation
mega PR closeout, XGDK memory hints, stuttering no more. - #1967
edwardteach247 wants to merge 49 commits into
Conversation
…hecked_ops no longer stops the check
…ock go before it calls itself again
… has grown past 640
…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
…aning per-key gates
…nd make MnK aim 1:1 linear
…e reads (VICTORY_PLANE_SAME, VICTORY_PLANE_PIN, from FoxHound v0.8)
…RY_FAULT_ASK, 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)
…sts, refcounted (VICTORY_SHARED_TABLES=1)
…later lists, back at the next frame or when a table finds no room (VICTORY_PARK_TABLES=1)
…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).
Supersedes: trustno1-coder#1019 Asset-Policy-Prerequisite: trustno1-coder#1460
…ard tells the parts (VICTORY_GUARD_PARTS)
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.
…LOCKED disables part_faults
…RootArg calls, separate intentional RT builder skips from real DROPPED (now 0/frame), and label GDKX Deserialize*PipelineStateX
Feedback de Teste em RTX 5060 Ti (16 GB) - Build Local com PRs IntegradosTestei 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_SPECULARAo usar 2. Queda Brusca de FPS ao Ativar DLSS + Frame Generation
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 Ambiente de Teste
SugestãoOs 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. |
…remove racy state/remap elision - Revert D3D12 State root-argument / IA elision in draw.rs (trustno1-coder#1967): ExecuteIndirect, ambient SetDescriptorHeaps, gpudetile, inplace, and Streamline mutate the command list directly, causing skipped binds and wrong material/texture descriptor tables - Revert VICTORY_REMAP_SAME in xmem.rs, VICTORY_PLANE_SAME / shared_zeros in texture.rs, and VICTORY_SWEEP_ASYNC / RefreshSet in host.rs, memory.rs, and resource.rs so physical-page DirectStorage texture updates always invalidate GPU views and slot_evict never races with victory-submit - Fix 16 GB / 24 GB+ VRAM budget in adaptive.rs (TexPool 93% / 94%, peak-sized target reserve, VICTORY_WINDOWS_BAR_MB=512) so ~79k high-Mip world textures stay resident alongside DLSS Multi-Frame Generation without hitting premature no-room throttling - Retain pure verified fixes: slot_evict 3-lock deadlock fix (trustno1-coder#1969), sparse interior-page sweep_mapping check (trustno1-coder#1958), per-tier pool block sizing & CPU pool budgets (trustno1-coder#1968), O(log N) ahead binary search, single-range descriptor copy fast path, in-world Bink FG gate fix, simultaneous LT+RT mouse input fix (trustno1-coder#1949), VICTORY_KEEP_AWAKE, and standalone cache warm defaults (trustno1-coder#1971)
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).f6e1754)cd938ecCounselor/Boat)9c4aaf7Mandy Money)reuploadFull)Merged PRs & Major Upstream Imports
Memory, VRAM & Cache
VICTORY_SHARED_ZEROS— Zeros for initial texture allocations and new mip levels come from one shared card buffer instead of per-copy upload buffers.VICTORY_REMAP_SAME— Detects and skips redundant virtual page remappings in XMem when mappings already match.VICTORY_ROOM_REAL— Real DXGI VRAM budget margin check inroom().VICTORY_PLANE_SAME/VICTORY_PLANE_PIN— Skips unchanged linear plane uploads and adds lockless-first plane reads.VICTORY_RESIDENT_LATER— Background asynchronous memory residency viaEnqueueMakeResident.CPU Host, Submission & Descriptor Performance
merge_stripe(page)lock granularity,CopyStateRwLock, atomic lock-freeDonethread completion, narrowedCARD_WORKlock scope.2fbac6ef(Mikael Järvinen): Inlineconstant_slots_batchavoiding 8-way worker thread wakeup and vector scatter overhead (-3.5 ms CPU prep).dc216b62(Mikael Järvinen): ImmediateCardPlansubmission restoring low latency for GPU kick-off (-1.5 ms CPU prep).92e0d4b(Lead): Shared immutableStep::RefreshSet(CopySet) inMemory::bring_up— reduced ~46,000 per-frameStep::Refreshallocations to ~191 refs withVICTORY_GUARD_PARTS— Opens descriptor heap blocks by individual 4 KiB parts on write faults instead of whole 64 KiB blocks.VICTORY_SAME_TABLES— Reuses identical record runs across descriptor tables within the same frame.9c4aaf7(Lead): D3D12 state deduplication (IASetPrimitiveTopology,IASetVertexBuffers/IASetIndexBuffer,SetRootArg), saving ~19,000 redundant host driver calls/frame.9e08f2b/372f4c27): Batched refused write-watch ranges within Windows allocation boundaries and cached allocation hints (-1.5 ms write-watch prep).victory-listthread priority on AMD V-Cache CCD and shifts workers off core 0.Shaders, Ray Tracing & Visual Fixes
CS_Tree_BatchCull) — fixes missing distant trees and popping bushes.ds_bpermute_b32lane selection logic on Wave32 host GPUs.computed_withandread_as_numberonce per lowering — accelerates shader translation from 25 s down to 2.6 s (~10× speedup).alias_rtD3D12 aliasing barriers.b4a7d9a): Pre-initializes Wave32 reduction LDS identities before per-lane exits in tiled water shaders.Queues, Synchronization & System
FenceRefhandles.