From 327a00b4d55f66657a018548e8b53946f0dfee7e Mon Sep 17 00:00:00 2001 From: Steveice10 <1269164+Steveice10@users.noreply.github.com> Date: Wed, 27 Sep 2023 03:29:13 -0700 Subject: [PATCH] externals: Update fmt. (#7015) --- externals/fmt | 2 +- src/audio_core/hle/source.cpp | 4 +-- src/core/hle/service/cecd/cecd.cpp | 25 ++++++++++--------- src/core/hle/service/service.cpp | 4 +-- src/core/hw/gpu.h | 2 +- .../renderer_vulkan/vk_shader_gen.cpp | 11 ++++---- .../renderer_vulkan/vk_shader_gen_spv.cpp | 2 +- 7 files changed, 26 insertions(+), 24 deletions(-) diff --git a/externals/fmt b/externals/fmt index a33701196..2dd4fa874 160000 --- a/externals/fmt +++ b/externals/fmt @@ -1 +1 @@ -Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 +Subproject commit 2dd4fa8742fdac36468f8d8ea3e06e78215551f8 diff --git a/src/audio_core/hle/source.cpp b/src/audio_core/hle/source.cpp index bb723716c..9524e8522 100644 --- a/src/audio_core/hle/source.cpp +++ b/src/audio_core/hle/source.cpp @@ -248,7 +248,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config, LOG_ERROR(Audio_DSP, "Skipping embedded buffer sample! Game passed in improper value for length. " "addr {:X} length {:X}", - config.physical_address, config.length); + static_cast(config.physical_address), static_cast(config.length)); } else { state.input_queue.emplace(Buffer{ config.physical_address, @@ -285,7 +285,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config, LOG_ERROR(Audio_DSP, "Skipping buffer queue sample! Game passed in improper value for " "length. addr {:X} length {:X}", - b.physical_address, b.length); + static_cast(b.physical_address), static_cast(b.length)); } else { state.input_queue.emplace(Buffer{ b.physical_address, diff --git a/src/core/hle/service/cecd/cecd.cpp b/src/core/hle/service/cecd/cecd.cpp index 2daa1116c..5d5f37ef8 100644 --- a/src/core/hle/service/cecd/cecd.cpp +++ b/src/core/hle/service/cecd/cecd.cpp @@ -124,8 +124,9 @@ void Module::Interface::Open(Kernel::HLERequestContext& ctx) { LOG_DEBUG(Service_CECD, "called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, " "open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", - ncch_program_id, path_type, path.AsString(), open_mode.raw, open_mode.unknown, - open_mode.read, open_mode.write, open_mode.create, open_mode.check); + ncch_program_id, path_type, path.AsString(), open_mode.raw, open_mode.unknown.Value(), + open_mode.read.Value(), open_mode.write.Value(), open_mode.create.Value(), + open_mode.check.Value()); } void Module::Interface::Read(Kernel::HLERequestContext& ctx) { @@ -139,9 +140,9 @@ void Module::Interface::Read(Kernel::HLERequestContext& ctx) { "path={}, open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", session_data->ncch_program_id, session_data->data_path_type, session_data->path.AsString(), session_data->open_mode.raw, - session_data->open_mode.unknown, session_data->open_mode.read, - session_data->open_mode.write, session_data->open_mode.create, - session_data->open_mode.check); + session_data->open_mode.unknown.Value(), session_data->open_mode.read.Value(), + session_data->open_mode.write.Value(), session_data->open_mode.create.Value(), + session_data->open_mode.check.Value()); IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); switch (session_data->data_path_type) { @@ -344,9 +345,9 @@ void Module::Interface::Write(Kernel::HLERequestContext& ctx) { "path={}, open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", session_data->ncch_program_id, session_data->data_path_type, session_data->path.AsString(), session_data->open_mode.raw, - session_data->open_mode.unknown, session_data->open_mode.read, - session_data->open_mode.write, session_data->open_mode.create, - session_data->open_mode.check); + session_data->open_mode.unknown.Value(), session_data->open_mode.read.Value(), + session_data->open_mode.write.Value(), session_data->open_mode.create.Value(), + session_data->open_mode.check.Value()); IPC::RequestBuilder rb = rp.MakeBuilder(1, 2); switch (session_data->data_path_type) { @@ -778,8 +779,8 @@ void Module::Interface::OpenAndWrite(Kernel::HLERequestContext& ctx) { "called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, buffer_size={:#x} " "open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", ncch_program_id, path_type, path.AsString(), buffer_size, open_mode.raw, - open_mode.unknown, open_mode.read, open_mode.write, open_mode.create, - open_mode.check); + open_mode.unknown.Value(), open_mode.read.Value(), open_mode.write.Value(), + open_mode.create.Value(), open_mode.check.Value()); } void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) { @@ -831,8 +832,8 @@ void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) { "called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, buffer_size={:#x} " "open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", ncch_program_id, path_type, path.AsString(), buffer_size, open_mode.raw, - open_mode.unknown, open_mode.read, open_mode.write, open_mode.create, - open_mode.check); + open_mode.unknown.Value(), open_mode.read.Value(), open_mode.write.Value(), + open_mode.create.Value(), open_mode.check.Value()); } std::string Module::EncodeBase64(std::span in) const { diff --git a/src/core/hle/service/service.cpp b/src/core/hle/service/service.cpp index 668b6cbb5..1e4c071f2 100644 --- a/src/core/hle/service/service.cpp +++ b/src/core/hle/service/service.cpp @@ -155,8 +155,8 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(u32* cmd_buf, const Funct std::string result = fmt::format("function '{}': port='{}' cmd_buf={{[0]={:#x} (0x{:04X}, {}, {})", - function_name, service_name, header.raw, header.command_id, - header.normal_params_size, header.translate_params_size); + function_name, service_name, header.raw, header.command_id.Value(), + header.normal_params_size.Value(), header.translate_params_size.Value()); for (int i = 1; i <= num_params; ++i) { result += fmt::format(", [{}]={:#x}", i, cmd_buf[i]); } diff --git a/src/core/hw/gpu.h b/src/core/hw/gpu.h index 36c6e886e..418ab9747 100644 --- a/src/core/hw/gpu.h +++ b/src/core/hw/gpu.h @@ -186,7 +186,7 @@ struct Regs { return fmt::format("from {:#x} to {:#x} with {} scaling and stride {}, width {}", GetPhysicalInputAddress(), GetPhysicalOutputAddress(), scaling == NoScale ? "no" : (scaling == ScaleX ? "X" : "XY"), - input_width, output_width); + input_width.Value(), output_width.Value()); } union { diff --git a/src/video_core/renderer_vulkan/vk_shader_gen.cpp b/src/video_core/renderer_vulkan/vk_shader_gen.cpp index 59fd56a8c..885213b3c 100644 --- a/src/video_core/renderer_vulkan/vk_shader_gen.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_gen.cpp @@ -648,7 +648,7 @@ static void WriteLighting(std::string& out, const PicaFSConfig& config) { // Compute fragment normals and tangents const auto perturbation = [&] { - return fmt::format("2.0 * (sampleTexUnit{}()).rgb - 1.0", lighting.bump_selector); + return fmt::format("2.0 * (sampleTexUnit{}()).rgb - 1.0", lighting.bump_selector.Value()); }; switch (lighting.bump_mode) { @@ -692,7 +692,8 @@ static void WriteLighting(std::string& out, const PicaFSConfig& config) { "vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);\n"; if (lighting.enable_shadow) { - std::string shadow_texture = fmt::format("sampleTexUnit{}()", lighting.shadow_selector); + std::string shadow_texture = + fmt::format("sampleTexUnit{}()", lighting.shadow_selector.Value()); if (lighting.shadow_invert) { out += fmt::format("vec4 shadow = vec4(1.0) - {};\n", shadow_texture); } else { @@ -767,7 +768,7 @@ static void WriteLighting(std::string& out, const PicaFSConfig& config) { // Write the code to emulate each enabled light for (unsigned light_index = 0; light_index < lighting.src_num; ++light_index) { const auto& light_config = lighting.light[light_index]; - const std::string light_src = fmt::format("light_src[{}]", light_config.num); + const std::string light_src = fmt::format("light_src[{}]", light_config.num.Value()); // Compute light vector (directional or positional) if (light_config.directional) { @@ -1117,7 +1118,7 @@ float ProcTexNoiseCoef(vec2 x) { out += "vec4 ProcTex() {\n"; if (config.state.proctex.coord < 3) { - out += fmt::format("vec2 uv = abs(texcoord{});\n", config.state.proctex.coord); + out += fmt::format("vec2 uv = abs(texcoord{});\n", config.state.proctex.coord.Value()); } else { LOG_CRITICAL(Render_OpenGL, "Unexpected proctex.coord >= 3"); out += "vec2 uv = abs(texcoord0);\n"; @@ -1497,7 +1498,7 @@ vec4 shadowTextureCube(vec2 uv, float w) { out += "return shadowTextureCube(texcoord0, texcoord0_w);"; break; default: - LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}", state.texture0_type); + LOG_CRITICAL(HW_GPU, "Unhandled texture type {:x}", state.texture0_type.Value()); UNIMPLEMENTED(); out += "return texture(tex0, texcoord0);"; break; diff --git a/src/video_core/renderer_vulkan/vk_shader_gen_spv.cpp b/src/video_core/renderer_vulkan/vk_shader_gen_spv.cpp index f1efcf86f..89ac2d7f9 100644 --- a/src/video_core/renderer_vulkan/vk_shader_gen_spv.cpp +++ b/src/video_core/renderer_vulkan/vk_shader_gen_spv.cpp @@ -976,7 +976,7 @@ void FragmentModule::DefineTexSampler(u32 texture_unit) { // return "shadowTextureCube(texcoord0, texcoord0_w)"; break; default: - LOG_CRITICAL(Render_Vulkan, "Unhandled texture type {:x}", state.texture0_type); + LOG_CRITICAL(Render_Vulkan, "Unhandled texture type {:x}", state.texture0_type.Value()); UNIMPLEMENTED(); ret_val = zero_vec; break;