<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/video_core/CMakeLists.txt, branch nx2</title>
<subtitle>Mirror of github.com/cira0100/Eglantine-public nx2, a fork of Djihads80/Eglantine.</subtitle>
<id>https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2</id>
<link rel='self' href='https://git.cirakg.xyz/eglantine-cirakg/atom?h=nx2'/>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/'/>
<updated>2026-11-03T17:33:16+00:00</updated>
<entry>
<title>video_core: NVIDIA DLSS through NVIDIA Streamline in place of a game's DLSS</title>
<updated>2026-11-03T17:33:16+00:00</updated>
<author>
<name>Duck912</name>
<email>350528965+Duck912@users.noreply.github.com</email>
</author>
<published>2026-11-03T17:13:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=63e87a22c60394bc4f427ee5f8d6ddbce7b0ac7f'/>
<id>urn:sha1:63e87a22c60394bc4f427ee5f8d6ddbce7b0ac7f</id>
<content type='text'>
Adds a Graphics setting, "Use NVIDIA DLSS in place of a game's DLSS" (nvidia_dlss, off by
default). When it is on, in Windows builds configured with EGLANTINE_STREAMLINE_SDK, the
evaluation Eglantine already replaces with FSR 3.1 goes to NVIDIA DLSS on GeForce RTX cards, with
the same inputs (colour, depth, motion vectors, jitter). When DLSS can't run, FSR 3.1 runs as
before.

Only Streamline's MIT-licensed headers are compiled in; nothing of NVIDIA's is linked or shipped.
At run time Eglantine looks for sl.interposer.dll in the user folder's "streamline" folder (or
EDEN_STREAMLINE_DIR, or "streamline" next to the executable), checks its Streamline signature and
starts Streamline with manual hooking. Streamline's plugins come from that folder or the NVIDIA
app's downloads. DLSS itself is nvngx_dlss.dll in the same folder, else the newest DLSS 310 or
later that the NVIDIA app has downloaded, checked for NVIDIA's Authenticode signature and copied
as streamline/nvidia-app/nvngx_dlss.dll. Like other tools that call DLSS outside a game, it uses
its own fixed project id with the custom engine type.

- Preset K for all modes (EDEN_NX2_DLSS_PRESET overrides it): the default Performance model (M)
  and L draw thin dark horizontal lines in some frames at 2x resolution scale; K doesn't.
- HDR input with auto exposure; the mode follows the render/output ratio.
- Buffer device address stays enabled when DLSS needs it, for DLSS only.
- The upscaler waits for the device instead of submitting when it is destroyed: by then the
  game's channels are released, and a submit read the state tracker's stale flags (a crash when
  stopping a game).

With the setting off, or in builds without the SDK path (the setting is hidden there), nothing
changes.

Testing: Windows 11, RTX 5080, Fire Emblem: Fortune's Weave docked at 1x (720p -&gt; 1440p) and 2x
(1440p -&gt; 2880p), CLI runs and GUI play, stopping and restarting games with DLSS on. Not tested on
other GPUs or games.

Assisted-by: Claude Opus 5.5 (implementation, debugging)
Signed-off-by: Duck912 &lt;350528965+Duck912@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>video_core: replace Fortune's Weave's DLSS with AMD FSR 3.1</title>
<updated>2026-11-02T21:28:01+00:00</updated>
<author>
<name>Duck912</name>
<email>350528965+Duck912@users.noreply.github.com</email>
</author>
<published>2026-11-02T21:12:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=11cebf56014a5015db28179a8acc81cad0caf641'/>
<id>urn:sha1:11cebf56014a5015db28179a8acc81cad0caf641</id>
<content type='text'>
Fire Emblem: Fortune's Weave's DLSS network can't run here, and the
temporal stand-in is only an approximation of it. FSR 3.1 takes the
same inputs DLSS does: the jittered colour, motion vectors, the jitter
and the depth, which the game's first DLSS pass reads through
cbuf0+0x298 (Z32, reversed, the colour's size). Kepler compute keeps it
next to the motion vectors.

Fsr3Upscaler ports the host side of the SDK's ffx_fsr3upscaler.cpp: the
eight passes (prepare inputs, luma and shading-change pyramids, shading
change, reactivity, luma instability, accumulate, RCAS), the internal
images and the constants, recorded through the scheduler with the
shaders from externals/FidelityFX-SDK. It takes HDR colour, render-size
motion vectors and reversed depth, computes its own exposure, and uses
the no-wave SPD variants on devices without compute quad operations.
The SDK's GLSL uses separate textures and samplers, so DescriptorBankInfo
gains sampled image and sampler counts (default 0). FSR's RCAS follows
the RCAS Sharpness slider. The result goes to FSR's own RGBA16F image
and is drawn into the game's output, which keeps its format.

TextureCacheRuntime::TemporalUpscale runs FSR 3.1 first. Without the
depth, at mismatched scales, on a device lacking FSR's formats or
features, or if its pipelines fail to build, the stand-in runs instead,
and the bilinear blit stays last. EDEN_NX2_DLSS_REPLACEMENT=standin
forces the stand-in. A gap of more than 250 ms between evaluations
restarts the history.

The BlitColor overload that takes a raw image view transitions its
source to SHADER_READ_ONLY_OPTIMAL but described it as GENERAL in the
descriptor (a validation error); it now describes the layout it uses.

Assisted-by: Claude Opus 5.5 (debugging, implementation and drafting)
Signed-off-by: Duck912 &lt;350528965+Duck912@users.noreply.github.com&gt;
</content>
</entry>
<entry>
<title>shader: compute texture handles read from storage buffers for each draw</title>
<updated>2026-10-31T20:03:16+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-31T20:03:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=561f87abec2f76b3ca40c59277752ed4d3b6bf16'/>
<id>urn:sha1:561f87abec2f76b3ca40c59277752ed4d3b6bf16</id>
<content type='text'>
Switch 2 shaders can read a texture handle from a storage buffer (Switch
Sports' scenery: a per-object entry of a table whose pointer is in the driver
constant buffer). The bindless handle search looked through the load into its
address and returned the table pointer's constant buffer word as the handle,
which named an arbitrary descriptor; the game repoints that one at transient
render targets every few seconds, so the island and menu lighting flipped
between correct, dark and red.

The search no longer looks into memory loads. A handle it cannot trace is now
built into a small program over constant buffer words, storage buffer words and
integer operations (Shader::Info::handle_programs), which the pipelines evaluate
when they bind the texture. Handles a single evaluation cannot give (one that
changes in a loop) keep the previous search.
</content>
</entry>
<entry>
<title>Added FSR 3 Upscaling and Frame Generation</title>
<updated>2026-10-30T18:37:31+00:00</updated>
<author>
<name>Djihads80</name>
<email>mahboubijoujou111@gmail.com</email>
</author>
<published>2026-10-30T18:34:38+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=8a72dc011e0a30a6bddd1f2476a94927787e6e15'/>
<id>urn:sha1:8a72dc011e0a30a6bddd1f2476a94927787e6e15</id>
<content type='text'>
</content>
</entry>
<entry>
<title>nx2: decode Switch 2 video (nn::codec::video) with FFmpeg</title>
<updated>2026-10-30T00:49:48+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-29T19:55:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=c30df71ee0752005e0be3bbf2f3233b65f38cabc'/>
<id>urn:sha1:c30df71ee0752005e0be3bbf2f3233b65f38cabc</id>
<content type='text'>
The decoder service used to complete every submitted frame at once
without decoding it. Each decoder service (gsv 902/906/1002 -&gt; TIPC 1)
now decodes on a thread of its own with FFmpeg (VP9, VP8, H.264;
video_core/host1x/nx2_video_decoder), in software or on the host GPU per
the NVDEC emulation setting.

- 101 takes the codec name ("video/vp9") from its A buffer.
- 109 queues the A buffer's frame; the ready event fires while the queue
  has room.
- 311/314 reply a NativeSyncHandle {~syncpoint, 0, value}: the service
  allocates a syncpoint and increments it per finished frame, frames
  filling output images in register/release order like the client's
  ring. 314 waits for the client's release fence before reuse.
- 213 returns the frame's size, pts (TimeSpan, ns) and end of stream.
- gsv 911 creates a decoder image pool (count images in one memory) and
  gsv 961 returns the 128-byte CpuUserImageDescriptor that
  nn::codec::ReadDecoderOutputImage* copy frames out with; images are
  pitch-linear NV12, RGBA or BGRA.
- Each new video command is logged once in full; EDEN_NX2_VDEC_DUMP=&lt;dir&gt;
  saves every 120th decoded frame's luma.

Title 1's Mushroom Cup opening (2560x1440 VP9, 1423 frames) now decodes
in real time and the game goes on to the race. The picture on screen
still stays on the first frame: the game memcpys each frame into GPU
memory and the texture cache keeps its first upload (notes 148).
</content>
</entry>
<entry>
<title>video_core: split the GPU thread in two (EDEN_NX2_SPLIT, off by default)</title>
<updated>2026-10-30T00:49:48+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-29T15:16:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=7a251d3a92f870649dab6068007ca3a1c910bbb5'/>
<id>urn:sha1:7a251d3a92f870649dab6068007ca3a1c910bbb5</id>
<content type='text'>
The GPU thread (front) takes the CPU's commands, parses command lists
and runs the puller; engine method calls and everything behind them
(registers, draws, dispatches, the rasterizer and its caches) run in
order on a second thread (back), fed through a single-producer
single-consumer ring (gpu_split.h). Work the front did on back-owned
state (end of command list flushes, channel binds, semaphore releases,
syncpoint increments, flush/invalidate requests, presentation) is
deferred into the same ring; the front waits for the back only where it
needs a result from that state: semaphore acquires and MME DMA reads.

EDEN_NX2_SPLIT=1 runs macros on the back. EDEN_NX2_SPLIT=2 runs the 3D
and compute macros on the front against copies of the registers they
read (Maxwell3D/KeplerCompute Front*), drops state writes that keep a
register's value there, and sends the rest. EDEN_NX2_SPLIT_VERIFY=1
compares the copies with the back's registers every 4096 macro calls
(0 differences in 40,193 checks in title 1); EDEN_NX2_SPLIT_CHECK=1
logs the stack of any other thread using the Vulkan scheduler while the
back runs. Switch 2 titles, Vulkan, non-accurate GPU only.

Title 1, 3D attract loop: ~44,000 draws a second on one thread, ~47,400
with EDEN_NX2_SPLIT=1, 50,000-66,500 with EDEN_NX2_SPLIT=2.
</content>
</entry>
<entry>
<title>nx2: replay repeated native macro calls instead of interpreting them</title>
<updated>2026-10-29T04:27:35+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-29T04:27:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=863d3afa90f2dfde8e715b45f28fc75c1b472739'/>
<id>urn:sha1:863d3afa90f2dfde8e715b45f28fc75c1b472739</id>
<content type='text'>
Title 1 makes ~1,000,000 native macro calls a second in 3D scenes, 7
instructions each on average, and 96% repeat an earlier call exactly.
A call whose effects depend only on its start, its parameters and the
data RAM words it read (no MME_READ, no memory reads, no re-read of
its own data RAM writes, no code upload while it ran) is remembered
with those reads as guards; a later call with the same start and
parameters whose guards still hold replays its data RAM and method
writes. Uploading macro code clears the memo. EDEN_NX2_MME_MEMO=0
interprets every call.

Checked offline against the previous interpreter on 200,000 recorded
3D-scene calls (method writes, registers and data RAM all identical,
94% replayed, 1.9x faster); in the game the macro zone fell from ~0.26
to ~0.20 us per call.
</content>
</entry>
<entry>
<title>nx2: GPU-thread zone timers and an in-process sampling profiler</title>
<updated>2026-10-29T03:07:49+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-29T03:07:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=571f9b58eb8a9c102a91a5d26cd32ebae4330232'/>
<id>urn:sha1:571f9b58eb8a9c102a91a5d26cd32ebae4330232</id>
<content type='text'>
EDEN_NX2_GPU_PROFILE=1 times the GPU thread's stages (command parsing,
macros, draw setup by step, compute, texture uploads) and logs each
one's share of every second.

EDEN_NX2_SAMPLE=&lt;thread names&gt; (Windows) pauses the named threads about
600 times a second for EDEN_NX2_SAMPLE_SECONDS, walks their stacks and
writes per-function counts plus folded stacks (EDEN_NX2_SAMPLE_OUT).
</content>
</entry>
<entry>
<title>Switch 2: Turing macros, native compute, Ampere shader lowering, native tiling</title>
<updated>2026-10-28T02:26:16+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-28T02:26:16+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=51207c73c889dbdc4a586a5da23314f6d33e4eb9'/>
<id>urn:sha1:51207c73c889dbdc4a586a5da23314f6d33e4eb9</id>
<content type='text'>
From changes.patch: the TU104/GA10x MME interpreter (shared macro context for
the process's channels, also on the compute class), native compute with QMD
3.0 dependency scheduling, the Ampere-to-Maxwell shader lowering, native
vertex stream sizes, and the console's GOB swizzle for textures, DMA copies
and the host unswizzle shaders. Switch 2 channels turn all of it on at init.

The lowering is widened for title 4 (all 32 of its programs lower): general
TEX (any dimension/LOD/mask, operand split 1+1/2+1/2+2/4+n, any but consistent
descriptor buffer), cube/array, SULD channel masks, 128-bit STG, indexed IPA,
VOTE, SHFL with any immediate or predicate output, R2P/P2R byte select,
uniform ULOP3/ULEA/UBREV/UFLO.SH/UISETP signed/UMOV URZ, IMNMX cbuf, IADD3
and FFMA uniform operands, FMUL /4 /8 x8, and BSSY/BSYNC/BREAK/WARPSYNC as
no-ops. The capture stops at unmapped memory. EDEN_NX2_SHADER_DUMP dumps every
native program; tools in C:\dev\nx2work test the lowering offline.
</content>
</entry>
<entry>
<title>Switch 2 GPU: syncpt server, identity GPU mappings, Ampere classes, submit fences</title>
<updated>2026-10-27T20:19:35+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-27T20:19:35+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=2835fec7fc66e1a1659710de8eddf2dfe67e20f9'/>
<id>urn:sha1:2835fec7fc66e1a1659710de8eddf2dfe67e20f9</id>
<content type='text'>
- gsv 204: real syncpoint shared page (values mirrored from host1x, armed waits
  acknowledged by a 500us poller); first handle is the writable request event.
- syncpt 22/201/202: per-slot events signalled through host1x guest actions.
- nx2:gpu sub 101 memory is identity-mapped (GPU VA == CPU VA) into every
  nvhost-as-gpu GMMU via Nx2GpuMemoryRegistry; SMMU physical range widened to
  34 bits for the 10/12 GiB layouts.
- Puller runs Ampere 3D/compute/copy classes on the Maxwell engines; class 0 unbinds.
- Turing+ macros are skipped (Eden only has the Fermi macro ISA).
- Submits with increment_value get Eden-side syncpoint increments, since NVN2
  signals completion with semaphore releases only.
</content>
</entry>
</feed>
