Skip to content

rend: optimize ARM64 framebuffer paths - #2452

Merged
flyinghead merged 1 commit into
flyinghead:devfrom
rtomasa:pr/arm64-framebuffer
Sep 6, 2026
Merged

rend: optimize ARM64 framebuffer paths#2452
flyinghead merged 1 commit into
flyinghead:devfrom
rtomasa:pr/arm64-framebuffer

Conversation

@rtomasa

@rtomasa rtomasa commented Aug 27, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add ARM64 NEON paths for framebuffer conversion and VRAM writes.
  • Preserve scalar fallbacks for unsupported or unaligned regions.
  • Validate the physical VRAM allocation before vector reads, preventing out-of-bounds access with both 8 MB and 16 MB VRAM configurations.

@flyinghead

flyinghead commented Sep 3, 2026

Copy link
Copy Markdown
Owner

You can get rid of pvr_mark_framebuffer_write() because writing the framebuffer to VRAM is only done when EmulateFramebuffer is enabled. And in this mode the framebuffer writes don't need to be tracked, since the framebuffer is displayed on every vblank no matter what.

I likely forgot to gate the write check in pvr_write32p() behind the Internal template argument. I have some changes coming in this area so I'll fix it.

Everything else looks good to me although I haven't tested it.

@rtomasa

rtomasa commented Sep 3, 2026

Copy link
Copy Markdown
Contributor Author

Thanks for the feedback. I'm excited to test it out with all your corrections to my code.

@flyinghead

Copy link
Copy Markdown
Owner

I fixed pvr_write32p code.
Can you do the pvr_mark_framebuffer_write() change? Then I'll merge it

Add NEON framebuffer conversion and VRAM write paths, and validate the physical VRAM footprint before vector loads so both 8 MB and 16 MB configurations remain in bounds.
@rtomasa
rtomasa force-pushed the pr/arm64-framebuffer branch from ccc7ba1 to 3802448 Compare September 5, 2026 09:15
@rtomasa

rtomasa commented Sep 5, 2026

Copy link
Copy Markdown
Contributor Author

Done!

@flyinghead
flyinghead merged commit b35b829 into flyinghead:dev Sep 6, 2026
19 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