Skip to content

Switch: turn off the deko3d bring-up diagnostics - #18

Merged
dorPXP merged 1 commit into
dorPXP:android-portfrom
TomasUribe:switch-deko3d-diag-off
Nov 4, 2026
Merged

dorPXP merged 1 commit into
dorPXP:android-portfrom
TomasUribe:switch-deko3d-diag-off

Conversation

@TomasUribe

Copy link
Copy Markdown
Contributor

On Switch the game freezes briefly every few seconds, even when it is otherwise holding 60 fps and no shaders are compiling.

The cause is kDeko3dDiag, which is still true in the Dawn Switch patch (it is marked "TEMP bring-up"). With it on, every 300 frames SwapChain::PresentImpl sets mDebugDumpFrame. That frame, DebugDumpImage runs for every render pass and for the swapchain image: it waits for the GPU queue to go idle, copies the image back, walks every pixel on the CPU from uncached memory, and writes a line to stderr.txt. On top of that, ReportMemory("periodic") writes a memory report. stderr is unbuffered on the SD card, so all of this runs synchronously on the render path.

This PR changes kDeko3dDiag to false. DebugDumpImage and ReportMemory are still there for anyone bringing up the backend again.

Tested on my Switch (Atmosphère, firmware 23.0.1) with a build from source of android-port at f15608e, playing original MKW and Retro Rewind 6.13.4. Before: about 3,000 [deko3d-frame] / [deko3d-mem] lines in stderr.txt in one session, and the regular freezes. After: neither.

🤖 Generated with Claude Code

…every 300 frames)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@dorPXP

dorPXP commented Nov 3, 2026

Copy link
Copy Markdown
Owner

Thanks for the pull request! My local Dawn already had that flag off, so the patch file in the repo was just out of date, my bad lol, and this issue would also happen to anyone building Dawn from the patch. I'm going to try the rest of these on my Switch.

@dorPXP
dorPXP merged commit ce83b2c into dorPXP:android-port Nov 4, 2026
@dorPXP

dorPXP commented Nov 4, 2026

Copy link
Copy Markdown
Owner

Merged, thank you! As I said, the flag was already off in my local Dawn, so the patch file in the repo was just out of date thx!!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants