Skip to content

Eglantine nx2 build 129 (a407703)

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Nov 08:25
a407703

What's new in this build

Build 129 of nx2 (a407703) is build 121 plus seven changes: much lower memory use on Linux, fewer ASTC stalls and a buffer-cache crash fixed in Mario Kart World, Splatoon Raiders' vertex fetch fixed on AMD, a .nup packer (with Convert to NUP in the game list and --pack-nup in eden-cli), frame generation settings that stay set, and a macOS .dmg next to the .app zip.

Much lower memory use on Linux

Freeing guest memory zero filled the memfd backing with memset, which commits every page it touches. The pages are now handed back to the kernel with fallocate(PUNCH_HOLE) and read as zero afterwards, with only the partial pages at each end still cleared by hand. Fiber stacks and the Vulkan descriptor update ring are no longer zero-filled when they are created either — they are always written before they are read, so untouched pages stay unbacked.

Mario Kart World on Linux (RX 9070 XT, 31 GB): peak RSS 23.1 GB → 15.9 GB, about 1.2 GB of that from the fiber and descriptor changes. EDEN_PUNCH_HOLE=0 restores the memset.

Mario Kart World: fewer stalls, no flashing, no crash

  • ASTC decodes no longer block the GPU thread. Every ASTC decode ended with scheduler.Finish(). Over a 19-minute Grand Prix that stalled the GPU thread 30.7 s in total — up to 1.2 s out of every 5 s while new textures streamed in (track sections, race starts), which is where the hitches were. The decode now submits and flushes instead of waiting: the ordering is kept without the stall, there is no flashing in play, and frames over 100 ms went from dozens to 3 in about 7 minutes. EDEN_NX2_ASTC_FLUSH=0 restores the wait.
  • BC3 flashing on RADV. TranscodeAstcToBcn (BC1/BC3 with GPU decode) was the only ASTC decode recorded with wait = false, and on RADV it flashed heavily all over the screen while the uncompressed GPU decode — which waits — did not. It waits now. Full pipeline barriers around its copy did not fix the flashing, so this hides a race rather than removing one.
  • Old track textures are evicted first. The collector never deletes CostlyLoad images outside aggressive mode, so once a cup moves on, the previous tracks' textures stayed resident and the cache sat over its expected use, deleting cheap images that were still in use. When over the expected use, costly images unused for 1800 frames (half a minute) now go first. Grand Prix on an RX 9070 XT: frames over 20 ms 8.8% → 4.0%, 58.7 fps average. EDEN_NX2_TC_OLD_AGE=<frames> sets the age; 0 turns it off.
  • A crash after about four and a half minutes. FindBuffer indexed the page table (which covers 2^36 bytes) with any address, and a uniform buffer at 0x72253b2f2890 read far past it. Such an address is now treated as no buffer. Where that address comes from is still unknown — this stops the crash, not the cause.

Splatoon Raiders: the white haze on AMD is gone

Its outdoor scenes are drawn with a 69-byte vertex stride and a packed 4-byte attribute at byte 65, which makes the fetches unaligned — undefined behaviour in Vulkan. NVIDIA reads them as meant, the AMD Windows driver does not, and the result was a white haze with horizontal streaks. A binding with that layout is now copied by a compute pass to a 72-byte stride with the tail at byte 68, and the vertex input offsets and stride follow. EGLANTINE_TEST_VERTEX_REPACK=0 turns it off; EGLANTINE_EXPERIMENTAL_STATIC_VERTEX_REPACK=1 also covers pipelines without dynamic vertex input.

Convert to NUP

Loose dumps can now be packed into a .nup container: right-click a game in the list and choose Convert to NUP, or run eden-cli --pack-nup <dump> [out.nup].

  • Every package is kept (base, updates/<version>/, dlc/<titleid>/<n>/), files are deduplicated by SHA-256 and compressed with zstd unless that does not shrink them, and files over 256 MiB are stored raw.
  • Output is byte-identical on every platform: compression is single-threaded with every zstd frame parameter set explicitly, and zstd is always bundled so all builds use the same version.
  • A low-storage mode deletes each source file once its extent is synced and journaled, and an interrupted run resumes from the journal.
  • The Qt action asks for confirmation with the estimated space, offers the low-storage mode, runs in the background with progress and cancel, and resumes an interrupted conversion.
  • The packer writes the aligned NUP v1 layout, which is what the reader in builds 117 and later expects, so a converted dump loads like any other .nup.

Frame generation settings stay set

Six settings were paired with frame_gen, and each widget made its own checkbox and saved itself to frame_gen on apply, so the last one won — ticking only the first box left frame generation off (issue #251). A paired setting no longer gets its own checkbox, frame_gen has its own widget again, and on Qt the six are hidden while frame generation is off. Android keeps the pairing, which it uses to hide the options.

Also in this build

  • A draw that binds a uniform buffer at an address with no CPU mapping no longer dereferences an empty value (undefined behaviour); the binding is treated as unbound. The per-draw uniform, storage and texture buffer update loops also return immediately when a stage has none of that kind enabled.
  • CI: dependency and cache rework, and the actions moved to Node 24. Nothing to test in the app.
  • macOS: a .dmg is published next to the .app zip, so you can drag the app out of the disk image instead of unzipping it.

Coming from build 121?

This build contains everything 121 had. The nx2-experimental batch (task and mesh shaders, the AMD VRAM margins, the command-list snapshot) is still not in the nx2 line; take 122 if you want it.

How it works, for the technically curious

  • HostMemory: Free punches holes with fallocate(FALLOC_FL_PUNCH_HOLE | FALLOC_FL_KEEP_SIZE) per full page range and only memsets the partial pages at the ends. EDEN_PUNCH_HOLE=0 keeps the old path.
  • Fiber: the stack array is no longer value-initialised; vk_update_descriptor allocates the per-frame ring with make_unique for arrays (no value-init) instead of make_unique with braces.
  • TranscodeAstcToBcn records its decode with wait = true, matching the other ASTC decodes. TextureCache::DecodeImage submits and calls Flush where it used to call scheduler.Finish().
  • TextureCache::EvictOldCostly: when over expected_memory, CostlyLoad images whose last use is older than old_age (1800 frames) are evicted before anything else.
  • BufferCache::FindBuffer returns no buffer for an address outside the page table instead of indexing past it.
  • VertexRepack (vulkan_vertex_repack.comp, vk_compute_pass, fixed_pipeline_state): a 69-byte stride with an attribute at byte 65 is copied to a 72-byte stride with the tail at byte 68, and the pipeline's attribute offsets and stride are rewritten.
  • FileSys::NupWriter + src/tests/core/nup_writer.cpp: the packer, its round-trip tests (standalone updates, a bare exefs/romfs dump, low-storage resume, overwrite rejection) and a pinned output hash so a change to the container layout is deliberate.

Automatic build of nx2 at a407703.

Windows: extract the zip and run eglantine.exe, or eden-cli.exe from a terminal.
Linux (AppImage): make it executable (chmod +x) and run it; it bundles its libraries and needs glibc 2.39 or newer (Ubuntu 24.04, Fedora 40, Debian 13, Arch).
Linux (tar.gz): extract it and run ./eglantine or ./eden-cli; it uses your system libraries, so Qt 6 and the usual libraries must be installed.
macOS: Apple Silicon and macOS 15 or newer. Unzip and move eglantine.app to Applications; eden-cli is inside it, in Contents/MacOS. The app is not notarized, so the first time right-click it and choose Open (or run xattr -dr com.apple.quarantine eglantine.app).
The -pgo builds are the same programs compiled with profile-guided optimization (clang plus Eden's profile); prefer them when your CPU supports it. The Windows PGO build is a MinGW build, so it carries its own DLLs and needs no Visual C++ redistributable.