Skip to content

fix(render): preserve framebuffers during blur allocation - #34

Merged
johnneerdael merged 3 commits into
mainfrom
bug/midgit-framebuffer
Oct 4, 2026
Merged

johnneerdael merged 3 commits into
mainfrom
bug/midgit-framebuffer

Conversation

@johnneerdael

@johnneerdael johnneerdael commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Summary

Fix the full-render framebuffer failure retained in PR 30 for the unchanged midgitstraights of majillaen - featy sweet.milk. Blur allocation unbinds both framebuffer targets; saving caller bindings afterwards sent later waveform/border draws to framebuffer zero. Capture the bindings before allocation and restore them after blur.

Changes

  • Add ProjectM TV-specific patch 0041, with no preset, shader, Java/JNI API or release-version changes.
  • Add real-GL regressions for distinct read/draw targets, first allocation, unchanged size, resize, scaled blur, constant-colour blur readback and four full midgit frames including a resize.
  • Preserve PR 30's historical JSON and add source/preset/asset hashes plus uninstrumented before/after results.

Release notes

  • Presets whose warp shaders use blur, including midgitstraights of majillaen - featy sweet.milk, now keep waveform and border drawing in the preset's render target when blur textures first allocate or resize. This corrects the framebuffer failure reproduced during full rendering on host OpenGL.

Internal

  • Add framebuffer ownership and full-preset rendering regressions, with source-bound evidence that distinguishes shader compilation from successful rendering.

projectM patches

  • Engine change is patch 0041 only; no submodule source/gitlink is committed.
  • Patch applies to pinned projectM plus 0001–0040; header documents the app-specific cause.
  • Fresh initialized task worktree :core:assembleDebug and debug APK build pass for ARMv7/ARM64.
  • Full native runner passes; macOS GLES transition overlay is skipped without EGL/GLES development files. Linux CI covers GLES.
  • Awake AM6/Mali-G52: separate actual-core workers, same generated PCM, 1280×720, 480 frames per core and first-frame captures. Native binding controls reproduce baseline target loss and pass with the fix. Complete loop rates include pacing/PNG overhead (24.22 baseline, 24.03 fixed frames/s); no on-screen app FPS or performance-gain claim.
  • Shader source is unchanged; GLSL translation/link checks are exercised by the existing native controls.

Validation

  • Both new tests fail on the unchanged 40-patch engine (caller bindings zero, preset frame 0 error 1286) and pass with 0041.
  • All 15 ASan/UBSan native CTest groups pass; complete native runner and both JNI rendering-policy controls pass.
  • Patched upstream GTest suite: 243/243 pass.
  • tools/check-patch-series.sh: all 41 patches apply.
  • ./gradlew :core:assembleDebug testDebugUnitTest :app:assembleDebug --no-daemon: pass.
  • ./gradlew assembleRelease testReleaseUnitTest --no-daemon: pass.
  • Preset index/content checks, full git diff --check origin/main...HEAD, and MkDocs strict build: pass.
  • Exact bundled-image diagnostic: both EoS controls stay error-free; midgit changes from GL error 1286 to zero. Existing SOIL2 JPEG UBSan warnings remain documented separately.

Evidence

Diagnosis, reproduction and before/after manifests. Temporary instrumentation finds the first failure at waveform/border drawing after blur restores framebuffer zero; the uninstrumented diagnostic establishes the actual 1286 → 0 result. The automated full-preset control uses isolated known-value TGA images; bundled-image observations use production randomness. AM6 evidence includes before/after captures, 480 per-frame GL checks per core and source/AAR/APK/library identities. The valid default EGL pbuffer hides error 1286 on Mali; direct ownership controls still reproduce baseline read/draw bindings zero and prove the fix. The worker apps and native-control files were removed, preset override restored, and the existing player/settings left untouched.

Documentation assessment

Evaluated README, all user-guide/Pages source topics and MkDocs publishing configuration, architecture, third-party attribution, release/profiling/diagnostics guides, PR template, contributor guidance and the other Markdown inventory. Updated README, user-guide development, architecture, third-party patch list, AGENTS and focused evidence. Troubleshooting guidance on random appearance, settings/setup/controls, installation and release process remains accurate; no new user setting or workaround is introduced. Historical PR 30 JSON remains unchanged and its README links the follow-up diagnosis.

Not tested / known limitations

  • Host and one AM6 GPU are covered; the locally built core AARs are not published binaries. Real clock and production random images prevent treating screenshots as a controlled fidelity comparison. Full numerical/appearance equivalence to MilkDrop remains unverified.
  • No frame-rate improvement is claimed. Production random image selection is unchanged, so independent full-preset loads can select different images.
  • The bundled JPEG decoder's pre-existing UBSan warnings are outside this framebuffer fix; isolated TGA controls are sanitizer-clean.
  • Codex completed review of final head 7f56352f0337798cd50d774f804b8690c0c242d1 with no new findings. Its earlier whitespace/validation-record finding is corrected and resolved. Full 41-patch application and complete branch diff check pass. All final-head CI checks pass, including both Android branch/PR runs, Native engine tests, both core-policy AAR/APK builds, user-guide build, release-note validation and Preset Lab.

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 4, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-04T22:46:53.194030Z 7f56352 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 3a04e7294c

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@johnneerdael

Copy link
Copy Markdown
Owner Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Nice work!

Reviewed commit: 7f56352f03

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@johnneerdael
johnneerdael merged commit 6e71ac2 into main Oct 4, 2026
15 checks passed
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