<feed xmlns='http://www.w3.org/2005/Atom'>
<title>eglantine-cirakg/src/video_core/engines/maxwell_3d.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-02T22:36:01+00:00</updated>
<entry>
<title>Merge pull request #334 from snowstormxd/codex/upstream-mkw-test</title>
<updated>2026-11-02T22:36:01+00:00</updated>
<author>
<name>Jonas</name>
<email>104419015+jojo-chaechae@users.noreply.github.com</email>
</author>
<published>2026-11-02T22:36:01+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=8362c44ff835d7be73d2adad9ce3e2d4467a6aeb'/>
<id>urn:sha1:8362c44ff835d7be73d2adad9ce3e2d4467a6aeb</id>
<content type='text'>
MKW performance improvements</content>
</entry>
<entry>
<title>video_core: continue a split instance loop at its own instance index</title>
<updated>2026-11-02T19:53:47+00:00</updated>
<author>
<name>Sssnowyyy</name>
<email>78863999+Sssnowyyy@users.noreply.github.com</email>
</author>
<published>2026-11-02T16:41:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=427b9abfdc4898f1aeef978ee6edbdeb336db280'/>
<id>urn:sha1:427b9abfdc4898f1aeef978ee6edbdeb336db280</id>
<content type='text'>
Writing any register outside the instance loop's own methods now draws the
waiting instances first, so the batch sees the base instance it was begun
with. When a title writes another register in the middle of a loop, such
as a per-instance constant buffer, the loop is drawn in several batches,
and each later batch started again at global_base_instance_index with one
extra instance, so it used the instance IDs of the first records.

Count the instances already drawn for the current loop and start the next
batch after them, without the extra first-instance draw. A loop that is
not split is drawn exactly as before.

Follow-up to 2ad0830d2f and eb99da6072.

Assisted-by: Claude Sonnet 5.5 (implementation and commit message)
</content>
</entry>
<entry>
<title>gpu: make register-write history opt-in in release builds</title>
<updated>2026-11-02T18:57:54+00:00</updated>
<author>
<name>snowstormxd</name>
<email>214507868+snowstormxd@users.noreply.github.com</email>
</author>
<published>2026-11-02T18:00:15+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=1a346fb3bb69a5156231392aef9def6ce8d9477c'/>
<id>urn:sha1:1a346fb3bb69a5156231392aef9def6ce8d9477c</id>
<content type='text'>
Keep error reporting and debug-build history. EDEN_NX2_3D_HISTORY enables the full ring in release builds without recording every method during normal play.

Assisted by Codex.

(cherry picked from commit cac6081916e8e5461e2754308cd8986deaec774b)
</content>
</entry>
<entry>
<title>macro: execute native parameters without a second FIFO copy</title>
<updated>2026-11-02T18:57:54+00:00</updated>
<author>
<name>snowstormxd</name>
<email>214507868+snowstormxd@users.noreply.github.com</email>
</author>
<published>2026-11-02T18:00:14+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=665938d0b157ff1dce056b5c24a57aee9392929b'/>
<id>urn:sha1:665938d0b157ff1dce056b5c24a57aee9392929b</id>
<content type='text'>
Use the owned parameter vector for DMA FIFO appends. Add a native JIT regression covering reallocation and repeated invocations against the copied-input path.

Assisted by Codex.

(cherry picked from commit 5b6803aaab18e332493903ee49cab026c041d5dc)
</content>
</entry>
<entry>
<title>Merge nx2 into nx2-experimental</title>
<updated>2026-11-02T13:43:01+00:00</updated>
<author>
<name>kraibse</name>
<email>33869366+kraibse@users.noreply.github.com</email>
</author>
<published>2026-11-02T12:50:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=c0cb3325e22756edb65c87d33ef298349ade0ad3'/>
<id>urn:sha1:c0cb3325e22756edb65c87d33ef298349ade0ad3</id>
<content type='text'>
Resolved by area:
- audio feature_support.h: nx2's native revision handling.
- fiber.cpp: ours, which also drops the unused rewind stack.
- host_memory.cpp: ours granule bitmap and HintCold, plus nx2's
  fallocate hole punching per whole dirty granule on Linux.
- texture_cache.h: nx2's old-age eviction pass, then our Collect().
- kepler_compute.cpp: shared upscale slots, then Fortune's Weave's,
  then the Kirby Air Riders scan.
- nx2_gsv.h: ours, plus nx2's GetBufferMaxResolution and graphics
  device ids (1-based).
- nvhost_ctrl_gpu.cpp: engine support flag bits 40-44.
- lower_to_maxwell.h: ours as the base, with nx2's seven lowering
  commits applied one at a time. Second texture descriptor buffers
  are read bindless in TEX, TLD.SCR (level zero) and SUST; FSEL
  keeps its operand modifiers; TXD takes any channel mask.

lower_to_maxwell.h lowers 837 Fortune's Weave and 1183 Mario Kart
World shader dumps with the same rejects as nx2 and ours (12 and 0).

Assisted-by: Claude Sonnet 5.5 (conflict analysis and drafting)
</content>
</entry>
<entry>
<title>video_core: keep root tables and bind table 0 as constant bank 17</title>
<updated>2026-11-02T02:54:48+00:00</updated>
<author>
<name>Duck912</name>
<email>350528965+Duck912@users.noreply.github.com</email>
</author>
<published>2026-11-02T02:42:19+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=808feaf3bf34b3c108ff30baae1d2261f216f4f3'/>
<id>urn:sha1:808feaf3bf34b3c108ff30baae1d2261f216f4f3</id>
<content type='text'>
The 3D methods 0x504/0x508 write eight 256-byte root tables, which
shaders read as constant banks 24-31; NVN2 keeps push constants in table
0 (bank 17 after the Ampere lowering). Fire Emblem: Fortune's Weave
keeps its material constants there and never binds bank 17, and the
blit constants pass replaced those reads with render-target sizes,
flooding its 3D scenes red.

Maxwell3D now keeps the tables, the buffer cache streams table 0 as bank
17 when the game has not bound one, and the blit constants pass leaves
shaders that read bank 17 outside its parameter block alone.

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>video_core: draw deferred instances before the state after their loop</title>
<updated>2026-10-30T19:39:20+00:00</updated>
<author>
<name>Takoroka</name>
<email>137927095+Takoroka@users.noreply.github.com</email>
</author>
<published>2026-10-30T18:58:27+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=2ad0830d2f044bc536155ae666f4477ba6d1f65f'/>
<id>urn:sha1:2ad0830d2f044bc536155ae666f4477ba6d1f65f</id>
<content type='text'>
A draw of N instances arrives as Begin(First)/End and N-1 Begin(Subsequent)/
End pairs. The draw manager draws the first at once and the rest together at
DrawDeferred, which ran at the next Begin(First) or when the macro returned.
NVN's draw macros reset the base instance register and its copy in
c[0][0x644] right after the loop, before returning, so the deferred instances
were drawn with base instance 0 and read the first records of the instance
buffer instead of their own.

In Mario Kart World every tree mesh is drawn this way, from one shared
instance buffer: each mesh got other meshes' transforms, which showed as
low-detail, inflated or scattered trees.

Any write other than the loop's own methods (draw begin/end, vertex and
index counts, inline indices) now draws the waiting instances first.
</content>
</entry>
<entry>
<title>build: fixes for clang-cl</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:56:45+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=d327881c44ada520d6ea939af59bdd420906b99f'/>
<id>urn:sha1:d327881c44ada520d6ea939af59bdd420906b99f</id>
<content type='text'>
- (std::min)/(std::max) where windows.h's macros are visible
- LAMBDA_FORCEINLINE: always_inline under clang (clang-cl defines
  _MSC_VER but rejects [[msvc::forceinline]] on lambdas)
- ImageBase::FindView: find_if, as MSVC's STL takes its vectorized find
  for ImageViewInfo under clang-cl and fails a size assertion
- parentheses for -Wlogical-op-parentheses in the Ampere lowering
</content>
</entry>
<entry>
<title>video_core: GPU thread split on by default for Switch 2 titles; cheaper front paths</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:55:07+00:00</published>
<link rel='alternate' type='text/html' href='https://git.cirakg.xyz/eglantine-cirakg/commit/?id=15e953cafd5cb348833cb373d7ddd996b81307f7'/>
<id>urn:sha1:15e953cafd5cb348833cb373d7ddd996b81307f7</id>
<content type='text'>
Clean A/B in title 1 (3 rounds each): 1.46x the draws a second of one
thread, frames 17% shorter, no crashes, front register copies equal to
the back's in 57,089 checks. EDEN_NX2_SPLIT=0 runs everything on one
thread, =1 keeps macros on the back.

The front's per-write paths no longer check guarded statics
(GpuSplit::Get, Nx2Profile::Enabled, the skip-same switches) and the
ring's method writes are inline. Notes row 145.
</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>
</feed>
