<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/video_core/memory_manager.cpp, 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-01T20:18:01+00:00</updated>
<entry>
<title>nx2: leave unwritten sparse blocks without memory when they get zeros</title>
<updated>2026-11-01T20:18:01+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-11-01T06:03:37+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=40902b09c7b86de7cf12f26839241f26925d04b5'/>
<id>urn:sha1:40902b09c7b86de7cf12f26839241f26925d04b5</id>
<content type='text'>
Title 1 clears about 1 GB of its sparse regions at boot through the GPU
memory manager. Every block the clear touched got 4 MiB of guest memory,
which the clear itself then committed on the host, and counted as written,
so the texture cache gave the images over it device memory too. A block
nobody wrote reads zero already: when the part of a write that lands on
it is all zero, leave it as it is.

(cherry picked from commit 0d7ff63fd1a373cecff6ba91022c9027e801e53f)
</content>
</entry>
<entry>
<title>memory_manager: copy big pages without host memory page by page</title>
<updated>2026-11-01T04:11:02+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-11-01T04:11:02+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=edabc3e61486d59d67f33dfd992154927197450f'/>
<id>urn:sha1:edabc3e61486d59d67f33dfd992154927197450f</id>
<content type='text'>
GPU reads and writes of a continuous big page copied through
GetPointer() without checking it; the small-page path checks. A big
page whose host memory is not there yet (a Switch 2 region backed as it
is written, with its backing pending) made that memcpy fault: Mario Kart
World crashed in WriteBlockImpl (access violation) on its title screen
in two runs of a build on the 10-31 nx2. Such a page now takes the
per-page copy, which reports and skips missing pages, as non-continuous
big pages already did. Three 10-minute runs after the change, no crash.
</content>
</entry>
<entry>
<title>nx2: give sparse regions memory only where the GPU writes</title>
<updated>2026-10-30T16:27:04+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T08:39:43+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=6380b6687ded27892404c576becd78b7161ba68a'/>
<id>urn:sha1:6380b6687ded27892404c576becd78b7161ba68a</id>
<content type='text'>
nx2:gpu 214 regions with the sparse flag (word 7 bit 0x200) are Mario
Kart World's terrain texture arrays and layer pools, 170 MB to 5.8 GB,
mostly empty. Backed whole they ran the graphics pool dry (26 "could not
allocate" per session, later regions without memory), and backing a
block at a time made the texture cache rebuild the 1.45 GB arrays each
time a block was mapped.

A sparse region now gets a device (SMMU) range of its own when it is
created, mapped for the GPU at once, so its GPU mapping never changes.
Before a GPU-side write lands in it (WriteBlock, Write&lt;T&gt;), the 4 MiB
blocks it touches get memory, cleared, behind their device pages.
Unbacked device pages read zero and drop writes instead of crashing, and
the unmapped-device-access errors are logged 16 times, not once per page.
nx2:gpu 215 releases the device range and the blocks after the GPU is
done with them. The log reports GPU-only memory in use and its peak.

Mario Kart World, 180 s: no allocation failures; ~2.8 GB of terrain
blocks get memory instead of 6.5 GB of whole regions, next to 3 GB of
ordinary GPU-only regions. Terrain renders as before.
</content>
</entry>
<entry>
<title>memory_manager: notify the caches once per changed range</title>
<updated>2026-10-30T16:27:04+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T08:39:42+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=f9fc1e10fd7ed0a1c4664d48d2f095ce8826d87b'/>
<id>urn:sha1:f9fc1e10fd7ed0a1c4664d48d2f095ce8826d87b</id>
<content type='text'>
PageTableOp and BigPageTableOp called ModifyGPUMemory for every page
whose entry changed, and each call scans the texture and buffer caches.
Mapping one of Mario Kart World's 1.45 GB sparse regions made ~370,000
of those scans. Runs of changed pages are now reported as one range.
</content>
</entry>
<entry>
<title>video_core: cheaper small GPU reads, buffer usage tracking and compute uniforms</title>
<updated>2026-10-29T05:26:52+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-29T05:26:52+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=c01459347405591446d50858d7b075d617a58be9'/>
<id>urn:sha1:c01459347405591446d50858d7b075d617a58be9</id>
<content type='text'>
- MemoryManager::ReadBlockUnsafe reads within one 4 KiB page through a
  single translation (as Read&lt;T&gt; does) instead of the page walk:
  texture and sampler descriptors, several per draw (2.6% -&gt; 0.1% of
  title 1's GPU thread).
- UsageTracker skips ranges it tracked just before (until Reset): draws
  bind the same multi-megabyte storage buffers again and again, and
  each Track wrote a word per 4 KiB (2.0% -&gt; 0.7%).
- Small compute uniform buffers the GPU has not written are streamed,
  as graphics ones are; synchronizing them re-protected pages an inline
  upload had just unprotected, two VirtualProtect calls per dispatch
  (1.9% -&gt; 0.7%, page protection 3.2% -&gt; 2.3%).
</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: suspend channels on semaphore acquires; fix pushbuffer desyncs</title>
<updated>2026-10-28T00:53:15+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-28T00:53:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=bf1de8f40130af5d3b490ee40dcc2fb20d460a14'/>
<id>urn:sha1:bf1de8f40130af5d3b490ee40dcc2fb20d460a14</id>
<content type='text'>
NVN2 gates command buffers with semaphores the CPU releases after writing
them. Eden read past unmet SEMAPHORED acquires, so it executed stale commands
and desynchronised. Channels now suspend on an unmet acquire and resume from
the same word once it is met (scheduler keeps the waiting channels, the GPU
thread polls them), as in changes.patch.

Also: methods split across GPFIFO entries around a called command buffer are
set aside and resumed; subchannel 2 defaults to inline-to-memory; unbound
subchannels and out-of-range compute/DMA methods are dropped instead of
crashing; 4-byte semaphore releases no longer write 16 bytes; Ampere
SEM_PAYLOAD_HI/SEM_EXECUTE no longer spin as Kepler acquires; unmapped GPU
reads log instead of asserting. Debug aids: EDEN_NX2_PB_CHECK (pushbuffer
changed after submit), EDEN_NX2_QUERY_TRACE, a one-time pushbuffer dump.
</content>
</entry>
<entry>
<title>Switch 2: native memory/images, GPU-accessible attribute, TSG subcontexts, syncpoint shim</title>
<updated>2026-10-27T23:30:20+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-27T23:30:20+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=f32b430326af86bd956f3d49d1bf7b6a1b9c5e31'/>
<id>urn:sha1:f32b430326af86bd956f3d49d1bf7b6a1b9c5e31</id>
<content type='text'>
- gsv 111/112/114/423/429/430/314/315/435 track native memory and images with
  real ids (meanings from changes.patch); 1510/435 use its block-linear layout.
- svc 0x80 sets a real GpuAccessible (0x20) memory attribute (from changes.patch).
- Characteristics report TSG subcontexts (flag 22, 64 per TSG at 0xb4); NvRm
  otherwise allows one subcontext and a second NVN queue fails its setup.
- Syncpoint shim: flag 26, address-space ioctl 0xB, and GPU reads of the shim
  page return guest syncpoint values (scheme from changes.patch).
- EDEN_NX2_IPC_TRACE also logs TIPC commands; gdbrsp.py watch/mem improvements.
</content>
</entry>
<entry>
<title>[*] Remove Fix{Static,Small}VectorADL workaround for GCC 12 (#4386)</title>
<updated>2026-10-12T20:21:17+00:00</updated>
<author>
<name>lizzie</name>
<email>lizzie@eden-emu.dev</email>
</author>
<published>2026-10-12T20:21:17+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=4dc69c06f764a235bccd01afbfc765d9ddbebc9f'/>
<id>urn:sha1:4dc69c06f764a235bccd01afbfc765d9ddbebc9f</id>
<content type='text'>
1. We demand at least, minimum, gcc 14
2. Debian stable boost uses a newer version https://packages.debian.org/trixie/libboost-all-dev, so fix isn't longer required

- [x] I have read and followed the [Contribution Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/CONTRIBUTING.md#code-contributions).
- [x] I have read and followed the [AI Policy](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/AI.md)
- [x] I have read and followed the [Coding Guidelines](https://git.eden-emu.dev/eden-emu/eden/src/branch/master/docs/policies/Coding.md) to the best of my ability.

-------------------

Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4386
Reviewed-by: MaranBr &lt;maranbr@eden-emu.dev&gt;
Reviewed-by: crueter &lt;crueter@eden-emu.dev&gt;
</content>
</entry>
<entry>
<title>[common/core/dynarmic] Optimize page table allocations (#4219)</title>
<updated>2026-09-09T19:35:49+00:00</updated>
<author>
<name>Exverge</name>
<email>exverge@exverge.xyz</email>
</author>
<published>2026-09-09T19:35:49+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=5f142c7926d0c7fcbbd0ce30794d72f638a43b2a'/>
<id>urn:sha1:5f142c7926d0c7fcbbd0ce30794d72f638a43b2a</id>
<content type='text'>
Reduces the page entries from 32 bytes to 8 and rewrites `VirtualBuffer` to be more efficient in memory usage and specifically for large zero regions.

The page table will now only reserve 1GiB instead of 4GiB and of this memory it should only use at most ~8MiB.

This PR has the side effect of using Eden on Windows on low memory systems much more plausible since it would previously require ~10GiB of committable memory at front (despite using ~5-6 at most, inadvertently stalling other processes) where as now it should only require around the amount that it'll actually use.

Co-authored-by: Lizzie &lt;lizzie@eden-emu.dev&gt;
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/4219
Reviewed-by: Maufeat &lt;sahyno1996@gmail.com&gt;
Reviewed-by: lizzie &lt;lizzie@eden-emu.dev&gt;
Reviewed-by: CamilleLaVey &lt;camillelavey99@gmail.com&gt;
</content>
</entry>
</feed>
