-
-
Notifications
You must be signed in to change notification settings - Fork 110
Description
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
- Phase 1: Abstraction Layer: Create the
IRendererinterface. - Phase 2: Context & Swapchain: Setup Vulkan Instance, Device, and Window Swapchain.
- Phase 3: Pipeline & Buffers: Implement memory management (VMA), Staging Buffers, and texture uploads for Amiga frames.
- Phase 4: Shaders & ImGui: Compile GLSL to SPIR-V, create Vulkan Graphics Pipelines, and integrate Dear ImGui.
- Phase 5: Multi-threading: Add Semaphores, Fences, and frame/state double-buffering to allow the Render thread to run independently of the Emulation thread.
Reactions are currently unavailable