Files
nxnative-easy/dm/games/010038B015560000/cb_extent.tsv
T
seedds 626e6a6188 Luigi's Mansion 3 plays on the Mac at 60 fps: profile 0100DCA0064A6000 (update 1.4.0, SDK 7.3.2)
- Files and shaders: Next Level Games' engine keeps every RomFS file but the Wwise banks in archives of its own, <name>.dict indexing zlib chunks in <name>.data; update 1.4.0 ships <name>.patch beside the unchanged base files, a variant bitmask and per-section records that rebuild each section from base and patch bytes (the game's algorithm, main+0x1c8d0 / 0x1cbd0). shader_split.py nlg_shaders reads both: 5,317 shaders (5,149 in the base game), all in init, control sections back to back in one section and their code areas in the same order in another, one NVN program per stage (SINGLE_STAGE '#NLG'); 46 of the first 103 the title uses exist only in the update (docs/agents 01)
- Shader chain, for every game: a texture array over the driver table c2 (Ryujinx's texture array from a buffer, fp_t2das_cb2_0: 586 shadow-cascade pixel shaders indexed by (0x80 + cascade offset) / 8) is named tex_c2a / samp_c2a with its c2 offset (dmsh_build.py c2_array), and the replay fills element k from the slot whose c2 word lies at that offset + 8k (nvn_refl NVN_RB_TEXA / NVN_RB_SAMPA, nvn_mtl.m c2_handle). A pixel shader that writes an output from integer bits, or nothing but constants, gets a second entry point main0_u whose colour outputs are the unsigned vectors of the same bits (dmsh_build.py fs_uint); a pipeline whose written colour attachments are all unsigned integer formats takes it (pso_all_uint). The G-buffer is R32Uint + RGBA8Uint: about 1,400 pipelines failed to build and every scene draw was skipped. Every other profile's dmsh_chain.h rewritten with its c1_full / cb_extent lists carried over (the change touches no c1 or uniform read); Luigi's Mansion 3 built for Mac and iOS
- Host, for every game: the game patches texture handles into its recorded command buffers in place, at the command start + 0x10 it took from GetCommandMemoryUsed before nvnCommandBufferBindTexture (main+0x7c8964; the store at main+0xb7d0d4), so a single texture bind is recorded in the hardware's layout, {stage, slot, handle at +0x10, texture / sampler pool bases} (OP_BIND_TEX1, nvn_obj.h bind_rec decodes it at every replay site); the host's own layout put the patched handle over the bind count, the post passes read stale handles (a stretched icon over the title, a white screen in a new game) and a corrupted record now gets a red line. t_nvn: the handle patched at the command start + 0x10 is the one replayed (102 checks)
- Host, for every game: a depth texture drawn through a colour view of the same pixel size (a D16 1024x1024 texture through an R16 view; Metal has no colour view of a depth texture, and the boot aborted in pipeline validation) draws into a colour shadow, copied in before and back after the pass as a compressed target is (nvn_mtl.m shrt_block, D16 and D32F); nvnCommandBufferSetDebugLabel; nvnBlendStateSetAdvancedMode (red line for a mode other than none); a draw whose program has a geometry shader with no library gets a red line naming it (it is drawn without that stage, with the vertex shader's positions as clip coordinates)
- Frame rate: 60 fps (30 on the Switch). The frame limiter (main+0x7a3e70, a frame callback called with the milliseconds since the frame began, main+0xb7c308) runs jobs or sleeps until 33.333 ms have passed, a float in read-only data (main+0x13c94dc), and the game steps by the time that really passed: the same 2 s walk and 1.5 s turn from the same save end at the same spot at 30 and 60 fps, and the title's animation matches at time scale 1.00 (DM_NVN_REGLUM). hle_fpslock.c gets rows with no pointer (the field at main + offset; the loader leaves read-only data writable, the image's data block on iOS too) and a frame-time kind: 1000 / fps_target, at 60 less 0.5 ms, since the work after the limiter made an exact 16.667 ms 59.6 fps with a frame shown twice every 2.5 s; slightly shorter, the presents set the pace (lobby 60.0 fps, display interval p99 18.69 → 16.67 ms). Profile fps_target 60 with present_interval display (the game also asks for interval 2); DM_FPS_TARGET=30 keeps the game's 33.333 ms
- Not done: the tessellation stages (15 hull, 18 domain shaders: two programs draw twice a frame for about 30 frames, in the title scene behind the file select as it slides out before a new game; skipped, since Metal 4 has no tessellation stage) and 10 geometry shaders (none drawn from the title to the lobby). Vertex shaders that feed them can be found from the shader headers (docs/agents 04)
- Mac: the boot notices, the title, a new game, the opening cutscene (the bus ride, the arrival at the hotel) and the lobby in play at 60 fps, about 3.7 GB phys_footprint (3.0 GB of Metal allocations); red lines at run time: the geometry shader that does not build, the conditional render the host draws anyway, primitive restart 0xff (no 8-bit strip seen). Diagnostics: DM_NVN_TREG_ID=n logs that texture ID's registrations; the pass dump prints the handles of texture binds
2026-10-23 08:38:28 +08:00

6.1 KiB

1# chain b-7a29586ca75d 2026-10-23T08:37:08+08:00 (list carried over from b-acdadd26e140: that chain change did not touch any uniform read)
2# shader key, then reg:bytes for each uniform slot whose reads stay inside its first bytes, and s<reg> for each storage slot it never writes (cb_extent.py)
301058b659b6994950:288
40117c03be720951e0:560
50133d39b2a9efec20:32
6031b1ff370e89f510:64 1:16 s0
703a1e963e8191e410:32
805213742e8ead93e0:560
9057ee19a59a661130:32
100591c9095636c05d0:288
11070decaaaf62cd8b0:32 s0
12072559eda38ae7340:560
1307f0ab6bf17e77fb0:48
1409a0eadf0488e44c0:288
1509ce38993abc92330:368 1:160 2:64
1609f3bbc5710398f10:32
170a1ef1c183f367fb0:48
180aa4e1011df021880:48
190ac518e3bc7a82eb0:288
200da62c0c80eb998c0:32
210fd848ead573894b0:560
22111981c61cb5c78f0:32
2313bd7b2080e5f9d60:64 1:16 s0
2416d306c06849d7e60:96
2518388b467309d3b70:32
26185da7910baeb7d40:288
2719ad9851f03d93ce0:48
281a3f35c19ac29dc30:288
291a6a1b780195f27d0:192
301b73fddde94d5df80:560
311d292ae6f84e4cc00:128
321dfb53d5f274b85c0:480
331e198cb587f995030:288
342041e5e59b6d2eb10:64 1:16 s0
3520f01ecf5f31d5dc0:64
3621bf063eba5755290:288
3723249e2faf126a7e0:128
3823739d034d5c796a0:128
3923b7176e592bdac00:32
4023c0dbe22320e2290:560
412453b0d8b80b53400:80
42265dbb8df2bf1a8b0:560
43268f4b977eda02dc0:560
442723930b866babb60:560
4527af9a584ebebf8cs0
46282f00405ca6dd6c0:288
47284efb67a22fbd320:32
48288369fb039cab100:288
492afa1ac80325b4770:48
502d40d456871035820:32
512e6685ec104954f50:48
522e9f872925257d940:64 1:16 s0
532f74641c9669d44f0:288
542f7ed1981467990f0:560
55308bb37f515668ae0:608
5631720cc105b725d70:288
573474ad6cf588213b0:48
583536958ae15db2fe0:32
59356a40f9d08084360:48
603609f14348e84be30:112 s0
61362f7ec20fa1386f0:592
623737b7d760b855620:112
633ad067b2b3854f790:560
643b6ebb98ff8c92a60:48
653fbae5ca0cc34c2f0:288
66401248c0434385410:288
674411b6ef0215882b0:32
684452f821037645600:32
694678e71e000801470:48
704734f1ed7045e2830:32
71478fc41e1d0fbd4es1 s2
7247f4ce480dc219350:32
73480be56d048ea6690:288
744a194d863705b2fe0:288
754ae7b941546a67820:208
764b7770bb17d7607a0:96
774bcd19a1b9164bba0:560
784cb5f3e68043e0050:48
794cf1975ed1e365900:560
804f678e9502d75e570:288
814f7cd32a56ac7a530:48
8250042ed919ff90cd0:32
835149c2e208fa10110:16
8451ce1a7301465f530:32
855340787afce2765b0:176
86557875c26e8c24960:176
875652c69655843b530:64
885862861d9d40907f0:176
895a4a8f6239a97be90:80
905a6e1d6996960b4c0:560
915bb928221195119e0:560
925cbafd670b194b90s0
935dded5168456ce600:208 1:16
945ec4510f78525ceb0:32
955ee19b83510bc04f0:96
965fa003b28d9c00d00:32
975fbd8cf6b27e050f0:64 1:16 s0
98601643bffcdb5a370:208
996039379be8426fde0:80
10060692ebf4efbffcb0:32
10161752a56630e6fd60:32
10262bf4649409453d90:112 s0
10363d7bfd6ca1653ce0:288
10465331227ec3a83600:560
1056637a0bfc5ef211a0:48
106665ac0e3cc9fe4700:128
10766b6ea4e74b4dc520:288
10866f8e4fa94e8f89a0:560
10967cc9830f956bbc30:560
11068a258accf349b390:560
11169827ec0f305953e0:32
1126995f099d96dc3a70:288
1136a077494d0e583300:32
1146a6366519b101ac90:48
1156acb2d1e172f0cb90:560
1166fbece58488e0e270:288
1176fd1d953d4529da00:16 s1 s2
1186ffba7a4dab226cd0:64
1197274352a84f844b00:48
1207511af7447f7bd940:288
12176156b8aa7bbe1d40:560
12276c636ff880863ce0:288
123778d2908858fc3980:64 1:16 s0
1247b34b81a83f8abef0:32
1257ebb51692b288cae0:64 1:16 s0
1268047d70d37b551740:48
127808cffffab9e8a3b0:288
12880cfb4e86ffa930c0:48
129812174c1c36976500:32
13081d765a2fc8d39b10:560
1318280bf758a08518c0:288
13282a10dfc4ef08eeb0:608
13382a8fe29d92e1caa0:32
13482eb684108d83b8c0:32
1358357098601df333b0:560
13684532a2d63f8b4fb0:48
13784e2cbfab4bc834c0:560
13885e70c1a250175530:288
139861e2fbe75bf7a740:128
140878dd10a03ce1e380:48
14187e38782e01afdef0:64 1:16 s0
142885b189f6f6f796c0:64
14388603eea5cf487a70:256
1448874eaaf8ee03c3ds0
145887678d905fb024a0:176
146888b0814ed0415390:32
1478cbd24523483a69a0:32
1488e3d627e3b02f58c0:176
1498ea332c219e0034e0:288
1508f10594e80a975450:32
1518f284dab5da070ae0:96
1529178c4f16b6562620:48
153921ec588adf16bf50:288
1549443ad0b3eb15db90:560
15594bb42731303c68f0:560
15695fc3af746339c6f0:48
157968a2e728b1e1a570:288
1589801464503284c220:32
15998311dfc9b8d835f0:560
1609875b4fa1e6347a40:16
161990715f85c5588b50:32
1629911e61ba25287770:64 1:16 s0
16399b6d5c333efad280:288
1649b353afc0d405fb70:96
1659c3525f675d2efe20:64
1669c49f924977d2a9b0:32
1679d80ee6f7f1b7b130:288
1689f0db263312af27c0:112
1699f3834c1ef6413c90:48
1709f6a89394cd6a7750:32
171a169b5f06bef386f0:32
172a1a9841a4b30478c0:560
173a1ce25ed5c3b51e40:64
174a2a358fb294e66f00:48
175a4009b5b3f66525d0:48
176a4efa439dc176e0b0:288
177a798b6d68138f2760:288
178a829f651f61f39ef0:560
179a8934fc2e1e315460:32
180a8ca75813f04c4a90:48
181a9c9b41434a3a4bf0:32
182aa1d297463f5ae330:64
183aad5cfbce1ac4cb70:128
184ab2957f1ff1137760:32
185abf3c7e768c409150:288
186ade69504bd5b9ac20:48
187aed650a201ca799b0:288
188af3dfe72c72a49b60:32
189b15cb02430cf3b2e0:560
190b250a33bba1c259c0:32
191b276248195a7379d0:32
192b5ce4a67bc9349f50:32
193b630785d73b470e10:560
194b7b0065ac4ab5ce40:48
195bbce018e1e2fe67c0:288
196bc5db844768321550:560
197beb7d19c07e7880c0:80 s1 s2
198bfd4bde9480c37491:32
199c039e659211a46130:288
200c0ef9464e5f359b50:560
201c1203c6c01fd4a1d0:288
202c15fb6f44e06307cs0
203c41f8d3c4e80832b0:32
204c569cb78cb8caaf80:32
205c5aa1db5539f72170:96
206c7e903371f7396170:64
207c98e5ee6dc34955a0:96
208ca361dd88162c1260:32
209cbfd7ac884b694a40:288
210cc8b63a076a1c0d40:48
211ccde29ec21518a860:80
212cd78bd2b35fab9b40:560
213cdbd096864ddd9d10:288
214cf55e2d589e5ae390:288
215d1369a61a3961e700:288
216d1f35f104ae3414f0:192 1:64
217d2e0baecf6b3978f0:32
218d3b6d7e6c3db3b400:288
219d4b42189ef973b8f0:288
220d657d099544cf2da0:80
221d6b7fe62a6200fbe0:288
222d7e184869727d5040:32
223d9025d1e126365c50:48
224da6c26533f51f8dc0:288
225dadca1e7bfe8a6ed0:560
226dbe894a8d70db5210:16
227ddffcb3ac49b6b190:64 1:16 s0
228de07ed2e8850af500:288
229de1bfca6602d1d000:96
230e167ba83f9ee19e80:128
231e1e33a23461e177c0:288
232e366d2b9678258f70:560
233e59153d1008a6e2f0:480
234e5f55a91cc4f95190:32
235e71d2f7a9dea62180:80 1:16
236e75555580aadf5060:80
237e7d94456f9484be00:288
238e803253de067dc600:176
239ec88c8ec9631f8ae0:288
240ecab1d82b670f3180:32
241ed628e276b7b08b90:32
242ee1e30e594fdfe6b0:288
243f1ce005ed45260b30:16
244f237c1a0b89cfcd10:288
245f26c3a8c245c6c430:288
246f2e02549b00c482b0:32 s0
247f315d62b1550d3ce0:560
248f347e5fc1d7328b20:48
249f34a3cd42786e03e0:48
250f3dccbbc338630460:560
251f94dd3b70a753d800:288
252fa2cb62f515bbabc0:48
253fa7cfe8eadd4db660:64
254faa30923b876af1f0:32
255fb0ed7191a4d0d0d0:288
256fb89079f24fb863c0:48
257fd18db9a4fd424970:16
258fd9eabda38f8d1e80:560
259fe722d3fd0c61c570:560
260ff4da0436bed52f70:560
261ff56febd9d6b6abd0:288
262ff7cbe1b9f45144e0:48
263ffcd8ae8862b0ebf0:48