Skip to content

Eglantine nx2 build 131 (ce1b1de)

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 02 Nov 15:09
ce1b1de

What's new in this build

This is build 131 of nx2 (ce1b1de): the merge of nx2-experimental back into nx2 (PR #291, "bring the mainline release up to speed with the performance updates from nx2-experimental"). Its source is identical to build 130 — same tree, same code — so if you are already running 130 there is nothing new to test here; the binaries differ only because the build number and commit sha are compiled in. What is new is that nx2 finally carries the experimental batch, which it never had before.

So: on build 129? This build is a large step up — it adds everything from the nx2-experimental line to nx2. On build 130? Same code, take either.

Task and mesh shaders (new to nx2)

Switch 2 titles draw some geometry with NVN task and mesh programs, which nx2 used to reject and skip. They are translated in the shader recompiler (with an emulated stage buffer for the task payload) and drawn as native Vulkan mesh pipelines through VK_EXT_mesh_shader, keyed by the mesh shader state instead of being written to the disk pipeline cache.

Practically: high-detail LODs and other task/mesh-drawn geometry render instead of popping in and out at low quality. EDEN_NX2_NO_MESH and EDEN_NX2_NO_MESH_FILE turn task/mesh off at run time if you want to compare or bisect a problem.

Fewer deaths on AMD when VRAM runs out

  • A session on a full card no longer kills the process. The allocator counts the unused tail of its blocks, which the texture cache could not see — on an RX 7800 XT that tail was 1.06 GiB, the whole safety margin — so the heap sat at its budget while the cache still believed there was room, then images stopped fitting and the process died. The block slack is now reserved on top of the margin.
  • Images that do not fit are backed in host memory instead of being left with nothing bound, which crashes AMD's drivers the moment the image is sampled (an RX 6600 died mid-flood; an RX 7800 XT created 211 of them). Slow but valid, and each occurrence makes the cache keep more room free until the pressure stops.
  • Sparse images no longer divide by a block size AMD reports as zero (imageGranularity), which crashed sessions. The standard 64 KiB 2D block shape is used when the device offers it.
  • The three margins log as Memory margins: base … MiB, out of memory … MiB, block slack … MiB, so a report can say which one is doing the work.

Frames in the right image, and the trees stay

The present returns before the GPU thread reaches that frame's work, and the game refills command memory it has already submitted, so the end of a frame could run with the next frame's present image as its target. Command lists are now copied when they are submitted and the copy is what gets executed; EDEN_NX2_PB_SNAPSHOT=0 goes back to executing from guest memory.

That copy has one exception: command lists the GPU itself fills — the small culling lists Mario Kart World rebuilds every frame — are read at execution time, because their words at submit time belong to an older frame. Entries on GPU-written pages always take the flushing read, which is what keeps the trees from vanishing.

Splatoon Raiders: fog, and its own shader variants

Three of its pixel shaders were rejected and their draws skipped, which is why the fog was missing: TXD refused a bit its own emit already forwards as NODEP. The TXD/TXQ variants it uses are now lowered late instead of rejecting the program, so those shaders compile and their draws run.

GameChat: no more log flood from nx2:camera

GameChat polls nx2:camera command 29 every frame and each call was logged as an unimplemented function — a Critical and a Warning line, 40,000 of them in one session. Commands 3, 21 and 29 now answer with an empty success and are logged once each.

Mario Kart World: the HSETP2 register form

Its compute shader uses HSETP2.EQ.AND P0, PT, R44.H0_H0, R44.H1_H1, P0 (opcode 0x234), and the lowering only had the immediate form (0x434), so the whole program was rejected. The register form is lowered to Maxwell's HSETP2 with a register source now, so the program compiles.

Cheaper native shader capture

A Switch 2 shader used to be captured and lowered when its ShaderInfo was made and again for every environment built for its pipelines; the lowered code now lives in the ShaderInfo and the environments adopt it. The capture also reads guest memory a 4 KiB page at a time instead of flushing the GPU caches for every 16-byte instruction. This is CPU work removed from first encounters with a program, not a measured frame-time change.

Also in this build, for the first time on nx2

The rest of the nx2-experimental batch comes with it: the placeholder-HLE work for known-but-unimplemented service commands (gsv, vi2, nvdrv, bsd 36, hid 213/220, audio device events, am, nsd, ssl), the Vulkan memory-block and pipeline-cache changes, the texture-cache work, the Dynarmic speedups and the vfs_real/loader changes. Those are described in build 109 and build 116; none of it had shipped on nx2 before this build.

What is not new

Everything build 129 had is unchanged here: the Fire Emblem: Fortune's Weave work (build 121), the Linux RAM and ASTC work, the Splatoon Raiders vertex repack, Convert to NUP / --pack-nup, the frame-generation settings fix and the macOS .dmg (build 129). The .nup reader, including the aligned NUP v1 layout, is also unchanged.

How it works, for the technically curious

  • Build 131 is merge ce1b1de (parents a407703 = build 129 and c0cb332 = build 130). git diff build-130..build-131 is empty and both trees hash to e3f6d670, so this is the same code as build 130 built from nx2 instead of nx2-experimental.
  • Against build 129 the tree changes 155 files, +5661/−942.
  • The merge that produced build 130 resolved the two lines per area: lower_to_maxwell.h takes the experimental lowering as the base with nx2's seven lowering batches applied on top (second texture descriptor buffers read bindless in TEX/TLD.SCR/SUST, FSEL keeping its operand modifiers, TXD taking any channel mask); host_memory.cpp keeps the experimental granule bitmap and HintCold plus nx2's hole punching; texture_cache.h runs nx2's old-age eviction pass before Collect(); nx2_gsv.h keeps the experimental session handling plus nx2's maximum-buffer-resolution reply and 1-based graphics device ids.
  • Checked by lowering shader dumps: 837 Fortune's Weave programs lower with 12 rejects and 1183 Mario Kart World programs with 0 — the same counts each line produced on its own.

Automatic build of nx2 at ce1b1de.

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.