Skip to content

Implement Vulkan as a rendering back-end #1752

@midwan

Description

@midwan

Overview: Amiberry Vulkan Backend Port

This issue contains a phased approach to implementing a multi-threaded Vulkan back-end for Amiberry. The current rendering model relies heavily on direct OpenGL and SDL2 calls intermingled with emulation logic inside src/osdep/amiberry_gfx.cpp.

To introduce Vulkan without breaking existing features, the work is divided into 5 distinct phases.

The Strategy

  • Decoupling: We first abstract the rendering logic so that different backends (OpenGL, SDL, Vulkan) can be swapped cleanly.
  • Incremental Implementation: We build the Vulkan backend piece-by-piece. We start by just getting a window and a swapchain up, then buffer uploads, then we handle shaders, and finally, we optimize with multithreading.

The Phases

  1. Phase 1: Abstraction Layer: Create the IRenderer interface.
  2. Phase 2: Context & Swapchain: Setup Vulkan Instance, Device, and Window Swapchain.
  3. Phase 3: Pipeline & Buffers: Implement memory management (VMA), Staging Buffers, and texture uploads for Amiga frames.
  4. Phase 4: Shaders & ImGui: Compile GLSL to SPIR-V, create Vulkan Graphics Pipelines, and integrate Dear ImGui.
  5. Phase 5: Multi-threading: Add Semaphores, Fences, and frame/state double-buffering to allow the Render thread to run independently of the Emulation thread.

Sub-issues

Metadata

Metadata

Assignees

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions