mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-26 07:39:45 -06:00
VideoCommon: Add names for textures and shaders
This commit is contained in:
@ -3,7 +3,11 @@
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <string>
|
||||
|
||||
#include "Common/CommonTypes.h"
|
||||
|
||||
#include "VideoCommon/ShaderGenCommon.h"
|
||||
#include "VideoCommon/TextureDecoder.h"
|
||||
|
||||
@ -34,3 +38,23 @@ TCShaderUid GetShaderUid(EFBCopyFormat dst_format, bool is_depth_copy, bool is_i
|
||||
bool scale_by_half, bool copy_filter);
|
||||
|
||||
} // namespace TextureConversionShaderGen
|
||||
|
||||
template <>
|
||||
struct fmt::formatter<TextureConversionShaderGen::UidData>
|
||||
{
|
||||
constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); }
|
||||
template <typename FormatContext>
|
||||
auto format(const TextureConversionShaderGen::UidData& uid, FormatContext& ctx)
|
||||
{
|
||||
std::string dst_format;
|
||||
if (uid.dst_format == EFBCopyFormat::XFB)
|
||||
dst_format = "XFB";
|
||||
else
|
||||
dst_format = fmt::to_string(uid.dst_format);
|
||||
return format_to(ctx.out(),
|
||||
"dst_format: {}, efb_has_alpha: {}, is_depth_copy: {}, is_intensity: {}, "
|
||||
"scale_by_half: {}, copy_filter: {}",
|
||||
dst_format, uid.efb_has_alpha, uid.is_depth_copy, uid.is_intensity,
|
||||
uid.scale_by_half, uid.copy_filter);
|
||||
}
|
||||
};
|
||||
|
Reference in New Issue
Block a user