mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-06 21:15:43 +00:00
50 lines
2.4 KiB
C
50 lines
2.4 KiB
C
#ifndef FRAMEGEN_BRIDGE_H
|
|
#define FRAMEGEN_BRIDGE_H
|
|
#include <stdint.h>
|
|
#ifndef VK_USE_PLATFORM_ANDROID_KHR
|
|
#define VK_USE_PLATFORM_ANDROID_KHR
|
|
#endif
|
|
#include <vulkan/vulkan.h>
|
|
|
|
enum { VKP_FG_ENGINE_LSFG = 0, VKP_FG_ENGINE_DDFG = 1, VKP_FG_ENGINE_ZEROFG = 2 };
|
|
#define VKP_FG_MAX_GENERATIONS 3
|
|
|
|
void vkp_framegen_set_engine(int kind);
|
|
void vkp_framegen_set_armed(int armed, int multiplier, int target_fps);
|
|
void vkp_framegen_set_lsfg_cache_path(const char *path);
|
|
void vkp_framegen_set_tuning(float flow_scale, float refresh_hz);
|
|
void vkp_framegen_set_ddfg_tuning(int model, int perf_preset);
|
|
int vkp_framegen_problem(void);
|
|
const char *vkp_framegen_caps_reason(void);
|
|
void vkp_framegen_stats(float out[6]);
|
|
unsigned vkp_framegen_stats_take(void);
|
|
|
|
const void *vkp_framegen_device_features(VkInstance inst, PFN_vkGetInstanceProcAddr gipa,
|
|
VkPhysicalDevice pd);
|
|
void vkp_framegen_device_ready(VkDevice dev, VkQueue queue, uint32_t qfam, int features_enabled);
|
|
void vkp_framegen_device_lost(void);
|
|
|
|
int vkp_framegen_active(void);
|
|
int vkp_framegen_extra_images(void);
|
|
/* 1 when the next run's frames are shown through the scene layer's timed group, 0 through the swapchain's FIFO. */
|
|
void vkp_framegen_set_layer_timing(int layer);
|
|
/* ZeroFG's pacer (include/zerofg/inline_pacer.h) times the layer's frames instead of the layer's own spacing. */
|
|
void vkp_framegen_set_pacer(int on);
|
|
/* 1 when the layer pass presents the real frame itself after its generated frames (the composed route): only
|
|
* then can the pacer time the whole group. The direct route keeps the layer's own timing. */
|
|
void vkp_framegen_set_paced_route(int composed);
|
|
/* Reset pacing history when a planned real-frame pair is aborted before presentation. */
|
|
void vkp_framegen_pacer_abort(void);
|
|
/* Refresh planned for output k of the last run (k == gens: its real frame; 0: use layer timing). */
|
|
void vkp_framegen_output_planned(int k, int gens, int64_t *planned);
|
|
/* The last run's GPU work finished (the compositor's fence signalled). */
|
|
void vkp_framegen_completed(void);
|
|
/* A real frame the pacer timed for planned_ns was shown at shown_ns. */
|
|
void vkp_framegen_real_shown(int64_t planned_ns, int64_t shown_ns);
|
|
int vkp_framegen_run(VkCommandBuffer cmd, VkImage scene, VkImageView scene_view, int w, int h,
|
|
VkFormat fmt, VkImage gens[VKP_FG_MAX_GENERATIONS]);
|
|
void vkp_framegen_presented(int generated);
|
|
int vkp_framegen_format_ok(VkFormat fmt);
|
|
|
|
#endif
|