Skip to content

Fix macOS fixed-mode ghost-frame from stale back-buffer content - #1148

Merged
aHooder merged 3 commits into
117HD:masterfrom
nathan-scheele:fix/macos-fixed-mode-ghost-frame
Jul 29, 2026
Merged

Fix macOS fixed-mode ghost-frame from stale back-buffer content#1148
aHooder merged 3 commits into
117HD:masterfrom
nathan-scheele:fix/macos-fixed-mode-ghost-frame

Conversation

@nathan-scheele

Copy link
Copy Markdown
Contributor

Summary

On macOS in fixed display mode, stale back-buffer content leaks into screen regions outside the 3D scene viewport (full diagnosis in #1124). The scene blit only covers sceneViewport, and drawUi() preserves destination RGB wherever the UI texture is transparent — so any region neither pass covers shows whatever was left in the back buffer. On macOS, rlawt's IOSurface pool recycles back buffers without clearing them, which is how a several-frames-old frame can reappear in the fixed-mode margins.

This hoists the clear that previously only ran on the no-scene path to the top of the composite path in ZoneRenderer.draw(), so the default framebuffer always starts from black before the scene blit and UI draw.

Verified via A/B toggling on a dev client on macOS (bundled rlawt unchanged): with the clear, the ghost frame no longer appears when toggling 117HD or Stretched Mode in fixed mode.

Fixes #1124

🤖 Generated with Claude Code

The scene blit only covers the scene viewport, and drawUi() preserves
destination RGB wherever the UI texture is transparent. On macOS, rlawt
recycles IOSurface back buffers without clearing them, so stale frame
content could show through regions neither pass covers, e.g. the margins
around the 3D viewport in fixed display mode. Clear the default
framebuffer at the top of the composite path so every region starts
from black. Fixes 117HD#1124.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@RuffledPlume

Copy link
Copy Markdown
Contributor

Could you try if this PR fixes this #1123

@aHooder
aHooder merged commit 12b5a4f into 117HD:master Jul 29, 2026
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.

macOS, fixed mode: ghost-frame artifact from stale back-buffer content outside the scene viewport

3 participants