mirror of
https://codeberg.org/yuzu-emu/yuzu.git
synced 2025-12-16 12:09:04 +00:00
Use fmt 11.0.0
This commit is contained in:
parent
43df1d4512
commit
c39939fd8e
@ -299,7 +299,7 @@ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${PROJECT_BINARY_DIR}/bin)
|
|||||||
# Enforce the search mode of non-required packages for better and shorter failure messages
|
# Enforce the search mode of non-required packages for better and shorter failure messages
|
||||||
find_package(Boost 1.79.0 REQUIRED context)
|
find_package(Boost 1.79.0 REQUIRED context)
|
||||||
find_package(enet 1.3 MODULE)
|
find_package(enet 1.3 MODULE)
|
||||||
find_package(fmt 9 REQUIRED)
|
find_package(fmt 11 REQUIRED)
|
||||||
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
find_package(LLVM 17.0.2 MODULE COMPONENTS Demangle)
|
||||||
find_package(lz4 REQUIRED)
|
find_package(lz4 REQUIRED)
|
||||||
find_package(nlohmann_json 3.8 REQUIRED)
|
find_package(nlohmann_json 3.8 REQUIRED)
|
||||||
|
|||||||
@ -30,6 +30,7 @@
|
|||||||
|
|
||||||
#include <array>
|
#include <array>
|
||||||
#include <cstdint>
|
#include <cstdint>
|
||||||
|
#include <memory>
|
||||||
|
|
||||||
using u8 = std::uint8_t; ///< 8-bit unsigned byte
|
using u8 = std::uint8_t; ///< 8-bit unsigned byte
|
||||||
using u16 = std::uint16_t; ///< 16-bit unsigned short
|
using u16 = std::uint16_t; ///< 16-bit unsigned short
|
||||||
|
|||||||
@ -14,7 +14,7 @@ template <typename T>
|
|||||||
struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
|
struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
|
||||||
: formatter<std::underlying_type_t<T>> {
|
: formatter<std::underlying_type_t<T>> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const T& value, FormatContext& ctx) -> decltype(ctx.out()) {
|
auto format(const T& value, FormatContext& ctx) const -> decltype(ctx.out()) {
|
||||||
return fmt::formatter<std::underlying_type_t<T>>::format(
|
return fmt::formatter<std::underlying_type_t<T>>::format(
|
||||||
static_cast<std::underlying_type_t<T>>(value), ctx);
|
static_cast<std::underlying_type_t<T>>(value), ctx);
|
||||||
}
|
}
|
||||||
|
|||||||
@ -7,6 +7,7 @@
|
|||||||
#include <string_view>
|
#include <string_view>
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
#include <fmt/ranges.h>
|
||||||
|
|
||||||
#include "common/logging/formatter.h"
|
#include "common/logging/formatter.h"
|
||||||
#include "common/logging/types.h"
|
#include "common/logging/types.h"
|
||||||
|
|||||||
@ -22,7 +22,7 @@ struct fmt::formatter<Dynarmic::A32::CoprocReg> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) {
|
auto format(const Dynarmic::A32::CoprocReg& reg, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "cp{}", static_cast<size_t>(reg));
|
return fmt::format_to(ctx.out(), "cp{}", static_cast<size_t>(reg));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -167,7 +167,7 @@ constexpr inline Result GetSpanBetweenTimePoints(s64* out_seconds, const SteadyC
|
|||||||
template <>
|
template <>
|
||||||
struct fmt::formatter<Service::PSC::Time::TimeType> : fmt::formatter<fmt::string_view> {
|
struct fmt::formatter<Service::PSC::Time::TimeType> : fmt::formatter<fmt::string_view> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) {
|
auto format(Service::PSC::Time::TimeType type, FormatContext& ctx) const {
|
||||||
const string_view name = [type] {
|
const string_view name = [type] {
|
||||||
using Service::PSC::Time::TimeType;
|
using Service::PSC::Time::TimeType;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
@ -270,4 +270,4 @@ struct fmt::formatter<Service::PSC::Time::ContinuousAdjustmentTimePoint>
|
|||||||
time_point.rtc_offset, time_point.diff_scale, time_point.shift_amount,
|
time_point.rtc_offset, time_point.diff_scale, time_point.shift_amount,
|
||||||
time_point.lower, time_point.upper);
|
time_point.lower, time_point.upper);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -195,7 +195,7 @@ struct fmt::formatter<Shader::Backend::GLASM::Register> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) {
|
auto format(const Shader::Backend::GLASM::Register& value, FormatContext& ctx) const {
|
||||||
if (value.type != Shader::Backend::GLASM::Type::Register) {
|
if (value.type != Shader::Backend::GLASM::Type::Register) {
|
||||||
throw Shader::InvalidArgument("Register value type is not register");
|
throw Shader::InvalidArgument("Register value type is not register");
|
||||||
}
|
}
|
||||||
@ -209,7 +209,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarRegister> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) {
|
auto format(const Shader::Backend::GLASM::ScalarRegister& value, FormatContext& ctx) const {
|
||||||
if (value.type != Shader::Backend::GLASM::Type::Register) {
|
if (value.type != Shader::Backend::GLASM::Type::Register) {
|
||||||
throw Shader::InvalidArgument("Register value type is not register");
|
throw Shader::InvalidArgument("Register value type is not register");
|
||||||
}
|
}
|
||||||
@ -223,7 +223,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarU32> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) {
|
auto format(const Shader::Backend::GLASM::ScalarU32& value, FormatContext& ctx) const {
|
||||||
switch (value.type) {
|
switch (value.type) {
|
||||||
case Shader::Backend::GLASM::Type::Void:
|
case Shader::Backend::GLASM::Type::Void:
|
||||||
break;
|
break;
|
||||||
@ -244,7 +244,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarS32> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) {
|
auto format(const Shader::Backend::GLASM::ScalarS32& value, FormatContext& ctx) const {
|
||||||
switch (value.type) {
|
switch (value.type) {
|
||||||
case Shader::Backend::GLASM::Type::Void:
|
case Shader::Backend::GLASM::Type::Void:
|
||||||
break;
|
break;
|
||||||
@ -265,7 +265,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF32> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) {
|
auto format(const Shader::Backend::GLASM::ScalarF32& value, FormatContext& ctx) const {
|
||||||
switch (value.type) {
|
switch (value.type) {
|
||||||
case Shader::Backend::GLASM::Type::Void:
|
case Shader::Backend::GLASM::Type::Void:
|
||||||
break;
|
break;
|
||||||
@ -286,7 +286,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF64> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) {
|
auto format(const Shader::Backend::GLASM::ScalarF64& value, FormatContext& ctx) const {
|
||||||
switch (value.type) {
|
switch (value.type) {
|
||||||
case Shader::Backend::GLASM::Type::Void:
|
case Shader::Backend::GLASM::Type::Void:
|
||||||
break;
|
break;
|
||||||
|
|||||||
@ -250,7 +250,7 @@ struct fmt::formatter<Shader::IR::Attribute> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) {
|
auto format(const Shader::IR::Attribute& attribute, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(attribute));
|
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(attribute));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -52,7 +52,7 @@ struct fmt::formatter<Shader::IR::Condition> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Condition& cond, FormatContext& ctx) {
|
auto format(const Shader::IR::Condition& cond, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(cond));
|
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(cond));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -55,7 +55,7 @@ struct fmt::formatter<Shader::IR::FlowTest> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) {
|
auto format(const Shader::IR::FlowTest& flow_test, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(flow_test));
|
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(flow_test));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -103,7 +103,7 @@ struct fmt::formatter<Shader::IR::Opcode> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Opcode& op, FormatContext& ctx) {
|
auto format(const Shader::IR::Opcode& op, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op));
|
return fmt::format_to(ctx.out(), "{}", Shader::IR::NameOf(op));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -33,7 +33,7 @@ struct fmt::formatter<Shader::IR::Pred> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Pred& pred, FormatContext& ctx) {
|
auto format(const Shader::IR::Pred& pred, FormatContext& ctx) const {
|
||||||
if (pred == Shader::IR::Pred::PT) {
|
if (pred == Shader::IR::Pred::PT) {
|
||||||
return fmt::format_to(ctx.out(), "PT");
|
return fmt::format_to(ctx.out(), "PT");
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@ -319,7 +319,7 @@ struct fmt::formatter<Shader::IR::Reg> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Reg& reg, FormatContext& ctx) {
|
auto format(const Shader::IR::Reg& reg, FormatContext& ctx) const {
|
||||||
if (reg == Shader::IR::Reg::RZ) {
|
if (reg == Shader::IR::Reg::RZ) {
|
||||||
return fmt::format_to(ctx.out(), "RZ");
|
return fmt::format_to(ctx.out(), "RZ");
|
||||||
} else if (static_cast<int>(reg) >= 0 && static_cast<int>(reg) < 255) {
|
} else if (static_cast<int>(reg) >= 0 && static_cast<int>(reg) < 255) {
|
||||||
|
|||||||
@ -54,7 +54,7 @@ struct fmt::formatter<Shader::IR::Type> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::IR::Type& type, FormatContext& ctx) {
|
auto format(const Shader::IR::Type& type, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", NameOf(type));
|
return fmt::format_to(ctx.out(), "{}", NameOf(type));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -102,7 +102,7 @@ struct fmt::formatter<Shader::Maxwell::Location> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) {
|
auto format(const Shader::Maxwell::Location& location, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{:04x}", location.Offset());
|
return fmt::format_to(ctx.out(), "{:04x}", location.Offset());
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -23,7 +23,7 @@ struct fmt::formatter<Shader::Maxwell::Opcode> {
|
|||||||
return ctx.begin();
|
return ctx.begin();
|
||||||
}
|
}
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) {
|
auto format(const Shader::Maxwell::Opcode& opcode, FormatContext& ctx) const {
|
||||||
return fmt::format_to(ctx.out(), "{}", NameOf(opcode));
|
return fmt::format_to(ctx.out(), "{}", NameOf(opcode));
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|||||||
@ -10,6 +10,7 @@
|
|||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <fmt/format.h>
|
#include <fmt/format.h>
|
||||||
|
#include <fmt/ranges.h>
|
||||||
|
|
||||||
#include "common/logging/log.h"
|
#include "common/logging/log.h"
|
||||||
#include "common/polyfill_ranges.h"
|
#include "common/polyfill_ranges.h"
|
||||||
|
|||||||
@ -13,7 +13,7 @@
|
|||||||
template <>
|
template <>
|
||||||
struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::string_view> {
|
struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::string_view> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) {
|
auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) const {
|
||||||
using VideoCore::Surface::PixelFormat;
|
using VideoCore::Surface::PixelFormat;
|
||||||
const string_view name = [format] {
|
const string_view name = [format] {
|
||||||
switch (format) {
|
switch (format) {
|
||||||
@ -234,7 +234,7 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
|
|||||||
template <>
|
template <>
|
||||||
struct fmt::formatter<VideoCommon::ImageType> : fmt::formatter<fmt::string_view> {
|
struct fmt::formatter<VideoCommon::ImageType> : fmt::formatter<fmt::string_view> {
|
||||||
template <typename FormatContext>
|
template <typename FormatContext>
|
||||||
auto format(VideoCommon::ImageType type, FormatContext& ctx) {
|
auto format(VideoCommon::ImageType type, FormatContext& ctx) const {
|
||||||
const string_view name = [type] {
|
const string_view name = [type] {
|
||||||
using VideoCommon::ImageType;
|
using VideoCommon::ImageType;
|
||||||
switch (type) {
|
switch (type) {
|
||||||
|
|||||||
@ -59,7 +59,7 @@
|
|||||||
},
|
},
|
||||||
{
|
{
|
||||||
"name": "fmt",
|
"name": "fmt",
|
||||||
"version": "10.1.1"
|
"version": "11.0.0"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user