-
-
Notifications
You must be signed in to change notification settings - Fork 710
[Core][P1] BeetlePSX: fix video output via native libretro HW render path #2637
Copy link
Copy link
Open
Labels
P1Priority 1Priority 1audiosound or music relatedsound or music relatedblockerblocks a releaseblocks a releasecore: Mednafenisolated to PSX, Lynx, NEC, WS, SNK, VB core: Mednafen (unless paired)isolated to PSX, Lynx, NEC, WS, SNK, VB core: Mednafen (unless paired)graphicsgraphics, artwork, visuals only (no code)graphics, artwork, visuals only (no code)
Description
Problem
BeetlePSX (Mednafen PSX libretro core with hardware upscaling) builds and loads in Provenance. Audio plays. However, video output is broken when running via the native libretro bridge. BeetlePSX can use either OpenGL ES or Vulkan for hardware rendering.
Part of the native libretro frontend epic and #2624.
Background
BeetlePSX offers two hardware renderers:
- OpenGL ES (default on mobile) -- easier integration, uses GLES3 FBO path
- Vulkan -- higher quality, requires MoltenVK surface integration
For the first working milestone, the GL ES path should be targeted. Vulkan support can follow once the Vulkan/MoltenVK ticket is complete.
Root Cause
Same as Flycast: RETRO_ENVIRONMENT_SET_HW_RENDER is handled by creating an EAGLContext, but rendered frames are never delivered to the Metal display pipeline.
Additionally, BeetlePSX may require:
RETRO_ENVIRONMENT_SET_HW_SHARED_CONTEXTfor async GPU workRETRO_ENVIRONMENT_GET_PREFERRED_HW_RENDERto select GLES3 vs Vulkan
Blocked By
- OpenGL ES FBO -> Metal texture blit pipeline
- Thread-safe GL context lifecycle + retro_run frame loop
- Complete environment callback coverage (for preferred HW render + shared context)
For Vulkan path:
- Vulkan/MoltenVK -> CAMetalLayer integration
Testing
BeetlePSX test cases:
- Any PS1 game (SCPH-1001 BIOS required)
- Hardware renderer shows upscaled geometry vs software mode
- Compare video quality to Mednafen/RetroArch PSX path
Acceptance Criteria
- BeetlePSX (GL ES renderer) displays video on physical iOS device
- Resolution upscaling option works (2x, 4x internal resolution)
- No regression: RetroArch-wrapped BeetlePSX path still works
- Vulkan path tracked separately in the Vulkan/MoltenVK ticket
References
- Original PR: [Core] Beetle PSX #2368
- Original new cores PR: Feature/new cores/libretrogles #2373
- Epic: [Epic] Core Updates - Fix and update out-of-date native cores #2482 (Core Updates)
PVCoreBridgeRetro/Sources/PVLibRetro/PVLibRetroGLESCore.m-- bridge implPVCoreBridgeRetro/Sources/retro/libretro-common/libretro.h-- HW render structs
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
P1Priority 1Priority 1audiosound or music relatedsound or music relatedblockerblocks a releaseblocks a releasecore: Mednafenisolated to PSX, Lynx, NEC, WS, SNK, VB core: Mednafen (unless paired)isolated to PSX, Lynx, NEC, WS, SNK, VB core: Mednafen (unless paired)graphicsgraphics, artwork, visuals only (no code)graphics, artwork, visuals only (no code)