mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-12-05 12:35:42 +00:00
Verbatim copy of app/src/main/cpp/fsr4npu/ (C sources, headers, shaders, weight pack scripts) from michaelisomer-cyber/Winlator-NeuralScale at a0ab6b0f770e1a6786b4e68def46b4edb8baafd0 (GPL-3.0, fork of StevenMXZ/Winlator-Ludashi). Not built yet; the DroidDeck port follows.
38 lines
1.4 KiB
C
38 lines
1.4 KiB
C
// Winlator Ludashi Native Vulkan GPU FSR 3.1 Temporal Upscaler
|
|
// Runs 100% on the Adreno GPU inside the game's VkCommandBuffer (0 NPU watts, 0 extra latency,
|
|
// full native render & output resolution, works with DLSS / XeSS / FSR 2 / FSR 3 / FSR 4 inputs).
|
|
#pragma once
|
|
|
|
#include <vulkan/vulkan.h>
|
|
#include "fsr4_pipeline.h"
|
|
|
|
#ifdef __cplusplus
|
|
extern "C" {
|
|
#endif
|
|
|
|
typedef struct WlFsr3Gpu WlFsr3Gpu;
|
|
|
|
WlFsr3Gpu *wl_fsr3_gpu_create(const WlVkDispatch *vk, const char *fsr4_dir);
|
|
void wl_fsr3_gpu_destroy(WlFsr3Gpu *g);
|
|
void wl_fsr3_gpu_reset(WlFsr3Gpu *g);
|
|
int wl_fsr3_gpu_is_ready(const WlFsr3Gpu *g);
|
|
|
|
// Record one synchronous GPU FSR 3.1 temporal upscaling frame into cb.
|
|
// Returns:
|
|
// 2 = GPU FSR 3.1 path recorded
|
|
// 0 = Failed / unavailable (caller should fall back to blit)
|
|
int wl_fsr3_gpu_dispatch(WlFsr3Gpu *g, VkCommandBuffer cb,
|
|
const WlFsr4FrameDesc *frame,
|
|
VkImage color_img, VkFormat color_fmt, uint32_t cw, uint32_t ch,
|
|
VkImage depth_img, VkFormat depth_fmt,
|
|
VkImage motion_img, VkFormat motion_fmt,
|
|
VkImage out_img, uint32_t ow, uint32_t oh,
|
|
float sharpness,
|
|
uint32_t *out_gpu_us,
|
|
uint64_t *out_dispatches,
|
|
const char **out_reason);
|
|
|
|
#ifdef __cplusplus
|
|
}
|
|
#endif
|