From 78e43a44042e6407318970753df4d3b5b230e80c Mon Sep 17 00:00:00 2001 From: Pokechu22 Date: Wed, 12 Jan 2022 17:16:29 -0800 Subject: [PATCH] Make all custom fmt::formatter's format functions const fmt 8.0.0 requires this. --- Source/Core/Common/BitField.h | 7 +- Source/Core/Common/EnumFormatter.h | 2 +- Source/Core/Common/HRWrap.h | 2 +- Source/Core/VideoBackends/D3D/D3DBase.h | 2 +- Source/Core/VideoBackends/D3D12/DX12Context.h | 2 +- Source/Core/VideoCommon/BPMemory.h | 76 +++++++++---------- Source/Core/VideoCommon/CPMemory.h | 18 ++--- Source/Core/VideoCommon/GeometryShaderGen.h | 2 +- Source/Core/VideoCommon/TextureCacheBase.h | 2 +- .../VideoCommon/TextureConverterShaderGen.h | 2 +- Source/Core/VideoCommon/XFMemory.h | 10 +-- 11 files changed, 63 insertions(+), 62 deletions(-) diff --git a/Source/Core/Common/BitField.h b/Source/Core/Common/BitField.h index 2f5eba092f..68c0577fb2 100644 --- a/Source/Core/Common/BitField.h +++ b/Source/Core/Common/BitField.h @@ -193,7 +193,7 @@ struct fmt::formatter> fmt::formatter m_formatter; constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); } template - auto format(const BitField& bitfield, FormatContext& ctx) + auto format(const BitField& bitfield, FormatContext& ctx) const { return m_formatter.format(bitfield.Value(), ctx); } @@ -479,7 +479,7 @@ struct fmt::formatter> fmt::formatter m_formatter; constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); } template - auto format(const BitFieldArrayRef& ref, FormatContext& ctx) + auto format(const BitFieldArrayRef& ref, FormatContext& ctx) const { return m_formatter.format(ref.Value(), ctx); } @@ -491,7 +491,8 @@ struct fmt::formatter> fmt::formatter m_formatter; constexpr auto parse(format_parse_context& ctx) { return m_formatter.parse(ctx); } template - auto format(const BitFieldArrayConstRef& ref, FormatContext& ctx) + auto format(const BitFieldArrayConstRef& ref, + FormatContext& ctx) const { return m_formatter.format(ref.Value(), ctx); } diff --git a/Source/Core/Common/EnumFormatter.h b/Source/Core/Common/EnumFormatter.h index 26cc910438..2b8e7d36f5 100644 --- a/Source/Core/Common/EnumFormatter.h +++ b/Source/Core/Common/EnumFormatter.h @@ -62,7 +62,7 @@ public: } template - auto format(const T& e, FormatContext& ctx) + auto format(const T& e, FormatContext& ctx) const { const auto value_s = static_cast>(e); // Possibly signed const auto value_u = static_cast>(value_s); // Always unsigned diff --git a/Source/Core/Common/HRWrap.h b/Source/Core/Common/HRWrap.h index 71c3bfed87..eb70ac6dd5 100644 --- a/Source/Core/Common/HRWrap.h +++ b/Source/Core/Common/HRWrap.h @@ -25,7 +25,7 @@ struct fmt::formatter { constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); } template - auto format(const Common::HRWrap& hr, FormatContext& ctx) + auto format(const Common::HRWrap& hr, FormatContext& ctx) const { return fmt::format_to(ctx.out(), "{} ({:#010x})", Common::GetHResultMessage(hr.m_hr), static_cast(hr.m_hr)); diff --git a/Source/Core/VideoBackends/D3D/D3DBase.h b/Source/Core/VideoBackends/D3D/D3DBase.h index 03872b0240..767237a5cd 100644 --- a/Source/Core/VideoBackends/D3D/D3DBase.h +++ b/Source/Core/VideoBackends/D3D/D3DBase.h @@ -57,7 +57,7 @@ struct fmt::formatter { constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); } template - auto format(const DX11::DX11HRWrap& hr, FormatContext& ctx) + auto format(const DX11::DX11HRWrap& hr, FormatContext& ctx) const { if (hr.m_hr == DXGI_ERROR_DEVICE_REMOVED && DX11::D3D::device != nullptr) { diff --git a/Source/Core/VideoBackends/D3D12/DX12Context.h b/Source/Core/VideoBackends/D3D12/DX12Context.h index 1528f436c3..4c5464a123 100644 --- a/Source/Core/VideoBackends/D3D12/DX12Context.h +++ b/Source/Core/VideoBackends/D3D12/DX12Context.h @@ -205,7 +205,7 @@ struct fmt::formatter { constexpr auto parse(fmt::format_parse_context& ctx) { return ctx.begin(); } template - auto format(const DX12::DX12HRWrap& hr, FormatContext& ctx) + auto format(const DX12::DX12HRWrap& hr, FormatContext& ctx) const { if (hr.m_hr == DXGI_ERROR_DEVICE_REMOVED && DX12::g_dx_context != nullptr && DX12::g_dx_context->GetDevice() != nullptr) diff --git a/Source/Core/VideoCommon/BPMemory.h b/Source/Core/VideoCommon/BPMemory.h index 3b89cded7e..35d14835c0 100644 --- a/Source/Core/VideoCommon/BPMemory.h +++ b/Source/Core/VideoCommon/BPMemory.h @@ -367,7 +367,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const IND_MTXA& col, FormatContext& ctx) + auto format(const IND_MTXA& col, FormatContext& ctx) const { return format_to(ctx.out(), "Row 0 (ma): {} ({})\n" @@ -389,7 +389,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const IND_MTXB& col, FormatContext& ctx) + auto format(const IND_MTXB& col, FormatContext& ctx) const { return format_to(ctx.out(), "Row 0 (mc): {} ({})\n" @@ -414,7 +414,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const IND_MTXC& col, FormatContext& ctx) + auto format(const IND_MTXC& col, FormatContext& ctx) const { return format_to(ctx.out(), "Row 0 (me): {} ({})\n" @@ -489,7 +489,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevStageCombiner::ColorCombiner& cc, FormatContext& ctx) + auto format(const TevStageCombiner::ColorCombiner& cc, FormatContext& ctx) const { auto out = ctx.out(); if (cc.bias != TevBias::Compare) @@ -598,7 +598,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevStageCombiner::AlphaCombiner& ac, FormatContext& ctx) + auto format(const TevStageCombiner::AlphaCombiner& ac, FormatContext& ctx) const { auto out = ctx.out(); if (ac.bias != TevBias::Compare) @@ -737,7 +737,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevStageIndirect& tevind, FormatContext& ctx) + auto format(const TevStageIndirect& tevind, FormatContext& ctx) const { return format_to(ctx.out(), "Indirect tex stage ID: {}\n" @@ -797,7 +797,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TwoTevStageOrders& stages, FormatContext& ctx) + auto format(const TwoTevStageOrders& stages, FormatContext& ctx) const { return format_to(ctx.out(), "Stage 0 texmap: {}\nStage 0 tex coord: {}\n" @@ -823,7 +823,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TEXSCALE& scale, FormatContext& ctx) + auto format(const TEXSCALE& scale, FormatContext& ctx) const { return format_to(ctx.out(), "Even stage S scale: {} ({})\n" @@ -855,7 +855,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const RAS1_IREF& indref, FormatContext& ctx) + auto format(const RAS1_IREF& indref, FormatContext& ctx) const { // The field names here are suspicious, since there is no bi3 or bc2 return format_to(ctx.out(), @@ -947,7 +947,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexMode0& mode, FormatContext& ctx) + auto format(const TexMode0& mode, FormatContext& ctx) const { return format_to(ctx.out(), "Wrap S: {}\n" @@ -976,7 +976,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexMode1& mode, FormatContext& ctx) + auto format(const TexMode1& mode, FormatContext& ctx) const { return format_to(ctx.out(), "Min LOD: {} ({})\nMax LOD: {} ({})", mode.min_lod, mode.min_lod / 16.f, mode.max_lod, mode.max_lod / 16.f); @@ -995,7 +995,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexImage0& teximg, FormatContext& ctx) + auto format(const TexImage0& teximg, FormatContext& ctx) const { return format_to(ctx.out(), "Width: {}\n" @@ -1020,7 +1020,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexImage1& teximg, FormatContext& ctx) + auto format(const TexImage1& teximg, FormatContext& ctx) const { return format_to(ctx.out(), "Even TMEM Offset: {:x}\n" @@ -1044,7 +1044,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexImage2& teximg, FormatContext& ctx) + auto format(const TexImage2& teximg, FormatContext& ctx) const { return format_to(ctx.out(), "Odd TMEM Offset: {:x}\n" @@ -1064,7 +1064,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexImage3& teximg, FormatContext& ctx) + auto format(const TexImage3& teximg, FormatContext& ctx) const { return format_to(ctx.out(), "Source address (32 byte aligned): 0x{:06X}", teximg.image_base << 5); @@ -1082,7 +1082,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexTLUT& tlut, FormatContext& ctx) + auto format(const TexTLUT& tlut, FormatContext& ctx) const { return format_to(ctx.out(), "Address: {:08x}\nFormat: {}", tlut.tmem_offset << 9, tlut.tlut_format); @@ -1106,7 +1106,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const ZTex2& ztex2, FormatContext& ctx) + auto format(const ZTex2& ztex2, FormatContext& ctx) const { return format_to(ctx.out(), "Type: {}\nOperation: {}", ztex2.type, ztex2.op); } @@ -1153,7 +1153,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const GenMode& mode, FormatContext& ctx) + auto format(const GenMode& mode, FormatContext& ctx) const { return format_to(ctx.out(), "Num tex gens: {}\n" @@ -1198,7 +1198,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const LPSize& lp, FormatContext& ctx) + auto format(const LPSize& lp, FormatContext& ctx) const { return format_to(ctx.out(), "Line size: {} ({:.3} pixels)\n" @@ -1333,7 +1333,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const BlendMode& mode, FormatContext& ctx) + auto format(const BlendMode& mode, FormatContext& ctx) const { static constexpr std::array no_yes = {"No", "Yes"}; return format_to(ctx.out(), @@ -1366,7 +1366,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FogParam0& param, FormatContext& ctx) + auto format(const FogParam0& param, FormatContext& ctx) const { return format_to(ctx.out(), "A value: {}\nMantissa: {}\nExponent: {}\nSign: {}", param.FloatValue(), param.mant, param.exp, param.sign ? '-' : '+'); @@ -1425,7 +1425,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FogParam3& param, FormatContext& ctx) + auto format(const FogParam3& param, FormatContext& ctx) const { return format_to(ctx.out(), "C value: {}\nMantissa: {}\nExponent: {}\nSign: {}\nProjection: {}\nFsel: {}", @@ -1460,7 +1460,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FogRangeParams::RangeBase& range, FormatContext& ctx) + auto format(const FogRangeParams::RangeBase& range, FormatContext& ctx) const { return format_to(ctx.out(), "Center: {}\nEnabled: {}", range.Center, range.Enabled ? "Yes" : "No"); @@ -1471,7 +1471,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FogRangeKElement& range, FormatContext& ctx) + auto format(const FogRangeKElement& range, FormatContext& ctx) const { return format_to(ctx.out(), "High: {}\nLow: {}", range.HI, range.LO); } @@ -1507,7 +1507,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FogParams::FogColor& color, FormatContext& ctx) + auto format(const FogParams::FogColor& color, FormatContext& ctx) const { return format_to(ctx.out(), "Red: {}\nGreen: {}\nBlue: {}", color.r, color.g, color.b); } @@ -1545,7 +1545,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const ZMode& mode, FormatContext& ctx) + auto format(const ZMode& mode, FormatContext& ctx) const { return format_to(ctx.out(), "Enable test: {}\n" @@ -1566,7 +1566,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const ConstantAlpha& c, FormatContext& ctx) + auto format(const ConstantAlpha& c, FormatContext& ctx) const { return format_to(ctx.out(), "Enable: {}\n" @@ -1586,7 +1586,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FieldMode& mode, FormatContext& ctx) + auto format(const FieldMode& mode, FormatContext& ctx) const { return format_to(ctx.out(), "Adjust vertex tex LOD computation to account for interlacing: {}", mode.texLOD); @@ -1616,7 +1616,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const FieldMask& mask, FormatContext& ctx) + auto format(const FieldMask& mask, FormatContext& ctx) const { return format_to(ctx.out(), "Odd field: {}\nEven field: {}", mask.odd, mask.even); } @@ -1678,7 +1678,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const PEControl& config, FormatContext& ctx) + auto format(const PEControl& config, FormatContext& ctx) const { return format_to(ctx.out(), "EFB pixel format: {}\n" @@ -1705,7 +1705,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TCInfo& info, FormatContext& ctx) + auto format(const TCInfo& info, FormatContext& ctx) const { return format_to(ctx.out(), "Scale: {}\n" @@ -1764,7 +1764,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevReg::RA& ra, FormatContext& ctx) + auto format(const TevReg::RA& ra, FormatContext& ctx) const { return format_to(ctx.out(), "Type: {}\nAlpha: {:03x}\nRed: {:03x}", ra.type, ra.alpha, ra.red); } @@ -1774,7 +1774,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevReg::BG& bg, FormatContext& ctx) + auto format(const TevReg::BG& bg, FormatContext& ctx) const { return format_to(ctx.out(), "Type: {}\nGreen: {:03x}\nBlue: {:03x}", bg.type, bg.green, bg.blue); @@ -1785,7 +1785,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevReg& reg, FormatContext& ctx) + auto format(const TevReg& reg, FormatContext& ctx) const { return format_to(ctx.out(), "{}\n{}", reg.ra, reg.bg); } @@ -1881,7 +1881,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TevKSel& ksel, FormatContext& ctx) + auto format(const TevKSel& ksel, FormatContext& ctx) const { return format_to(ctx.out(), "Swap 1: {}\nSwap 2: {}\nColor sel 0: {}\nAlpha sel 0: {}\n" @@ -1967,7 +1967,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const AlphaTest& test, FormatContext& ctx) + auto format(const AlphaTest& test, FormatContext& ctx) const { return format_to(ctx.out(), "Test 1: {} (ref: 0x{:02x})\n" @@ -2022,7 +2022,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const UPE_Copy& copy, FormatContext& ctx) + auto format(const UPE_Copy& copy, FormatContext& ctx) const { static constexpr std::array no_yes = {"No", "Yes"}; std::string_view clamp; @@ -2111,7 +2111,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const BPU_PreloadTileInfo& info, FormatContext& ctx) + auto format(const BPU_PreloadTileInfo& info, FormatContext& ctx) const { return format_to(ctx.out(), "Type: {}\nCount: {}", info.type, info.count); } diff --git a/Source/Core/VideoCommon/CPMemory.h b/Source/Core/VideoCommon/CPMemory.h index 52b7038e7c..23a3335f64 100644 --- a/Source/Core/VideoCommon/CPMemory.h +++ b/Source/Core/VideoCommon/CPMemory.h @@ -258,7 +258,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TVtxDesc::Low& desc, FormatContext& ctx) + auto format(const TVtxDesc::Low& desc, FormatContext& ctx) const { static constexpr std::array present = {"Not present", "Present"}; @@ -287,7 +287,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TVtxDesc::High& desc, FormatContext& ctx) + auto format(const TVtxDesc::High& desc, FormatContext& ctx) const { return format_to(ctx.out(), "Texture Coord 0: {}\n" @@ -307,7 +307,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TVtxDesc& desc, FormatContext& ctx) + auto format(const TVtxDesc& desc, FormatContext& ctx) const { return format_to(ctx.out(), "{}\n{}", desc.low, desc.high); } @@ -342,7 +342,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const UVAT_group0& g0, FormatContext& ctx) + auto format(const UVAT_group0& g0, FormatContext& ctx) const { static constexpr std::array byte_dequant = { "shift does not apply to u8/s8 components", "shift applies to u8/s8 components"}; @@ -398,7 +398,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const UVAT_group1& g1, FormatContext& ctx) + auto format(const UVAT_group1& g1, FormatContext& ctx) const { return format_to(ctx.out(), "Texture coord 1 elements: {}\n" @@ -444,7 +444,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const UVAT_group2& g2, FormatContext& ctx) + auto format(const UVAT_group2& g2, FormatContext& ctx) const { return format_to(ctx.out(), "Texture coord 4 shift: {} ({})\n" @@ -578,7 +578,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const VAT& vat, FormatContext& ctx) + auto format(const VAT& vat, FormatContext& ctx) const { return format_to(ctx.out(), "{}\n{}\n{}", vat.g0, vat.g1, vat.g2); } @@ -599,7 +599,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TMatrixIndexA& m, FormatContext& ctx) + auto format(const TMatrixIndexA& m, FormatContext& ctx) const { return format_to(ctx.out(), "PosNormal: {}\nTex0: {}\nTex1: {}\nTex2: {}\nTex3: {}", m.PosNormalMtxIdx, m.Tex0MtxIdx, m.Tex1MtxIdx, m.Tex2MtxIdx, m.Tex3MtxIdx); @@ -619,7 +619,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TMatrixIndexB& m, FormatContext& ctx) + auto format(const TMatrixIndexB& m, FormatContext& ctx) const { return format_to(ctx.out(), "Tex4: {}\nTex5: {}\nTex6: {}\nTex7: {}", m.Tex4MtxIdx, m.Tex5MtxIdx, m.Tex6MtxIdx, m.Tex7MtxIdx); diff --git a/Source/Core/VideoCommon/GeometryShaderGen.h b/Source/Core/VideoCommon/GeometryShaderGen.h index 8b78203d4c..0a1a402e06 100644 --- a/Source/Core/VideoCommon/GeometryShaderGen.h +++ b/Source/Core/VideoCommon/GeometryShaderGen.h @@ -36,7 +36,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const geometry_shader_uid_data& uid, FormatContext& ctx) + auto format(const geometry_shader_uid_data& uid, FormatContext& ctx) const { return format_to(ctx.out(), "passthrough: {}, {} tex gens, primitive type {}", uid.IsPassthrough(), uid.numTexGens, uid.primitive_type); diff --git a/Source/Core/VideoCommon/TextureCacheBase.h b/Source/Core/VideoCommon/TextureCacheBase.h index 692aab4916..d8cccdf1bd 100644 --- a/Source/Core/VideoCommon/TextureCacheBase.h +++ b/Source/Core/VideoCommon/TextureCacheBase.h @@ -77,7 +77,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const EFBCopyParams& uid, FormatContext& ctx) + auto format(const EFBCopyParams& uid, FormatContext& ctx) const { std::string copy_format; if (uid.copy_format == EFBCopyFormat::XFB) diff --git a/Source/Core/VideoCommon/TextureConverterShaderGen.h b/Source/Core/VideoCommon/TextureConverterShaderGen.h index a87187e3a9..99a5bd0422 100644 --- a/Source/Core/VideoCommon/TextureConverterShaderGen.h +++ b/Source/Core/VideoCommon/TextureConverterShaderGen.h @@ -44,7 +44,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TextureConversionShaderGen::UidData& uid, FormatContext& ctx) + auto format(const TextureConversionShaderGen::UidData& uid, FormatContext& ctx) const { std::string dst_format; if (uid.dst_format == EFBCopyFormat::XFB) diff --git a/Source/Core/VideoCommon/XFMemory.h b/Source/Core/VideoCommon/XFMemory.h index 189f695f41..1b0409de05 100644 --- a/Source/Core/VideoCommon/XFMemory.h +++ b/Source/Core/VideoCommon/XFMemory.h @@ -254,7 +254,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const LitChannel& chan, FormatContext& ctx) + auto format(const LitChannel& chan, FormatContext& ctx) const { return format_to(ctx.out(), "Material source: {0}\nEnable lighting: {1}\nLight mask: {2:x} ({2:08b})\n" @@ -276,7 +276,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const ClipDisable& cd, FormatContext& ctx) + auto format(const ClipDisable& cd, FormatContext& ctx) const { return format_to(ctx.out(), "Disable clipping detection: {}\n" @@ -300,7 +300,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const INVTXSPEC& spec, FormatContext& ctx) + auto format(const INVTXSPEC& spec, FormatContext& ctx) const { return format_to(ctx.out(), "Num colors: {}\nNum normals: {}\nNum textures: {}", spec.numcolors, spec.numnormals, spec.numtextures); @@ -324,7 +324,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const TexMtxInfo& i, FormatContext& ctx) + auto format(const TexMtxInfo& i, FormatContext& ctx) const { return format_to(ctx.out(), "Projection: {}\nInput form: {}\nTex gen type: {}\n" @@ -347,7 +347,7 @@ struct fmt::formatter { constexpr auto parse(format_parse_context& ctx) { return ctx.begin(); } template - auto format(const PostMtxInfo& i, FormatContext& ctx) + auto format(const PostMtxInfo& i, FormatContext& ctx) const { return format_to(ctx.out(), "Index: {}\nNormalize before send operation: {}", i.index, i.normalize ? "Yes" : "No");