aboutsummaryrefslogtreecommitdiff
path: root/NX2_NOTES.md
Commit message (Collapse)AuthorAgeFilesLines
* NX2_NOTES: task/mesh programs and their supportTakoroka2 days1-2/+2
|
* Analysis for the changenéo Luigi3 days1-0/+2
| | | | Assisted-by: Claude Opus 5.5 (drafting the notes)
* nx2: support mapping modify so NVN2 places compressible texturesTakoroka5 days1-1/+2
| | | | | | | | | | | | | NVN2 gives a texture in a compressible memory pool its GPU address only after NvRmGpuMappingModify switched the pool's mapping to the texture's kind. NvRm fails that call unless the GPU characteristics report NVGPU_GPU_FLAGS_SUPPORT_MAPPING_MODIFY, so such textures kept address 0 and draws into them went nowhere: title 1's cup-opening movie stayed on its first frame (also its 640x360 and 512x512 passes). Report the flag and answer the request nn::gpu::sdk then sends, gpu sub-session 212 (NormalModifyMemoryKind4K), with the wanted kind and a signalled job slot. The movie now plays on screen and the race follows.
* nx2: decode Switch 2 video (nn::codec::video) with FFmpegTakoroka5 days1-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The decoder service used to complete every submitted frame at once without decoding it. Each decoder service (gsv 902/906/1002 -> 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=<dir> 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).
* video_core: GPU thread split on by default for Switch 2 titles; cheaper ↵Takoroka5 days1-1/+2
| | | | | | | | | | | | | front paths 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.
* nx2: notes 142-144 (GPU thread split, scheduler race, front register copies)Takoroka5 days1-0/+4
|
* nx2: profile engine method calls and semaphore acquires; notes 140-141Takoroka5 days1-0/+3
| | | | | | | EDEN_NX2_GPU_PROFILE now times engine method calls (the work a split GPU thread's back half would run) and counts semaphore acquires and those that wait. Title 1: method calls ~343 ms a second (6.9 million), front-half work (command parsing, macros) ~333 ms, acquires ~2,700 a second of which ~220 wait. Notes 140 (macro compiler) and 141 (draw setup).
* nx2: notes 138-139 (async presentation retested, buffer collector on its own ↵Takoroka5 days1-0/+2
| | | | size)
* maxwell_3d: no method dispatch for non-executable register writes; notes 133-137Takoroka5 days1-1/+5
| | | | | | | | ProcessMethodCall and the draw manager behind it act only on executable methods, so CallMethod stops at the dirty flags for the rest (macro replays write ~2.4 million of those a second). No change beyond run-to-run noise in two profiled runs; it only removes work. Notes: row 133 corrected (those courses are bound by the GPU thread, not the host GPU: 20-40% busy), rows 135-137 (same-value writes, native compute registers, 2D blits).
* nx2: notes 131-134 (buffer downloads, inline upload lookups, VRAM-bound ↵Takoroka5 days1-0/+5
| | | | courses, deferred inline invalidation)
* nx2: notes 123-130 (fences, lock handoffs, translation cache crash, macro ↵Takoroka5 days1-0/+10
| | | | parameters, counter polling, worker wake-ups, memo compaction, measurement pitfalls)
* push for fix for mkwtheofficialhackclean5 days1-0/+10
|
* nx2: notes 120-122 (cache lock contention, shader translation, final ↵Takoroka6 days1-0/+3
| | | | measurements)
* nx2: notes 117-119 (macro memo, async presentation crashes, tester log findings)Takoroka6 days1-0/+3
|
* nx2: present stats report the worst frame and frames over 100 ms; notes 110-116Takoroka6 days1-0/+10
| | | | | | | | | | The per-600-present log only had the average frame time, which hides shader-compile hitches; it now also gives the longest frame and how many took over 100 ms. Notes: today's profile of title 1 and what came of it (TSC on AMD, rejected-shader rethrows, debug hooks, texture churn from VMA slack, reactive flushing, macro interpreter).
* Notes: rows 105-109 (video sessions, interpreter, GPU ASTC transcode, ↵Takoroka6 days1-1/+5
| | | | present serialization, job-system SVCs)
* Texture cache: stop the churn, the per-frame image leak and garbage texturesTakoroka6 days1-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | - Unmapped GPU addresses get a stand-in CPU address fixed by the GPU address. A fresh one per lookup meant FindImage never found an image there again: title 1's bloom chain at 0xf0000-0x15b600 was re-created on every use (~5,400 images per 600 frames), filling VRAM. - ASTC whose blocks carry no alpha (exact endpoint-mode scan reusing the decoder's block parsing) is re-compressed to BC1 instead of BC3, half the size; about 70% of title 1's ASTC qualifies. Copies between BC1 and BC3 hosts are skipped (their guest data is uploaded instead). EDEN_NX2_ASTC_BC1=0 turns it off. - Deleting an image cancels every decode still queued for it. An image re-decoded mid-decode has two; the first to finish cleared IsDecoding, the second was not cancelled and was uploaded into the next image to take the slot: garbage textures (the title logo, road patches) and a staging overrun when that image was smaller. - Diagnostics: images created and deleted per 600 frames by shape, collector deletions, async decodes, BC1/BC3 split; collector thresholds overridable (EDEN_NX2_TC_EXPECTED_MIB/CRITICAL_MIB); GPU ASTC decode wait timing (EDEN_NX2_ASTC_FLUSH=1 submits without it). Title 1 attract loop: device memory 4.8-5.1 GB instead of 5.9-6.1 GB, no decoded textures evicted, ~17 -> 22-23 fps.
* Notes: row 102 resolved (async decode use-after-free)Takoroka6 days1-1/+1
|
* Notes: rows 99-102 (VRAM/BC3, transcode pool, Medal layer, host crash)Takoroka6 days1-0/+4
|
* Notes: title 1 rows 92-98 (colour cast, terrain, sin/cos, movie abort, ↵Takoroka6 days1-1/+7
| | | | pop-in, frame rate)
* IMAD.SHL as a shift; EDEN_NX2_REJECT; log where rejected programs are boundTakoroka6 days1-3/+12
| | | | | | | | | | - IMAD by a power of two lowers to SHL imm, the form Eden's jump-table tracking expects (a title 1 compute program failed "track indirect branch"). - EDEN_NX2_REJECT=<hex addresses>: treat those native programs as rejected, to bisect a behaviour change without rebuilding. - A rejected graphics program logs its stage slot, header and slot registers once (for the task/mesh pipeline setup). - Notes: rows 87-92, title 1 status.
* nx2: notes on title 1 reaching its title screenTakoroka6 days1-0/+3
|
* nx2: notes on title 1's vsync hang and what it hits nextTakoroka6 days1-0/+2
|
* nx2: notes on the GPU-only memory fix and title 1's hangTakoroka6 days1-0/+2
|
* nx2: notes on the 100 MiB ColPaintBuild failure behind the recurring crashTakoroka6 days1-0/+1
|
* nx2: notes on the six-core debugger runTakoroka6 days1-0/+1
|
* nx2: notes on which heap the scene's GPU pools come fromTakoroka6 days1-0/+1
|
* nx2: notes on the scene heap running out at the recurring crashTakoroka6 days1-0/+1
|
* nx2: notes on the recurring worker-thread crash; gdbrsp waits without a timeoutTakoroka6 days1-0/+3
|
* nx2: notes for the semaphore, pacing and open-file fixesTakoroka7 days1-0/+3
|
* nx2: notes for the freed-memory crash and the ASTC UI fixTakoroka7 days1-0/+2
|
* nx2: notes for the intro cutscene milestone and the next blockersTakoroka7 days1-10/+22
|
* Switch 2: title 4 menu text renders uprightTakoroka7 days1-45/+37
| | | | | | | | | | | - Present flips the image vertically: title 4 renders with a lower-left origin (negative viewport scale), so its frames are stored bottom-up. - Lowering: TEX/TEXS FP16 results (bit 79, packed half pairs) - the glyph shaders unpack them with HADD2.F32; LDG.E with a register address; SHF.R.U32 low word with a zero high word. - Debug aids: EDEN_NX2_TRACE_PS / EDEN_NX2_WINDOW_TRACE_SKIP for the window trace, EDEN_NX2_TEXTURE_DUMP, EDEN_NX2_TRACE_DST for copies; RT trace keyed by shader pair. NX2_NOTES: blockers 53-57, next steps.
* NX2_NOTES: keep the blocker table in orderTakoroka7 days1-1/+1
|
* Switch 2 (title 1): syncpt handshake, gpu user/gsv partitionsTakoroka7 days1-4/+7
| | | | | | | Newer SDKs open the syncpt session with TIPC 0(u64) and need it echoed, and query the GPU address space partitions with gpu 201/202 instead of 203. With these and the larger memory budget, title 1 reaches its main loop and the same empty-command-buffer stop as title 4.
* Switch 2 GPU memory handles and mappings at requested addressesTakoroka7 days1-5/+12
| | | | | | | | | nx2:gpu 101 (CreateGpuAccessibleMemory) returns real GpuMemoryHandles; 211 (NormalMapGpuMemory4K) maps handle+offset at the requested GPU address, including sparse regions, through Nx2GpuMemoryRegistry::MapAt (SMMU ranges are reused). 102/213/214 complete through their job-slot events. gdbrsp.py waits for a real thread before driving the stub and gains a write-watch op. Notes record the current stop: an NVN command buffer with no command memory.
* NX2_NOTES: title 4 reaches its main loop; blockers 26-41, next stepsTakoroka7 days1-56/+55
|
* NX2_NOTES: graphics boot through vi2 and NVN device initTakoroka7 days1-9/+27
|
* NX2_NOTES: classification of all titles, graphics boot progressTakoroka7 days1-40/+79
|
* Add NX2_NOTES.md and Switch 2 analysis helpersTakoroka7 days1-0/+99
npdm_info.py dumps META/ACI0 and kernel caps; nso_dis.py disassembles part of an NSO with clang + llvm-objdump.