Skip to content

Veshiru 2.4.1

Latest

Choose a tag to compare

@github-actions github-actions released this 21 Nov 12:10
2fc3c41

Ports six self-contained stability and hot-path fixes from Lichii nx2 3165970a, with the
upstream commit named in each file. No frame-generation behaviour changed.

Fixed

  • UniqueFunction owns a callable given as an lvalue. It previously stored Functor with a
    forwarding reference, so a callable passed by name as const was kept as a reference;
    QueueVulkanPipelineCacheSave queues const auto save = ..., and the serialization worker ran
    that lambda after its stack frame returned. It now stores std::decay_t<Functor>, constrains
    construction and calls through std::invoke. Ported from Lichii 249d889b.
    [verified: host g++ harness covers const/non-const lvalues, std::ref, member pointers and the construction constraints; unverified: the original crash on hardware]
  • Shader TrackAddend no longer recurses without a depth limit. A long IAdd32 chain could
    overflow the host stack while translating a shader; it now uses an explicit stack with the same
    visit order. Ported from Lichii 19dcffea.
    [verified: same visit order and ambiguity rule by inspection; unverified: a title with the long chain]
  • A failed ScratchBuffer::resize_destructive leaves a consistent buffer. The old order
    raised the capacity before allocating, so a failed growth left a capacity with no storage. It
    now releases first; a failure leaves an empty, reusable buffer. Ported from Lichii 64ea088a
    (the ScratchBuffer part only). [verified: host g++ failure-injection harness and a new ctest case; unverified: memory pressure in a game]
  • Sparse texture segments with no device translation are skipped, not asserted. A segment can
    lose its translation between the submapped-range query and the lookup. The first eight are
    logged, the rest are skipped, and iteration continues. Ported from Lichii 4a558454 (originally
    Eglantine 19dfa543). [unverified: a title that hits the race]
  • Unmapped guest writes no longer flood the log. Write, WriteExclusive and
    WriteExclusive128 now log the first 1000 and then one per 100000, as unmapped reads already
    did. A guest spinning on a bad pointer could otherwise write a ~100 MB log and slow the run.
    Ported from Lichii 528dae4b. [verified: code path by inspection; unverified: the pathological guest]

Changed

  • The GPU snapshot copier parks its waiter. After 4096 spins, WaitFor now waits on the
    completion atomic and the copier notifies after each job, instead of yielding in a loop. Ported
    from Lichii 4a3dbf64. [unverified: frame-time effect on the GTX 1650]

Verified

  • Windows clang-cl production build and ctest: CI run
    44892557878 passed configure,
    cmake --build build with ENABLE_WERROR=ON, both executable checks and
    ctest --test-dir build --output-on-failure --no-tests=error on commit 5838714.
  • Host g++ -std=c++20 harnesses for UniqueFunction (const/non-const lvalues, std::ref,
    member pointers, construction constraints) and ScratchBuffer (failure injection and reuse).

Not ported

  • Lichii's 4 MiB device-buffer blocks: Veshiru already uses 8 MiB; the extra step is unmeasured.
  • Spill-collect GC change: Veshiru has no host-spill collect path.
  • Texel-buffer clamp, GPU-split parking and GPFIFO inline headers: deferred; reasons and exact
    commits are in the comparison.

Veshiru is a Windows-exclusive emulator: it is built and tested for 64-bit Windows 10 and 11 only.

Extract the entire zip and run veshiru.exe, or veshiru-cmd.exe from a terminal.

Build Type Standard PGO (Recommended) Notes
amd64 / x86_64 zip PGO zip Both built with clang-cl and ThinLTO; the PGO zip uses a balanced multi-game Switch 1 & Switch 2 profile

The PGO build is compiled with profile-guided optimization using a balanced multi-game Switch 1 & Switch 2 runtime profile (veshiru-windows.profdata). Prefer it on modern x86_64 CPUs.