diff options
| author | néo Luigi <85024393+neoluigi4123@users.noreply.github.com> | 2026-10-31 20:12:20 +0100 |
|---|---|---|
| committer | kraibse <33869366+kraibse@users.noreply.github.com> | 2026-10-31 20:49:14 +0100 |
| commit | 9dca3ab2e436e786ab53e862e4d515f620a11669 (patch) | |
| tree | 62f28d7acc72e6c853c785450c6d78af10414ca2 /NX2_NOTES.md | |
| parent | 41a81ab5e3d88b53b634ed765385874728634e9f (diff) | |
Analysis for the change
Assisted-by: Claude Opus 5.5 (drafting the notes)
Diffstat (limited to 'NX2_NOTES.md')
| -rw-r--r-- | NX2_NOTES.md | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/NX2_NOTES.md b/NX2_NOTES.md index 8da5873a5c..08ce0123a1 100644 --- a/NX2_NOTES.md +++ b/NX2_NOTES.md @@ -211,6 +211,7 @@ With the patched decoder, games 1/3/4 only leave ~60-110 rare SIMD encodings in | 147 | title 1: Grand Prix cup-opening screen stays black, decoder registered but never started; then an abort with 2111-3604 (0x1c286f) when it did start | `nn::syncpt::sdk::CancelSyncPointEvent` sends 202 and always waits on the slot's event; we signalled it only for pending requests. Then the movie player reused slot 0, which NVN's fence waits had left signalled, read it as a decoded frame and found none | 202 always signals, 201 clears the slot's event first (b09629f) | | 148 | title 1/4 movies have no picture | the video decoder service (nn::codec::video, gsv 902/906/1002 -> vdec -> vdecsvc) completed frames without decoding | FFmpeg decodes on a thread per decoder service (`video_core/host1x/nx2_video_decoder`): 101 names the codec ("video/vp9") in an A buffer, 109 submits frames (A buffer, pts us). 311/314 reply NativeSyncHandles {~syncpoint, 0, value} on a syncpoint the service allocates, incremented per decoded frame, frames filling images in register/release order. gsv 911 creates the pool's images, 961 returns the CpuUserImageDescriptor that `ReadDecoderOutputImage*` copy out with (pitch-linear NV12/RGBA/BGRA, kinds 10/8/9). Title 1's Mushroom Cup opening (2560x1440 VP9, 1423 frames) decodes in real time and the game goes on to the race. The picture still stayed on the first frame: see 149. `EDEN_NX2_VDEC_DUMP=<dir>` saves decoded frames | | 149 | title 1: the cup-opening movie's picture stays on its first frame although every frame decodes and reaches GPU memory | not the texture cache: the movie is drawn into a 2560x1440 render target whose NVN2 texture has GPU address 0 (also the 640x360 and 512x512 passes), so the draws go nowhere. NVN2's texture init (sdk+0x5ca240) places a texture in a compressible pool (flags 0x080000a1) only after `NvRmGpuMappingModify` switched the pool's mapping (0x815f0d0000, a gpu 214 region) to the texture's kind; NvRm fails that call with 2 unless the characteristics flags have NVGPU_GPU_FLAGS_SUPPORT_MAPPING_MODIFY (bit 34; ours were 0x4400155), and the texture keeps address 0 | report bit 34; the modify then runs through nn::gpu::sdk's VirtualMachine as gpu sub 212 (NormalModifyMemoryKind4K: words 3-6 range, 7 wanted kind, 8 fallback, 10 job slot; reply word 3 the kind applied), answered with the wanted kind and the slot signalled. The movie plays on screen | +| 150 | title 1: animated colliders stay at their default pose while the meshes animate (Dino Dino Jungle's dino and the rail on it, DK Spaceport's robot legs on the last lap, Bowser's Castle Thwomps once down) | the guest CPU reads compute shader output back from GPU-written buffers, and nothing copied it to guest memory: no downloads at fences for Switch 2 titles (row 131), reactive flushing off (row 115; its read protection of every cached page stuttered), and RasterizerVulkan::GetFlushArea never asked the buffer cache (dropped upstream in 8203f2d8e1, when every GPU-written buffer was downloaded at fences), so even a trapped read found nothing to flush. A range read once is marked Preflushable and its later reads skip the flush | read traps (8b4c42c): a GPU write that is not downloaded at fences takes read permission off its pages once (fastmem only; not under NCE or with reactive flushing). The guest's first read takes the slow path and gives the page its read permission back; with no downloads at fences GetFlushArea asks the buffer cache, which flushes the range and marks it Preflushable, and Preflushable ranges are downloaded at every fence again. Diagnostic run: ~3,800 pages armed, ~3,500 trapped reads. The dino's rail follows it (2 of 2 tries); the robot and the Thwomps not retested, frame times not measured. `EDEN_NX2_READ_TRAPS=0` turns the traps off | Run settings used (in `build/bin/user/config/sdl2-config.ini`): `memory_layout_mode=4` (12 GB). Debug knobs: `EDEN_NX2_TC_EXPECTED_MIB` / `EDEN_NX2_TC_CRITICAL_MIB` (collector thresholds), @@ -226,6 +227,7 @@ faulting stack as module+offset, then a minidump), `EDEN_NX2_AUTO_STUB`, `EDEN_N `EDEN_NX2_SKIP_SAME=0` (row 135), `EDEN_NX2_MME_JIT=0` (row 140), `EDEN_NX2_SPLIT=0/1` (default 2), `EDEN_NX2_SPLIT_VERIFY=1`, `EDEN_NX2_SPLIT_CHECK=1`, `EDEN_NX2_SPLIT_SKIP=0` (rows 142-145), +`EDEN_NX2_READ_TRAPS=0` (row 150), `EDEN_NX2_FRAME_CAPTURE=<dir>` (every 120th presented frame as TGA), `EDEN_NX2_PB_CHECK` (pushbuffer entries changed between submit and execution), `EDEN_NX2_QUERY_TRACE` (every GPU report/semaphore write). `C:\dev\crashrun.sh` runs eden-cli under cdb and prints the crash stack; |
