diff options
| author | Pokechu22 <Pokechu022@gmail.com> | 2021-12-09 14:00:08 -0800 |
|---|---|---|
| committer | Pokechu22 <Pokechu022@gmail.com> | 2022-01-01 11:38:56 -0800 |
| commit | afd02b79a511f88ae8c7d0be0c49f529967cb243 (patch) | |
| tree | 1781e71210824a223404131a80f7acb674773166 /Source/Core/VideoCommon/TextureCacheBase.h | |
| parent | 85d2ea0dd28444effed13a622360253f2d74bcba (diff) | |
VideoCommon: Add names for textures and shaders
Diffstat (limited to 'Source/Core/VideoCommon/TextureCacheBase.h')
| -rw-r--r-- | Source/Core/VideoCommon/TextureCacheBase.h | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 3fa9b85aa0..692aab4916 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -5,6 +5,7 @@ #include <array> #include <bitset> +#include <fmt/format.h> #include <map> #include <memory> #include <optional> @@ -71,6 +72,23 @@ struct EFBCopyParams bool copy_filter; }; +template <> +struct fmt::formatter<EFBCopyParams> +{ + constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } + template <typename FormatContext> + auto format(const EFBCopyParams& uid, FormatContext& ctx) + { + std::string copy_format; + if (uid.copy_format == EFBCopyFormat::XFB) + copy_format = "XFB"; + else + copy_format = fmt::to_string(uid.copy_format); + return format_to(ctx.out(), "format: {}, copy format: {}, depth: {}, yuv: {}, copy filter: {}", + uid.efb_format, copy_format, uid.depth, uid.yuv, uid.copy_filter); + } +}; + // Reduced version of the full coefficient array, with a single value for each row. struct EFBCopyFilterCoefficients { |
