mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2024-11-14 21:37:52 -07:00
Software: Migrate logging over to fmt
Migrates the software backend over to the fmt-capable logger.
This commit is contained in:
parent
413d64e7fc
commit
23a8baa605
@ -56,7 +56,9 @@ static void SetPixelAlphaOnly(u32 offset, u8 a)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Unsupported pixel format: %i", static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
ERROR_LOG_FMT(VIDEO, "Unsupported pixel format: {}",
|
||||
static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -87,7 +89,7 @@ static void SetPixelColorOnly(u32 offset, u8* rgb)
|
||||
break;
|
||||
case PEControl::RGB565_Z16:
|
||||
{
|
||||
INFO_LOG(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
INFO_LOG_FMT(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
u32 src = *(u32*)rgb;
|
||||
u32* dst = (u32*)&efb[offset];
|
||||
u32 val = *dst & 0xff000000;
|
||||
@ -96,7 +98,9 @@ static void SetPixelColorOnly(u32 offset, u8* rgb)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Unsupported pixel format: %i", static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
ERROR_LOG_FMT(VIDEO, "Unsupported pixel format: {}",
|
||||
static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -128,7 +132,7 @@ static void SetPixelAlphaColor(u32 offset, u8* color)
|
||||
break;
|
||||
case PEControl::RGB565_Z16:
|
||||
{
|
||||
INFO_LOG(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
INFO_LOG_FMT(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
u32 src = *(u32*)color;
|
||||
u32* dst = (u32*)&efb[offset];
|
||||
u32 val = *dst & 0xff000000;
|
||||
@ -137,7 +141,9 @@ static void SetPixelAlphaColor(u32 offset, u8* color)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Unsupported pixel format: %i", static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
ERROR_LOG_FMT(VIDEO, "Unsupported pixel format: {}",
|
||||
static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -159,11 +165,12 @@ static u32 GetPixelColor(u32 offset)
|
||||
Convert6To8((src >> 18) & 0x3f) << 24; // Red
|
||||
|
||||
case PEControl::RGB565_Z16:
|
||||
INFO_LOG(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
INFO_LOG_FMT(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
return 0xff | ((src & 0x00ffffff) << 8);
|
||||
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Unsupported pixel format: %i", static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
ERROR_LOG_FMT(VIDEO, "Unsupported pixel format: {}",
|
||||
static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
@ -184,7 +191,7 @@ static void SetPixelDepth(u32 offset, u32 depth)
|
||||
break;
|
||||
case PEControl::RGB565_Z16:
|
||||
{
|
||||
INFO_LOG(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
INFO_LOG_FMT(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
u32* dst = (u32*)&efb[offset];
|
||||
u32 val = *dst & 0xff000000;
|
||||
val |= depth & 0x00ffffff;
|
||||
@ -192,7 +199,9 @@ static void SetPixelDepth(u32 offset, u32 depth)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Unsupported pixel format: %i", static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
ERROR_LOG_FMT(VIDEO, "Unsupported pixel format: {}",
|
||||
static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
@ -211,12 +220,14 @@ static u32 GetPixelDepth(u32 offset)
|
||||
break;
|
||||
case PEControl::RGB565_Z16:
|
||||
{
|
||||
INFO_LOG(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
INFO_LOG_FMT(VIDEO, "RGB565_Z16 is not supported correctly yet");
|
||||
depth = (*(u32*)&efb[offset]) & 0x00ffffff;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Unsupported pixel format: %i", static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
ERROR_LOG_FMT(VIDEO, "Unsupported pixel format: {}",
|
||||
static_cast<int>(bpmem.zcontrol.pixel_format));
|
||||
break;
|
||||
}
|
||||
|
||||
return depth;
|
||||
@ -554,7 +565,7 @@ void EncodeXFB(u8* xfb_in_ram, u32 memory_stride, const MathUtil::Rectangle<int>
|
||||
{
|
||||
if (!xfb_in_ram)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Tried to copy to invalid XFB address");
|
||||
WARN_LOG_FMT(VIDEO, "Tried to copy to invalid XFB address");
|
||||
return;
|
||||
}
|
||||
|
||||
@ -569,7 +580,7 @@ void EncodeXFB(u8* xfb_in_ram, u32 memory_stride, const MathUtil::Rectangle<int>
|
||||
// copy always has an even width, which might not be true.
|
||||
if (left & 1 || right & 1)
|
||||
{
|
||||
WARN_LOG(VIDEO, "Trying to copy XFB to from unaligned EFB source");
|
||||
WARN_LOG_FMT(VIDEO, "Trying to copy XFB to from unaligned EFB source");
|
||||
// this will show up as wrongly encoded
|
||||
}
|
||||
|
||||
@ -677,7 +688,8 @@ bool ZCompare(u16 x, u16 y, u32 z)
|
||||
break;
|
||||
default:
|
||||
pass = false;
|
||||
ERROR_LOG(VIDEO, "Bad Z compare mode %i", (int)bpmem.zmode.func);
|
||||
ERROR_LOG_FMT(VIDEO, "Bad Z compare mode {}", static_cast<int>(bpmem.zmode.func));
|
||||
break;
|
||||
}
|
||||
|
||||
if (pass && bpmem.zmode.updateenable)
|
||||
|
@ -41,13 +41,13 @@ bool SWOGLWindow::Initialize(const WindowSystemInfo& wsi)
|
||||
// Init extension support.
|
||||
if (!GLExtensions::Init(m_gl_context.get()))
|
||||
{
|
||||
ERROR_LOG(VIDEO, "GLExtensions::Init failed!Does your video card support OpenGL 2.0?");
|
||||
ERROR_LOG_FMT(VIDEO, "GLExtensions::Init failed!Does your video card support OpenGL 2.0?");
|
||||
return false;
|
||||
}
|
||||
else if (GLExtensions::Version() < 310)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "OpenGL Version %d detected, but at least 3.1 is required.",
|
||||
GLExtensions::Version());
|
||||
ERROR_LOG_FMT(VIDEO, "OpenGL Version {} detected, but at least 3.1 is required.",
|
||||
GLExtensions::Version());
|
||||
return false;
|
||||
}
|
||||
|
||||
|
@ -110,7 +110,7 @@ void SWVertexLoader::SetFormat(u8 attributeIndex, u8 primitiveType)
|
||||
xfmem.MatrixIndexB.Tex6MtxIdx != g_main_cp_state.matrix_index_b.Tex6MtxIdx ||
|
||||
xfmem.MatrixIndexB.Tex7MtxIdx != g_main_cp_state.matrix_index_b.Tex7MtxIdx)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Matrix indices don't match");
|
||||
ERROR_LOG_FMT(VIDEO, "Matrix indices don't match");
|
||||
}
|
||||
|
||||
m_vertex.posMtx = xfmem.MatrixIndexA.PosNormalMtxIdx;
|
||||
|
@ -37,7 +37,7 @@ void SetupUnit::SetupVertex()
|
||||
SetupQuad();
|
||||
break;
|
||||
case OpcodeDecoder::GX_DRAW_QUADS_2:
|
||||
WARN_LOG(VIDEO, "Non-standard primitive drawing command GL_DRAW_QUADS_2");
|
||||
WARN_LOG_FMT(VIDEO, "Non-standard primitive drawing command GL_DRAW_QUADS_2");
|
||||
SetupQuad();
|
||||
break;
|
||||
case OpcodeDecoder::GX_DRAW_TRIANGLES:
|
||||
|
@ -445,7 +445,8 @@ void TransformTexCoord(const InputVertexData* src, OutputVertexData* dst, bool s
|
||||
dst->texCoords[coordNum].z = 1.0f;
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(VIDEO, "Bad tex gen type %i", texinfo.texgentype.Value());
|
||||
ERROR_LOG_FMT(VIDEO, "Bad tex gen type {}", texinfo.texgentype.Value());
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user