How ragnarok93/lsfg-vk-android works
This repository provides an implicit Vulkan layer for Android frame generation, with a companion GTK configuration UI. The principal runtime path intercepts an application's swapchain and present calls, obtains frame inputs, dispatches LSFG compute work, and chains generated frames into presentation; disabled mode passes presentation through. The graph preserves the preprocessing, optical-flow, generation, Android AHardwareBuffer, synchronization, and telemetry capabilities described by the README. Runtime wiring is based on the README and sampled excerpts; unsampled hooks and integration details are represented only where documented.
Main entry points: v3.1p_src/context.cpp LSFG context · src/context.cpp Runtime context · layer_android.cpp Vulkan layer · hooks.cpp WSI hooks
Components 20
Vulkan runtime
- Vulkan layer
src/layer_android.cpp - WSI hooks
src/hooks.cpp - Runtime context
src/context.cpp - Adaptive scheduler
src/adaptive_scheduler.cpp
Frame generation
- Shader extraction
src/extract/extract.cpp - LSFG context
framegen/v3.1p_src/context.cpp - Mipmaps
framegen/v3.1p_src/shaders/mipmaps.cpp - Alpha stage
framegen/v3.1p_src/shaders/alpha.cpp - Beta stage
framegen/v3.1p_src/shaders/beta.cpp - Gamma stage
framegen/v3.1p_src/shaders/gamma.cpp - Delta stage
framegen/v3.1p_src/shaders/delta.cpp - Frame synthesis
framegen/v3.1p_src/shaders/generate.cpp - Vulkan resources
framegen/src/core/device.cpp
Android interoperability
- AHardwareBuffer
- Android diagnostics
src/android_diagnostics.cpp
Configuration and UI
- Runtime config
src/config/config.cpp - Config file
- Settings UI
ui/src/ui/main_handler.rs - UI config store
ui/src/config.rs
Other components
- Vulkan application
Connections 21
- Vulkan application → Vulkan layer: Vulkan calls
- Vulkan layer → WSI hooks: dispatches WSI
- WSI hooks → Runtime context: routes present
- Runtime context → Runtime config: reads settings
- Runtime context → Adaptive scheduler: adapts output
- Runtime context → LSFG context: submits frames
- Shader extraction → LSFG context: supplies shaders
- LSFG context → Mipmaps: dispatches
- LSFG context → Alpha stage: dispatches
- LSFG context → Beta stage: dispatches
- LSFG context → Gamma stage: dispatches
- LSFG context → Delta stage: dispatches
- LSFG context → Frame synthesis: dispatches
- LSFG context → Vulkan resources: uses Vulkan
- AHardwareBuffer → LSFG context: shares images
- LSFG context → AHardwareBuffer: returns output
- WSI hooks → Vulkan application: presents frames
- Vulkan layer → Android diagnostics: records provenance
- Config file → Runtime config: loads settings
- Settings UI → UI config store: edits profiles
- UI config store → Config file: persists settings