#ifndef BETA_HPP #define BETA_HPP #include "core/buffer.hpp" #include "core/commandbuffer.hpp" #include "core/descriptorpool.hpp" #include "core/descriptorset.hpp" #include "core/image.hpp" #include "core/pipeline.hpp" #include "core/shadermodule.hpp" #include "device.hpp" #include namespace Vulkan::Shaderchains { /// /// Shader chain beta. /// /// Takes eight temporal 8-bit RGBA images, as well as the four output images from alpha, /// and creates six 8-bit R images, halving in resolution each step. /// class Beta { public: /// /// Initialize the shaderchain. /// /// @param device The Vulkan device to create the resources on. /// @param pool The descriptor pool to allocate in. /// @param temporalImgs The temporal images to use for processing. /// @param inImgs The input images to process /// /// @throws ls::vulkan_error if resource creation fails. /// Beta(const Device& device, const Core::DescriptorPool& pool, std::array temporalImgs, std::array inImgs); /// /// Dispatch the shaderchain. /// /// @param buf The command buffer to use for dispatching. /// /// @throws std::logic_error if the command buffer is not recording. /// void Dispatch(const Core::CommandBuffer& buf); /// Get the output images. [[nodiscard]] const auto& getOutImages() const { return this->outImgs; } /// Trivially copyable, moveable and destructible Beta(const Beta&) noexcept = default; Beta& operator=(const Beta&) noexcept = default; Beta(Beta&&) noexcept = default; Beta& operator=(Beta&&) noexcept = default; ~Beta() = default; private: std::array shaderModules; std::array pipelines; std::array descriptorSets; Core::Buffer buffer; std::array temporalImgs; std::array inImgs; std::array tempImgs1; std::array tempImgs2; std::array outImgs; }; } #endif // BETA_HPP