video-core: Migrate logging macros (#3878)
* video-core: Migrate logging macros * video-core: Fixed missed clang format * video-core: Migrated LOG_GENERIC macro
This commit is contained in:
parent
3cf5c1a5b4
commit
9ae70e733f
22 changed files with 156 additions and 149 deletions
|
@ -65,15 +65,15 @@ OutputVertex OutputVertex::FromAttributeBuffer(const RasterizerRegs& regs,
|
|||
ret.color[i] = float24::FromFloat32(c < 1.0f ? c : 1.0f);
|
||||
}
|
||||
|
||||
LOG_TRACE(HW_GPU,
|
||||
"Output vertex: pos(%.2f, %.2f, %.2f, %.2f), quat(%.2f, %.2f, %.2f, %.2f), "
|
||||
"col(%.2f, %.2f, %.2f, %.2f), tc0(%.2f, %.2f), view(%.2f, %.2f, %.2f)",
|
||||
ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(),
|
||||
ret.pos.w.ToFloat32(), ret.quat.x.ToFloat32(), ret.quat.y.ToFloat32(),
|
||||
ret.quat.z.ToFloat32(), ret.quat.w.ToFloat32(), ret.color.x.ToFloat32(),
|
||||
ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(),
|
||||
ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32(), ret.view.x.ToFloat32(),
|
||||
ret.view.y.ToFloat32(), ret.view.z.ToFloat32());
|
||||
NGLOG_TRACE(HW_GPU,
|
||||
"Output vertex: pos({:.2}, {:.2}, {:.2}, {:.2}), quat({:.2}, {:.2}, {:.2}, {:.2}), "
|
||||
"col({:.2}, {:.2}, {:.2}, {:.2}), tc0({:.2}, {:.2}), view({:.2}, {:.2}, {:.2})",
|
||||
ret.pos.x.ToFloat32(), ret.pos.y.ToFloat32(), ret.pos.z.ToFloat32(),
|
||||
ret.pos.w.ToFloat32(), ret.quat.x.ToFloat32(), ret.quat.y.ToFloat32(),
|
||||
ret.quat.z.ToFloat32(), ret.quat.w.ToFloat32(), ret.color.x.ToFloat32(),
|
||||
ret.color.y.ToFloat32(), ret.color.z.ToFloat32(), ret.color.w.ToFloat32(),
|
||||
ret.tc0.u().ToFloat32(), ret.tc0.v().ToFloat32(), ret.view.x.ToFloat32(),
|
||||
ret.view.y.ToFloat32(), ret.view.z.ToFloat32());
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
|
|
@ -404,7 +404,7 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
|||
break;
|
||||
|
||||
default:
|
||||
LOG_ERROR(HW_GPU, "Unknown compare mode %x", static_cast<int>(op));
|
||||
NGLOG_ERROR(HW_GPU, "Unknown compare mode {:x}", static_cast<int>(op));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -446,9 +446,9 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
|||
}
|
||||
|
||||
default:
|
||||
LOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x%02x (%s): 0x%08x",
|
||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||
NGLOG_ERROR(HW_GPU, "Unhandled arithmetic instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||
DEBUG_ASSERT(false);
|
||||
break;
|
||||
}
|
||||
|
@ -535,9 +535,9 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
|||
}
|
||||
Record<DebugDataRecord::DEST_OUT>(debug_data, iteration, dest);
|
||||
} else {
|
||||
LOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x%02x (%s): 0x%08x",
|
||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||
NGLOG_ERROR(HW_GPU, "Unhandled multiply-add instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
@ -653,9 +653,9 @@ static void RunInterpreter(const ShaderSetup& setup, UnitState& state, DebugData
|
|||
}
|
||||
|
||||
default:
|
||||
LOG_ERROR(HW_GPU, "Unhandled instruction: 0x%02x (%s): 0x%08x",
|
||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||
NGLOG_ERROR(HW_GPU, "Unhandled instruction: 0x{:02x} ({}): 0x{:08x}",
|
||||
(int)instr.opcode.Value().EffectiveOpCode(),
|
||||
instr.opcode.Value().GetInfo().name, instr.hex);
|
||||
break;
|
||||
}
|
||||
|
||||
|
|
|
@ -161,7 +161,7 @@ static const u8 NO_SRC_REG_SWIZZLE = 0x1b;
|
|||
static const u8 NO_DEST_REG_MASK = 0xf;
|
||||
|
||||
static void LogCritical(const char* msg) {
|
||||
LOG_CRITICAL(HW_GPU, "%s", msg);
|
||||
NGLOG_CRITICAL(HW_GPU, "{}", msg);
|
||||
}
|
||||
|
||||
void JitShader::Compile_Assert(bool condition, const char* msg) {
|
||||
|
@ -858,8 +858,8 @@ void JitShader::Compile_NextInstr() {
|
|||
((*this).*instr_func)(instr);
|
||||
} else {
|
||||
// Unhandled instruction
|
||||
LOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x%02x (0x%08x)",
|
||||
static_cast<u32>(instr.opcode.Value().EffectiveOpCode()), instr.hex);
|
||||
NGLOG_CRITICAL(HW_GPU, "Unhandled instruction: 0x{:02x} (0x{:08x})",
|
||||
static_cast<u32>(instr.opcode.Value().EffectiveOpCode()), instr.hex);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -945,7 +945,7 @@ void JitShader::Compile(const std::array<u32, MAX_PROGRAM_CODE_LENGTH>* program_
|
|||
ready();
|
||||
|
||||
ASSERT_MSG(getSize() <= MAX_SHADER_SIZE, "Compiled a shader that exceeds the allocated size!");
|
||||
LOG_DEBUG(HW_GPU, "Compiled shader size=%lu", getSize());
|
||||
NGLOG_DEBUG(HW_GPU, "Compiled shader size={}", getSize());
|
||||
}
|
||||
|
||||
JitShader::JitShader() : Xbyak::CodeGenerator(MAX_SHADER_SIZE) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue