diff options
Diffstat (limited to 'src/video_core/engines/sw_blitter/converter.h')
-rw-r--r-- | src/video_core/engines/sw_blitter/converter.h | 36 |
1 files changed, 36 insertions, 0 deletions
diff --git a/src/video_core/engines/sw_blitter/converter.h b/src/video_core/engines/sw_blitter/converter.h new file mode 100644 index 000000000..f9bdc516e --- /dev/null +++ b/src/video_core/engines/sw_blitter/converter.h @@ -0,0 +1,36 @@ +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#pragma once + +#include <memory> +#include <span> + +#include "common/common_types.h" + +#include "video_core/gpu.h" + +namespace Tegra::Engines::Blitter { + +class Converter { +public: + virtual void ConvertTo(std::span<const u8> input, std::span<f32> output) = 0; + virtual void ConvertFrom(std::span<const f32> input, std::span<u8> output) = 0; + virtual ~Converter() = default; +}; + +class ConverterFactory { +public: + ConverterFactory(); + ~ConverterFactory(); + + Converter* GetFormatConverter(RenderTargetFormat format); + +private: + Converter* BuildConverter(RenderTargetFormat format); + + struct ConverterFactoryImpl; + std::unique_ptr<ConverterFactoryImpl> impl; +}; + +} // namespace Tegra::Engines::Blitter |