Skip to content

[Epic] Native libretro.h Frontend API #2631

@github-actions

Description

@github-actions

Overview

This epic tracks all work required to implement a full native libretro.h frontend API in Provenance — without relying on the RetroArch binary/dylib wrapper. The goal is to allow hardware-accelerated libretro cores (Flycast, BeetlePSX, Play!, etc.) to render video natively through Provenance's Metal pipeline, on iOS, tvOS, and macOS/Catalyst.

Context

Currently, hardware-accelerated libretro cores can only run via the RetroArch dylib wrapper (PVCoreBridgeRetro backed by the full RetroArch binary). This works but has significant downsides:

  • Large binary overhead (full RetroArch runtime required)
  • Cannot be included in Provenance Lite builds
  • Poor integration with Provenance's native UI (save states, cheats, overlays)
  • Excluded from the direct libretro bridge path (PVLibRetroCoreBridge)

The spike in #2624 confirms what needs to be built. This epic replaces the RetroArch middleman for hardware-accelerated cores.

Architecture Target

libretro core (Flycast, BeetlePSX, Play!, etc.)
        |
        v RETRO_ENVIRONMENT_SET_HW_RENDER
PVLibRetroGLESCoreBridge
        |
        +-- OpenGL ES path: EAGLContext -> FBO -> MTLTexture blit
        +-- Vulkan path:    MoltenVK VkInstance -> CAMetalLayer -> MTLTexture
        |
        v
PVMetalViewController (existing Metal display pipeline)

Sub-Tasks

Dependency Graph

#2632 (OpenGL ES FBO->Metal)  <-- BLOCKS --> #2636 (Flycast video)
#2633 (GL context lifecycle)  <-- BLOCKS --> #2636, #2637
#2635 (env callbacks)         <-- BLOCKS --> #2637 (BeetlePSX)
#2634 (Vulkan/MoltenVK)       <-- BLOCKS --> #2637 (Vulkan path)
#2638 (preferred HW render)   <-- PART OF --> #2635
#2639 (decouple RetroArch)    <-- enables Lite builds

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    EpiccheatsCheat code systemenhancementimprovements, enhancements, new features, additionsgraphicsgraphics, artwork, visuals only (no code)metalRelated to the Metal GPU path in Provenance.

    Type

    No type

    Projects

    Status

    In Progress

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions