mirror of
https://git.suyu.dev/suyu/suyu.git
synced 2024-11-02 13:02:44 +01:00
Merge branch 'dev' into metal-dev
This commit is contained in:
commit
c921e32d48
20 changed files with 32 additions and 30 deletions
|
@ -279,8 +279,6 @@ endif()
|
|||
# Configure C++ standard
|
||||
# ===========================
|
||||
|
||||
# boost asio's concept usage doesn't play nicely with some compilers yet.
|
||||
add_definitions(-DBOOST_ASIO_DISABLE_CONCEPTS)
|
||||
if (MSVC)
|
||||
add_compile_options($<$<COMPILE_LANGUAGE:CXX>:/std:c++20>)
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ template <typename T>
|
|||
struct fmt::formatter<T, std::enable_if_t<std::is_enum_v<T>, char>>
|
||||
: formatter<std::underlying_type_t<T>> {
|
||||
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(
|
||||
static_cast<std::underlying_type_t<T>>(value), ctx);
|
||||
}
|
||||
|
|
|
@ -262,7 +262,7 @@ struct fmt::formatter<Common::PhysicalAddress> {
|
|||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) {
|
||||
auto format(const Common::PhysicalAddress& addr, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{:#x}", static_cast<u64>(addr.GetValue()));
|
||||
}
|
||||
};
|
||||
|
@ -273,7 +273,7 @@ struct fmt::formatter<Common::ProcessAddress> {
|
|||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::ProcessAddress& addr, FormatContext& ctx) {
|
||||
auto format(const Common::ProcessAddress& addr, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{:#x}", static_cast<u64>(addr.GetValue()));
|
||||
}
|
||||
};
|
||||
|
@ -284,7 +284,7 @@ struct fmt::formatter<Common::VirtualAddress> {
|
|||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(const Common::VirtualAddress& addr, FormatContext& ctx) {
|
||||
auto format(const Common::VirtualAddress& addr, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{:#x}", static_cast<u64>(addr.GetValue()));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -22,7 +22,7 @@ struct fmt::formatter<Dynarmic::A32::CoprocReg> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
#include <thread>
|
||||
|
||||
#include <boost/algorithm/string.hpp>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "common/hex_util.h"
|
||||
#include "common/logging/log.h"
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace FileSys::SystemArchive {
|
|||
|
||||
namespace NgWord1Data {
|
||||
|
||||
constexpr std::size_t NUMBER_WORD_TXT_FILES = 0x10;
|
||||
[[maybe_unused]] constexpr std::size_t NUMBER_WORD_TXT_FILES = 0x10;
|
||||
|
||||
// Should this archive replacement mysteriously not work on a future game, consider updating.
|
||||
constexpr std::array<u8, 4> VERSION_DAT{0x0, 0x0, 0x0, 0x20}; // 11.0.1 System Version
|
||||
|
|
|
@ -15,6 +15,7 @@
|
|||
#endif
|
||||
|
||||
#include <fmt/format.h>
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "common/fs/file.h"
|
||||
#include "common/fs/fs.h"
|
||||
|
|
|
@ -167,7 +167,7 @@ constexpr inline Result GetSpanBetweenTimePoints(s64* out_seconds, const SteadyC
|
|||
template <>
|
||||
struct fmt::formatter<Service::PSC::Time::TimeType> : fmt::formatter<fmt::string_view> {
|
||||
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] {
|
||||
using Service::PSC::Time::TimeType;
|
||||
switch (type) {
|
||||
|
|
|
@ -184,7 +184,7 @@ struct fmt::formatter<Shader::Backend::GLASM::Id> {
|
|||
return ctx.begin();
|
||||
}
|
||||
template <typename FormatContext>
|
||||
auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) {
|
||||
auto format(Shader::Backend::GLASM::Id id, FormatContext& ctx) const {
|
||||
return Shader::Backend::GLASM::FormatTo<true>(ctx, id);
|
||||
}
|
||||
};
|
||||
|
@ -195,7 +195,7 @@ struct fmt::formatter<Shader::Backend::GLASM::Register> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
throw Shader::InvalidArgument("Register value type is not register");
|
||||
}
|
||||
|
@ -209,7 +209,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarRegister> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
throw Shader::InvalidArgument("Register value type is not register");
|
||||
}
|
||||
|
@ -223,7 +223,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarU32> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
case Shader::Backend::GLASM::Type::Void:
|
||||
break;
|
||||
|
@ -244,7 +244,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarS32> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
case Shader::Backend::GLASM::Type::Void:
|
||||
break;
|
||||
|
@ -265,7 +265,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF32> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
case Shader::Backend::GLASM::Type::Void:
|
||||
break;
|
||||
|
@ -286,7 +286,7 @@ struct fmt::formatter<Shader::Backend::GLASM::ScalarF64> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
case Shader::Backend::GLASM::Type::Void:
|
||||
break;
|
||||
|
|
|
@ -250,7 +250,7 @@ struct fmt::formatter<Shader::IR::Attribute> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -52,7 +52,7 @@ struct fmt::formatter<Shader::IR::Condition> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -55,7 +55,7 @@ struct fmt::formatter<Shader::IR::FlowTest> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -54,7 +54,7 @@ constexpr Type F64x2{Type::F64x2};
|
|||
constexpr Type F64x3{Type::F64x3};
|
||||
constexpr Type F64x4{Type::F64x4};
|
||||
|
||||
constexpr OpcodeMeta META_TABLE[]{
|
||||
constexpr OpcodeMeta META_TABLE[] {
|
||||
#define OPCODE(name_token, type_token, ...) \
|
||||
{ \
|
||||
.name{#name_token}, \
|
||||
|
@ -103,7 +103,7 @@ struct fmt::formatter<Shader::IR::Opcode> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -33,7 +33,7 @@ struct fmt::formatter<Shader::IR::Pred> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
return fmt::format_to(ctx.out(), "PT");
|
||||
} else {
|
||||
|
|
|
@ -319,7 +319,7 @@ struct fmt::formatter<Shader::IR::Reg> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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) {
|
||||
return fmt::format_to(ctx.out(), "RZ");
|
||||
} 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();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -102,7 +102,7 @@ struct fmt::formatter<Shader::Maxwell::Location> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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());
|
||||
}
|
||||
};
|
||||
|
|
|
@ -23,7 +23,7 @@ struct fmt::formatter<Shader::Maxwell::Opcode> {
|
|||
return ctx.begin();
|
||||
}
|
||||
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));
|
||||
}
|
||||
};
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
#include <memory>
|
||||
#include <thread>
|
||||
|
||||
#include <fmt/ranges.h>
|
||||
|
||||
#include "core/hle/service/am/applet_manager.h"
|
||||
#include "core/loader/nca.h"
|
||||
#include "core/loader/nro.h"
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
template <>
|
||||
struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) {
|
||||
auto format(VideoCore::Surface::PixelFormat format, FormatContext& ctx) const {
|
||||
using VideoCore::Surface::PixelFormat;
|
||||
const string_view name = [format] {
|
||||
switch (format) {
|
||||
|
@ -234,7 +234,7 @@ struct fmt::formatter<VideoCore::Surface::PixelFormat> : fmt::formatter<fmt::str
|
|||
template <>
|
||||
struct fmt::formatter<VideoCommon::ImageType> : fmt::formatter<fmt::string_view> {
|
||||
template <typename FormatContext>
|
||||
auto format(VideoCommon::ImageType type, FormatContext& ctx) {
|
||||
auto format(VideoCommon::ImageType type, FormatContext& ctx) const {
|
||||
const string_view name = [type] {
|
||||
using VideoCommon::ImageType;
|
||||
switch (type) {
|
||||
|
@ -262,7 +262,7 @@ struct fmt::formatter<VideoCommon::Extent3D> {
|
|||
}
|
||||
|
||||
template <typename FormatContext>
|
||||
auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) {
|
||||
auto format(const VideoCommon::Extent3D& extent, FormatContext& ctx) const {
|
||||
return fmt::format_to(ctx.out(), "{{{}, {}, {}}}", extent.width, extent.height,
|
||||
extent.depth);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue