mirror of
https://github.com/Droid-Deck/DroidDeck.git
synced 2026-11-19 12:56:06 +00:00
The five files the audit measured as Winlator's are replaced: a one-method callback interface by java.util.function.Consumer, the component base by SessionPart (attach an application context, start, stop), the environment list by HostEnvironment, the process starter by HostProcess, and the pad's state holder by PadState with named sticks, triggers, directions and buttons. The frame-generation tree is framegen/ (its contents were never Winlator's: lsfg-vk's port and Bannerlator's Win-FG), the log tags are the app's, and the fake pad's rumble socket is now one the app actually serves: RumbleComponent turns a game's force-feedback effects into the phone's vibrator, which used to go nowhere. The two design notes describing Bannerlator's X11 path are gone, and the README and credits say what is whose.
71 lines
1.8 KiB
C++
71 lines
1.8 KiB
C++
// SPDX-FileCopyrightText: Copyright 2026 Eden Emulator Project
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
|
|
// SPDX-FileCopyrightText: Copyright 2025 lsfg-vk
|
|
// SPDX-License-Identifier: GPL-3.0-or-later
|
|
//
|
|
// Ported into Bannerlator's compositor from WinNative (GPL-3.0-or-later),
|
|
// whose LSFG port is credited to Camille LaVey / the Eden Emulator Project and
|
|
// follows upstream lsfg-vk. Only the Vulkan dispatch differs: Bannerlator
|
|
// resolves entry points through the renderer's own table (see lsfg_vkd.h).
|
|
|
|
#pragma once
|
|
|
|
#include <array>
|
|
|
|
#include "lsfg_common.hpp"
|
|
|
|
namespace lsfg {
|
|
|
|
class LsfgShaders;
|
|
|
|
constexpr size_t LSFG_ALPHA_STAGES = 4;
|
|
|
|
class LsfgAlphaPasses {
|
|
public:
|
|
LsfgAlphaPasses() = default;
|
|
LsfgAlphaPasses(const Device& device, const LsfgShaders& shaders);
|
|
|
|
[[nodiscard]] const LsfgPass& Get(size_t stage) const {
|
|
return passes[stage];
|
|
}
|
|
|
|
[[nodiscard]] bool Valid() const;
|
|
|
|
private:
|
|
std::array<LsfgPass, LSFG_ALPHA_STAGES> passes;
|
|
};
|
|
|
|
class LsfgAlpha {
|
|
public:
|
|
LsfgAlpha() = default;
|
|
LsfgAlpha(const Device& device, const LsfgAlphaPasses& passes, LsfgResources& resources,
|
|
VkDescriptorPool descriptor_pool, LsfgImage& input);
|
|
|
|
void PushBarriers(LsfgBarriers& barriers, uint64_t frame_count, size_t stage);
|
|
void DispatchStage(VkCommandBuffer cmdbuf, uint64_t frame_count, size_t stage);
|
|
|
|
[[nodiscard]] LsfgImageHistory& Outputs() {
|
|
return out_images;
|
|
}
|
|
|
|
[[nodiscard]] bool Valid() const {
|
|
return allocated;
|
|
}
|
|
|
|
private:
|
|
const LsfgAlphaPasses* passes{};
|
|
LsfgImage* input{};
|
|
|
|
std::array<VkDescriptorSet, LSFG_ALPHA_STAGES - 1> descriptor_sets{};
|
|
std::array<VkDescriptorSet, LSFG_HISTORY_SLOTS> last_descriptor_sets{};
|
|
|
|
LsfgImage temp1;
|
|
LsfgImage temp2;
|
|
LsfgImagePair temp3;
|
|
LsfgImageHistory out_images;
|
|
bool allocated{};
|
|
};
|
|
|
|
}
|