mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
* feat(lsfg): take Lossless Scaling from Steam by itself, import it once owned, rebuild on update - Lossless.kt owns the DLL and its shader cache. The copy the Steam client installs (runtime library or the card's) is taken by itself and taken again when the client updates it (size/mtime stamp). The DLL is copied in and built into a cache named after its SHA-256, so a new DLL hands the compositor a new path; a build that fails keeps the working cache. Builds are serialized. - The Steam session asks the signed-in client once per session whether the account owns app 993090 until the answer is yes, then records it and the app stops asking (BL_LOSSLESS_OWNED). Once owned, the frame generation menu offers "Import Lossless.dll…", on the main screen and in the session drawer; an import stays until Steam's copy changes. - The compositor restarts the LSFG engine when its cache path changes, and a new engine selection clears an earlier start failure, so an updated DLL or a retry no longer needs the app restarted. - The HUD says when LSFG is waiting on Lossless Scaling instead of "starting"; frame generation strings are resources. - Removed LsfgNative's unused DLL variant and cache-match calls. * Find Lossless.dll in added Games libraries too * LSFG: 120, 90 and 60 fps targets alongside 2x-4x The pacer's target-rate mode picks 0-3 generations per game frame. While it is warm the input ring and shared chain follow every frame, so frames that generate nothing don't leave the next one without history. * Credit LSFG: Camille LaVey / Eden, ported to WinNative and DroidDeck by @maxjivi05 * LSFG: aim 0.1 fps under the target so output never passes the refresh rate
47 lines
1.2 KiB
C++
47 lines
1.2 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
//
|
|
// LSFG from the work of Camille LaVey / the Eden Emulator Project, following
|
|
// upstream lsfg-vk. Ported to WinNative and DroidDeck by @maxjivi05; only the
|
|
// Vulkan dispatch differs here (see lsfg_vkd.h).
|
|
|
|
#pragma once
|
|
|
|
#include <cstdint>
|
|
#include <map>
|
|
#include <string>
|
|
#include "lsfg_dll.h"
|
|
#include "lsfg_vkd.h"
|
|
|
|
namespace lsfg {
|
|
|
|
class Device;
|
|
|
|
class LsfgShaders {
|
|
public:
|
|
LsfgShaders() = default;
|
|
// `spirv_target` is the highest SPIR-V version the device accepts (see
|
|
// lsfg_probe.h); cached modules above it are lowered before creation.
|
|
LsfgShaders(const Device& device, const std::string& cache_path,
|
|
uint32_t spirv_target = kSpirv16);
|
|
~LsfgShaders();
|
|
|
|
LsfgShaders(const LsfgShaders&) = delete;
|
|
LsfgShaders& operator=(const LsfgShaders&) = delete;
|
|
|
|
[[nodiscard]] bool IsValid() const {
|
|
return valid;
|
|
}
|
|
|
|
[[nodiscard]] VkShaderModule Get(uint32_t shader_id) const;
|
|
|
|
private:
|
|
void Release();
|
|
|
|
VkDevice device{VK_NULL_HANDLE};
|
|
std::map<uint32_t, VkShaderModule> modules;
|
|
bool valid{};
|
|
};
|
|
|
|
}
|