mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 04:55:44 +00:00
Add ZeroFG as a frame generation engine with its opt-in pacer. Keep frame generation in the dedicated session tab and keep manual DLL import removed.
54 lines
2.2 KiB
C
54 lines
2.2 KiB
C
#ifndef FRAMEGEN_ENGINE_H
|
|
#define FRAMEGEN_ENGINE_H
|
|
#include <stdint.h>
|
|
#ifndef VK_USE_PLATFORM_ANDROID_KHR
|
|
#define VK_USE_PLATFORM_ANDROID_KHR
|
|
#endif
|
|
#include <vulkan/vulkan.h>
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
const void *fge_probe(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysicalDevice pd,
|
|
VkFormat ring_fmt);
|
|
void fge_device_lost(void);
|
|
void fge_device_ready(PFN_vkGetInstanceProcAddr gipa, VkInstance inst, VkPhysicalDevice pd,
|
|
VkDevice dev, VkQueue queue, uint32_t qfam, int features_enabled);
|
|
int fge_caps_ok(int kind);
|
|
const char *fge_caps_reason(int kind);
|
|
int fge_format_ok(int kind, VkFormat fmt);
|
|
int fge_engine_available(int kind);
|
|
|
|
int fge_start(int kind, const char *cache_path);
|
|
void fge_stop(void);
|
|
int fge_unavailable(void);
|
|
void fge_configure(uint32_t multiplier, uint32_t target_fps, float flow_scale, float refresh_hz,
|
|
int model, int perf_preset);
|
|
int fge_prepare(uint32_t w, uint32_t h, VkFormat fmt);
|
|
uint32_t fge_plan(uint32_t capacity, uint64_t source_frames, float presented_rate);
|
|
void fge_process(VkCommandBuffer cmd, VkImage source, VkImageView source_view,
|
|
uint32_t w, uint32_t h, VkFormat fmt, uint64_t sequence, uint32_t gens);
|
|
void fge_generate(VkCommandBuffer cmd, uint32_t g, uint32_t count, VkImage img, VkImageView view,
|
|
uint32_t w, uint32_t h);
|
|
void fge_forget_targets(void);
|
|
void fge_set_layer_timing(int layer);
|
|
/* The phases the pacer chose for the next pair's generated frames (engines that can take any phase). */
|
|
void fge_set_phases(const float *phases, uint32_t count);
|
|
/* The phase generated frame [index] of [count] shows. */
|
|
float fge_phase(uint32_t index, uint32_t count);
|
|
|
|
uint32_t fge_pacer_plan(uint32_t multiplier, int64_t period_ns, int64_t vsync_ns, int64_t issue_ns, uint32_t max_generated,
|
|
int64_t *present_ns, float *phases);
|
|
void fge_pacer_completed(int64_t issue_ns, int64_t done_ns);
|
|
void fge_pacer_shown(int64_t planned_ns, int64_t shown_ns);
|
|
void fge_pacer_reset(void);
|
|
void fge_telemetry(float *accepted, float *source_rate, float *thermal);
|
|
const char *fge_engine_name(int kind);
|
|
const char *fge_build_info(void);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|
|
#endif
|