diff options
author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-25 03:48:41 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-25 03:48:41 +0100 |
commit | 20b62dbd30e597c6d3700a22fbde5bd10169dfb2 (patch) | |
tree | fa6c840b3ba16eb261a30ef50a34a5d0f07587c6 /src/video_core/engines/sw_blitter/converter.h | |
parent | Merge pull request #9312 from FernandoS27/pokemomma (diff) | |
parent | Fermi2D: Cleanup and address feedback. (diff) | |
download | yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.gz yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.bz2 yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.lz yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.xz yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.tar.zst yuzu-20b62dbd30e597c6d3700a22fbde5bd10169dfb2.zip |
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 |