Repository navigation
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
UniqueFunctionowns a callable given as an lvalue. It previously storedFunctorwith a
forwarding reference, so a callable passed by name asconstwas kept as a reference;
QueueVulkanPipelineCacheSavequeuesconst auto save = ..., and the serialization worker ran
that lambda after its stack frame returned. It now storesstd::decay_t<Functor>, constrains
construction and calls throughstd::invoke. Ported from Lichii249d889b.
[verified: host g++ harness covers const/non-const lvalues, std::ref, member pointers and the construction constraints; unverified: the original crash on hardware]- Shader
TrackAddendno longer recurses without a depth limit. A longIAdd32chain could
overflow the host stack while translating a shader; it now uses an explicit stack with the same
visit order. Ported from Lichii19dcffea.
[verified: same visit order and ambiguity rule by inspection; unverified: a title with the long chain] - A failed
ScratchBuffer::resize_destructiveleaves 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 Lichii64ea088a
(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 Lichii4a558454(originally
Eglantine19dfa543).[unverified: a title that hits the race] - Unmapped guest writes no longer flood the log.
Write,WriteExclusiveand
WriteExclusive128now 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 Lichii528dae4b.[verified: code path by inspection; unverified: the pathological guest]
Changed
- The GPU snapshot copier parks its waiter. After 4096 spins,
WaitFornow waits on the
completion atomic and the copier notifies after each job, instead of yielding in a loop. Ported
from Lichii4a3dbf64.[unverified: frame-time effect on the GTX 1650]
Verified
- Windows clang-cl production build and ctest: CI run
44892557878 passed configure,
cmake --build buildwithENABLE_WERROR=ON, both executable checks and
ctest --test-dir build --output-on-failure --no-tests=erroron commit5838714. - Host
g++ -std=c++20harnesses forUniqueFunction(const/non-const lvalues,std::ref,
member pointers, construction constraints) andScratchBuffer(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.