diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-11-05 22:26:38 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2022-11-24 20:35:44 +0100 |
commit | 957840be9151e7c3b97b638cc0d10d73173c4036 (patch) | |
tree | bf3f3aa7b612265fd19db8297ee09d71c819abe7 /src/video_core/engines/sw_blitter/converter.h | |
parent | Merge pull request #9299 from lioncash/cast (diff) | |
download | yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.tar yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.tar.gz yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.tar.bz2 yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.tar.lz yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.tar.xz yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.tar.zst yuzu-957840be9151e7c3b97b638cc0d10d73173c4036.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/engines/sw_blitter/converter.h | 35 |
1 files changed, 35 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..03337e906 --- /dev/null +++ b/src/video_core/engines/sw_blitter/converter.h @@ -0,0 +1,35 @@ +// SPDX-FileCopyrightText: Copyright 2022 yuzu Emulator Project +// SPDX-License-Identifier: GPL-3.0-or-later + +#include <memory> +#include <span> + +#include "common/common_types.h" + +#pragma once + +#include "video_core/gpu.h" + +namespace Tegra::Engines::Blitter { + +class Converter { +public: + virtual void ConvertTo(std::span<u8> input, std::span<f32> output) = 0; + virtual void ConvertFrom(std::span<f32> input, std::span<u8> output) = 0; +}; + +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 |