diff options
| author | liamwhite <liamwhite@users.noreply.github.com> | 2022-11-24 21:48:41 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2022-11-24 21:48:41 -0500 |
| commit | 20b62dbd30e597c6d3700a22fbde5bd10169dfb2 (patch) | |
| tree | fa6c840b3ba16eb261a30ef50a34a5d0f07587c6 /src/video_core/engines/sw_blitter/converter.h | |
| parent | 9d081a872903915a7a75b2634e310ea62d7b5dba (diff) | |
| parent | 826e0785bf6b852a4231f5f3d87655b2cf4e1856 (diff) | |
Merge pull request #9194 from FernandoS27/yfc-fermi2d
YFC - Fermi2D: Rework blit engine and add a software blitter.
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 |
