[pr-fix] Audit hardening, Darner ports, NVIDIA Reflex, and preload UI redesign #4

Manually merged
github merged 26 commits from github-bot/gh-4 into main 2026-12-05 19:03:39 +00:00 AGit
Owner

@⁠MahanYTT on GitHub · 2026-12-04 15:55 UTC · original
MahanYTT:mega-upgrade-v3 → main · +30738 −5162 · 145 files · 26 commits · merged 2026-12-05 19:02 UTC

Summary

Comprehensive full-codebase audit hardening, Darner upstream ports, standalone NVIDIA Reflex + PCL markers, and a redesigned shader preload loading window across 89 files (Cargo.toml / Cargo.lock untouched).

Highlights

  • Shader Preload UI Redesign (preload_ui.rs, translate.rs, warm.rs, preload-window.ps1): Double-buffered dark Win32 GDI + WinForms UI, DPI scaling, segmented step header, live throughput/elapsed/ETA, ANSI stripping, pre-read progress (Darner PR #184), and VICTORY_PRELOAD_SAVE_EVERY checkpoints (Darner PR #147).
  • Standalone NVIDIA Reflex & F1/F3 UX (streamline.rs, abi.rs, frame.rs, queue.rs, host/menu.rs, host/panel.rs, procmem.rs): Darner PR #159 (VICTORY_REFLEX=off|on|boost), PCL pipeline markers, live F1 toggle, F3 latency readout, Series S DLSS resolution target preview, and PC commit charge telemetry (Darner PR #131).
  • GPU Runtime & Memory Hardening (victory-gpu): Deferred upscaler Held::pin, sound Retired Send, atomic ActiveHeap snapshot in heap_hooks, reentrancy-safe VEH watch::on_write, SHADER_HEAPS.read() snapshot drop, heap_twin::sync race fix, HostHeap UID + Drop cleanup, non-HOL bury() drain, batched SharedTables::give_back, per-slice multi-mip staging footprints in texture.rs, Memory::release owner_wrote, Twin retirement in resource.rs, list/thin.rs panic recovery, plus Darner library.rs stale-library skip, descriptor.rs watch-page mirroring, ambient.rs VICTORY_AMBIENT_ALPHA, gpudetile.rs HLSL fallback, pool.rs VICTORY_POOL_SMALL=auto, and hwrt.rs readable_len probing.
  • Shader Compiler & Cache (victory-shader, victory-pipeline): Iterative BDD workstacks (structure.rs), Op::VolatileLoad optimization guards, Rc<Key> in Module::merge, ds_permute_b32 / v_readlane_b32 / v_writelane_b32 wave safety, atomic cmpxchg sub-dword LDS writes, v_fmac_f16 modifiers, link_signature_ops use replacement, rayquery.rs unwrap removal, cache.rs pruning/overwrite fixes, io.rs VGPR bounds, and Validator handle leak fixes.
  • HLE, DirectStorage Bridge, Loader, Formats & Scripts: GameLicense padding, VICTORY_SOFT_VIEWS materialization, bounced_read event/IOCP safety, per-voice xaudio2 submit lock, xmem MEM_RELEASE purge + PageWindow::write_at, bridge.cpp loader-lock COM pool, heap_sites per-page VirtualProtect, threads.rs safe TLS attach, audio.rs 32-bit BOOL ABI, media.rs/net.rs/xpackage.rs/xcurl.rs hardening, XOR detile_params + XMA bounds, and SDK downloader / .cmd security hardening.

Draft PR for Windows CI validation — do not merge to main until ready for a release.

**@⁠MahanYTT** on GitHub · 2026-12-04 15:55 UTC · [original](https://github.com/MahanYTT/VIctory-MA/pull/4) `MahanYTT:mega-upgrade-v3` → `main` · +30738 −5162 · 145 files · 26 commits · merged 2026-12-05 19:02 UTC ## Summary Comprehensive full-codebase audit hardening, Darner upstream ports, standalone NVIDIA Reflex + PCL markers, and a redesigned shader preload loading window across 89 files (`Cargo.toml` / `Cargo.lock` untouched). ### Highlights - **Shader Preload UI Redesign** (`preload_ui.rs`, `translate.rs`, `warm.rs`, `preload-window.ps1`): Double-buffered dark Win32 GDI + WinForms UI, DPI scaling, segmented step header, live throughput/elapsed/ETA, ANSI stripping, pre-read progress (Darner PR #184), and `VICTORY_PRELOAD_SAVE_EVERY` checkpoints (Darner PR #147). - **Standalone NVIDIA Reflex & F1/F3 UX** (`streamline.rs`, `abi.rs`, `frame.rs`, `queue.rs`, `host/menu.rs`, `host/panel.rs`, `procmem.rs`): Darner PR #159 (`VICTORY_REFLEX=off|on|boost`), PCL pipeline markers, live F1 toggle, F3 latency readout, Series S DLSS resolution target preview, and PC commit charge telemetry (Darner PR #131). - **GPU Runtime & Memory Hardening** (`victory-gpu`): Deferred upscaler `Held::pin`, sound `Retired` `Send`, atomic `ActiveHeap` snapshot in `heap_hooks`, reentrancy-safe VEH `watch::on_write`, `SHADER_HEAPS.read()` snapshot drop, `heap_twin::sync` race fix, `HostHeap` UID + `Drop` cleanup, non-HOL `bury()` drain, batched `SharedTables::give_back`, per-slice multi-mip staging footprints in `texture.rs`, `Memory::release` `owner_wrote`, `Twin` retirement in `resource.rs`, `list/thin.rs` panic recovery, plus Darner `library.rs` stale-library skip, `descriptor.rs` watch-page mirroring, `ambient.rs` `VICTORY_AMBIENT_ALPHA`, `gpudetile.rs` HLSL fallback, `pool.rs` `VICTORY_POOL_SMALL=auto`, and `hwrt.rs` `readable_len` probing. - **Shader Compiler & Cache** (`victory-shader`, `victory-pipeline`): Iterative BDD workstacks (`structure.rs`), `Op::VolatileLoad` optimization guards, `Rc<Key>` in `Module::merge`, `ds_permute_b32` / `v_readlane_b32` / `v_writelane_b32` wave safety, atomic `cmpxchg` sub-dword LDS writes, `v_fmac_f16` modifiers, `link_signature_ops` use replacement, `rayquery.rs` unwrap removal, `cache.rs` pruning/overwrite fixes, `io.rs` VGPR bounds, and `Validator` handle leak fixes. - **HLE, DirectStorage Bridge, Loader, Formats & Scripts**: `GameLicense` padding, `VICTORY_SOFT_VIEWS` materialization, `bounced_read` event/IOCP safety, per-voice `xaudio2` submit lock, `xmem` `MEM_RELEASE` purge + `PageWindow::write_at`, `bridge.cpp` loader-lock COM pool, `heap_sites` per-page `VirtualProtect`, `threads.rs` safe TLS attach, `audio.rs` 32-bit `BOOL` ABI, `media.rs`/`net.rs`/`xpackage.rs`/`xcurl.rs` hardening, XOR `detile_params` + XMA bounds, and SDK downloader / `.cmd` security hardening. > Draft PR for Windows CI validation — do not merge to `main` until ready for a release.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-04 15:58:29 +00:00
- Increase HELD_MS from 5s to 30s so bindless-pinned textures are not
  re-collected, sorted, and lock-checked on every sweep.
- Halve CLOCK_EVERY from 64 to 32 to reduce time-budget overshoot during
  per-texture mutex visits.
- Check candidates.is_empty() before out_of_time() in evict_window_drain
  so an exhausted queue does not falsely mark timed_out=true and block
  EvictionPass::rest_after from engaging BackOff.
- Guard BackOff::over against budget < 100 (where integer division yielded
  a 0-byte rise threshold) and raise RISE_PERCENT from 2% to 5% to avoid
  canceling backoff on normal frame-to-frame VRAM jitter.
- Add focused unit tests for evict_window_drain exhaustion and small/zero
  budget BackOff handling.
- Perf/Memory (play-log audit):
  - Cap and evict tex-block-spare & paged-heap-spare under commit pressure (pool.rs, tiles.rs, residency.rs, host/low_commit.rs) + tiles.rs unclaim epoch fix
  - Short-circuit no-op refreshes and coalesce write-watch queries (watch.rs, host/upcheck.rs, host.rs < 1 MiB)
  - Tighten file-backed mirror idle cap and coalesce/pace texback.rs readbacks (fileback.rs, host/recycle.rs, texback.rs)
  - Trim list/thin.rs per-call overhead and indirect/merge.rs fast paths
- GDK Clean-Room Audit (Domains 1-7):
  - D3D12.X/DXGI ABI: fix swapped (this, sret) in GetResourceAllocationInfo/2/GetCustomHeapProperties, return sret in rax on GetDesc, wire CreatePlacedResourceX, add OPTIONS8..13, fix DXGI GetDesc1/2 & GetDisplayModeList, clamp D3D12ConfigureVirtualMemoryX to 40-bit VA, fix CreateSamplerX Xbox One read & >1M view heap reserve
  - Scarlett Sync/Queue/RT: Wait32BitValueX MaskValue, CopyPageMappingsBatchX SKIP_RANGE fix, per-subresource barrier/DSV state tracking, Enhanced Barriers layout/DISCARD/Xbox sync bits, DiscardResource, VRS forwarding, SetHDRToneMapperX, DXR copy modes & CPU rehydration
  - DirectStorage & Files: fix ErrorRecord UAF, DuplicateHandle GetErrorEvent, EnqueueSignal error window, Queue/File Close drain, CancelRequestsWithTag, SourceIsPhysicalPages & SwizzleMode, QueryInterface, GetStats, verbatim host_volume_root & bounced_read error propagation
  - XG Tiling: u64::MAX error return + Sample check, tiled depth/UAV/MSAA swizzle selection, thin 3D mip layout & tail coords, XGSetHardwareVersion, custom pitch, 3D GetResourceTiling
  - Audio/ACP/XMA/XAudio2/APU: XMA overlap-add token side-table, XAudio2 FlushSourceBuffers UAF fix, dual-buffer XMA spanning frames & update commands, XMA2 END_OF_STREAM flush, APU empty-input FLUSH & default heap sizes, SHAPE context strides
  - XMem/XAsync/System: 2 MiB physical clusters, placeholder alignment, live XMemGetWorkingSetStatistics, XMemVirtualQuery metadata/tags, XMemCreateWin32Heap, XTaskQueueRegisterWaiter multi-fire & terminate cleanup, XSystemIsHandleValid(NULL), XThread feature bit, configurable suspend deadline
  - GameInput/Platform: v0 slot 0x50 5-arg RegisterGuideButtonCallback, named GameInputCreate export, out-ptr zeroing on E_NOTIMPL, XGameSave null count guard, XPackage ms interval & selector/callback validation, XStore addon_licenses, XNetworking console defaults, XUser AddDefaultUserSilently|AllowGuests validation
github-bot force-pushed github-bot/gh-4 from 5d7b61ada2 to 797f85e498 2026-12-04 22:11:23 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from 797f85e498 to 9d0bf871b5 2026-12-04 22:16:42 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from 9d0bf871b5 to 11666753ce 2026-12-04 22:22:07 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from 11666753ce to 933c3c7259 2026-12-04 22:27:21 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from 933c3c7259 to 85e80648bd 2026-12-04 22:37:53 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from 85e80648bd to a3da600390 2026-12-04 22:49:24 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from a3da600390 to 30cc4d8a3a 2026-12-04 22:59:57 +00:00 Compare
github-bot force-pushed github-bot/gh-4 from 30cc4d8a3a to 5694382ad2 2026-12-04 23:10:52 +00:00 Compare
github manually merged commit 956b2cb0e4 into main 2026-12-05 19:03:38 +00:00
This discussion has been locked. Commenting is limited to contributors.
No description provided.