externals: Update fmt. (#7015)

This commit is contained in:
Steveice10 2023-09-27 03:29:13 -07:00 committed by GitHub
parent d0b8974845
commit 327a00b4d5
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 26 additions and 24 deletions

2
externals/fmt vendored

@ -1 +1 @@
Subproject commit a33701196adfad74917046096bf5a2aa0ab0bb50 Subproject commit 2dd4fa8742fdac36468f8d8ea3e06e78215551f8

View file

@ -248,7 +248,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
LOG_ERROR(Audio_DSP, LOG_ERROR(Audio_DSP,
"Skipping embedded buffer sample! Game passed in improper value for length. " "Skipping embedded buffer sample! Game passed in improper value for length. "
"addr {:X} length {:X}", "addr {:X} length {:X}",
config.physical_address, config.length); static_cast<u32>(config.physical_address), static_cast<u32>(config.length));
} else { } else {
state.input_queue.emplace(Buffer{ state.input_queue.emplace(Buffer{
config.physical_address, config.physical_address,
@ -285,7 +285,7 @@ void Source::ParseConfig(SourceConfiguration::Configuration& config,
LOG_ERROR(Audio_DSP, LOG_ERROR(Audio_DSP,
"Skipping buffer queue sample! Game passed in improper value for " "Skipping buffer queue sample! Game passed in improper value for "
"length. addr {:X} length {:X}", "length. addr {:X} length {:X}",
b.physical_address, b.length); static_cast<u32>(b.physical_address), static_cast<u32>(b.length));
} else { } else {
state.input_queue.emplace(Buffer{ state.input_queue.emplace(Buffer{
b.physical_address, b.physical_address,

View file

@ -124,8 +124,9 @@ void Module::Interface::Open(Kernel::HLERequestContext& ctx) {
LOG_DEBUG(Service_CECD, LOG_DEBUG(Service_CECD,
"called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, " "called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, "
"open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", "open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}",
ncch_program_id, path_type, path.AsString(), open_mode.raw, open_mode.unknown, ncch_program_id, path_type, path.AsString(), open_mode.raw, open_mode.unknown.Value(),
open_mode.read, open_mode.write, open_mode.create, open_mode.check); open_mode.read.Value(), open_mode.write.Value(), open_mode.create.Value(),
open_mode.check.Value());
} }
void Module::Interface::Read(Kernel::HLERequestContext& ctx) { 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={}", "path={}, open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}",
session_data->ncch_program_id, session_data->data_path_type, session_data->ncch_program_id, session_data->data_path_type,
session_data->path.AsString(), session_data->open_mode.raw, session_data->path.AsString(), session_data->open_mode.raw,
session_data->open_mode.unknown, session_data->open_mode.read, session_data->open_mode.unknown.Value(), session_data->open_mode.read.Value(),
session_data->open_mode.write, session_data->open_mode.create, session_data->open_mode.write.Value(), session_data->open_mode.create.Value(),
session_data->open_mode.check); session_data->open_mode.check.Value());
IPC::RequestBuilder rb = rp.MakeBuilder(2, 2); IPC::RequestBuilder rb = rp.MakeBuilder(2, 2);
switch (session_data->data_path_type) { 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={}", "path={}, open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}",
session_data->ncch_program_id, session_data->data_path_type, session_data->ncch_program_id, session_data->data_path_type,
session_data->path.AsString(), session_data->open_mode.raw, session_data->path.AsString(), session_data->open_mode.raw,
session_data->open_mode.unknown, session_data->open_mode.read, session_data->open_mode.unknown.Value(), session_data->open_mode.read.Value(),
session_data->open_mode.write, session_data->open_mode.create, session_data->open_mode.write.Value(), session_data->open_mode.create.Value(),
session_data->open_mode.check); session_data->open_mode.check.Value());
IPC::RequestBuilder rb = rp.MakeBuilder(1, 2); IPC::RequestBuilder rb = rp.MakeBuilder(1, 2);
switch (session_data->data_path_type) { 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} " "called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, buffer_size={:#x} "
"open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", "open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}",
ncch_program_id, path_type, path.AsString(), buffer_size, open_mode.raw, 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.unknown.Value(), open_mode.read.Value(), open_mode.write.Value(),
open_mode.check); open_mode.create.Value(), open_mode.check.Value());
} }
void Module::Interface::OpenAndRead(Kernel::HLERequestContext& ctx) { 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} " "called, ncch_program_id={:#010x}, path_type={:#04x}, path={}, buffer_size={:#x} "
"open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}", "open_mode: raw={:#x}, unknown={}, read={}, write={}, create={}, check={}",
ncch_program_id, path_type, path.AsString(), buffer_size, open_mode.raw, 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.unknown.Value(), open_mode.read.Value(), open_mode.write.Value(),
open_mode.check); open_mode.create.Value(), open_mode.check.Value());
} }
std::string Module::EncodeBase64(std::span<const u8> in) const { std::string Module::EncodeBase64(std::span<const u8> in) const {

View file

@ -155,8 +155,8 @@ void ServiceFrameworkBase::ReportUnimplementedFunction(u32* cmd_buf, const Funct
std::string result = std::string result =
fmt::format("function '{}': port='{}' cmd_buf={{[0]={:#x} (0x{:04X}, {}, {})", fmt::format("function '{}': port='{}' cmd_buf={{[0]={:#x} (0x{:04X}, {}, {})",
function_name, service_name, header.raw, header.command_id, function_name, service_name, header.raw, header.command_id.Value(),
header.normal_params_size, header.translate_params_size); header.normal_params_size.Value(), header.translate_params_size.Value());
for (int i = 1; i <= num_params; ++i) { for (int i = 1; i <= num_params; ++i) {
result += fmt::format(", [{}]={:#x}", i, cmd_buf[i]); result += fmt::format(", [{}]={:#x}", i, cmd_buf[i]);
} }

View file

@ -186,7 +186,7 @@ struct Regs {
return fmt::format("from {:#x} to {:#x} with {} scaling and stride {}, width {}", return fmt::format("from {:#x} to {:#x} with {} scaling and stride {}, width {}",
GetPhysicalInputAddress(), GetPhysicalOutputAddress(), GetPhysicalInputAddress(), GetPhysicalOutputAddress(),
scaling == NoScale ? "no" : (scaling == ScaleX ? "X" : "XY"), scaling == NoScale ? "no" : (scaling == ScaleX ? "X" : "XY"),
input_width, output_width); input_width.Value(), output_width.Value());
} }
union { union {

View file

@ -648,7 +648,7 @@ static void WriteLighting(std::string& out, const PicaFSConfig& config) {
// Compute fragment normals and tangents // Compute fragment normals and tangents
const auto perturbation = [&] { 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) { 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"; "vec3 tangent = quaternion_rotate(normalized_normquat, surface_tangent);\n";
if (lighting.enable_shadow) { 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) { if (lighting.shadow_invert) {
out += fmt::format("vec4 shadow = vec4(1.0) - {};\n", shadow_texture); out += fmt::format("vec4 shadow = vec4(1.0) - {};\n", shadow_texture);
} else { } else {
@ -767,7 +768,7 @@ static void WriteLighting(std::string& out, const PicaFSConfig& config) {
// Write the code to emulate each enabled light // Write the code to emulate each enabled light
for (unsigned light_index = 0; light_index < lighting.src_num; ++light_index) { for (unsigned light_index = 0; light_index < lighting.src_num; ++light_index) {
const auto& light_config = lighting.light[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) // Compute light vector (directional or positional)
if (light_config.directional) { if (light_config.directional) {
@ -1117,7 +1118,7 @@ float ProcTexNoiseCoef(vec2 x) {
out += "vec4 ProcTex() {\n"; out += "vec4 ProcTex() {\n";
if (config.state.proctex.coord < 3) { 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 { } else {
LOG_CRITICAL(Render_OpenGL, "Unexpected proctex.coord >= 3"); LOG_CRITICAL(Render_OpenGL, "Unexpected proctex.coord >= 3");
out += "vec2 uv = abs(texcoord0);\n"; out += "vec2 uv = abs(texcoord0);\n";
@ -1497,7 +1498,7 @@ vec4 shadowTextureCube(vec2 uv, float w) {
out += "return shadowTextureCube(texcoord0, texcoord0_w);"; out += "return shadowTextureCube(texcoord0, texcoord0_w);";
break; break;
default: 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(); UNIMPLEMENTED();
out += "return texture(tex0, texcoord0);"; out += "return texture(tex0, texcoord0);";
break; break;

View file

@ -976,7 +976,7 @@ void FragmentModule::DefineTexSampler(u32 texture_unit) {
// return "shadowTextureCube(texcoord0, texcoord0_w)"; // return "shadowTextureCube(texcoord0, texcoord0_w)";
break; break;
default: 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(); UNIMPLEMENTED();
ret_val = zero_vec; ret_val = zero_vec;
break; break;