mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-07-21 21:30:19 -06:00
OpenGL: Migrate logging over to fmt
Migrates over to the fmt-capable logger.
This commit is contained in:
@ -105,19 +105,19 @@ static void APIENTRY ErrorCallback(GLenum source, GLenum type, GLuint id, GLenum
|
||||
switch (severity)
|
||||
{
|
||||
case GL_DEBUG_SEVERITY_HIGH_ARB:
|
||||
ERROR_LOG(HOST_GPU, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message);
|
||||
ERROR_LOG_FMT(HOST_GPU, "id: {:x}, source: {}, type: {} - {}", id, s_source, s_type, message);
|
||||
break;
|
||||
case GL_DEBUG_SEVERITY_MEDIUM_ARB:
|
||||
WARN_LOG(HOST_GPU, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message);
|
||||
WARN_LOG_FMT(HOST_GPU, "id: {:x}, source: {}, type: {} - {}", id, s_source, s_type, message);
|
||||
break;
|
||||
case GL_DEBUG_SEVERITY_LOW_ARB:
|
||||
DEBUG_LOG(HOST_GPU, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message);
|
||||
DEBUG_LOG_FMT(HOST_GPU, "id: {:x}, source: {}, type: {} - {}", id, s_source, s_type, message);
|
||||
break;
|
||||
case GL_DEBUG_SEVERITY_NOTIFICATION:
|
||||
DEBUG_LOG(HOST_GPU, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message);
|
||||
DEBUG_LOG_FMT(HOST_GPU, "id: {:x}, source: {}, type: {} - {}", id, s_source, s_type, message);
|
||||
break;
|
||||
default:
|
||||
ERROR_LOG(HOST_GPU, "id: %x, source: %s, type: %s - %s", id, s_source, s_type, message);
|
||||
ERROR_LOG_FMT(HOST_GPU, "id: {:x}, source: {}, type: {} - {}", id, s_source, s_type, message);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -307,7 +307,7 @@ static void InitDriverInfo()
|
||||
version = 100 * major + minor;
|
||||
if (change >= change_scale)
|
||||
{
|
||||
ERROR_LOG(VIDEO, "Version changeID overflow - change:%d scale:%f", change, change_scale);
|
||||
ERROR_LOG_FMT(VIDEO, "Version changeID overflow - change:{} scale:{}", change, change_scale);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -734,33 +734,34 @@ Renderer::Renderer(std::unique_ptr<GLContext> main_gl_context, float backbuffer_
|
||||
g_Config.VerifyValidity();
|
||||
UpdateActiveConfig();
|
||||
|
||||
OSD::AddMessage(StringFromFormat("Video Info: %s, %s, %s", g_ogl_config.gl_vendor,
|
||||
g_ogl_config.gl_renderer, g_ogl_config.gl_version),
|
||||
OSD::AddMessage(fmt::format("Video Info: {}, {}, {}", g_ogl_config.gl_vendor,
|
||||
g_ogl_config.gl_renderer, g_ogl_config.gl_version),
|
||||
5000);
|
||||
|
||||
if (!g_ogl_config.bSupportsGLBufferStorage && !g_ogl_config.bSupportsGLPinnedMemory)
|
||||
{
|
||||
OSD::AddMessage(StringFromFormat("Your OpenGL driver does not support %s_buffer_storage.",
|
||||
m_main_gl_context->IsGLES() ? "EXT" : "ARB"),
|
||||
OSD::AddMessage(fmt::format("Your OpenGL driver does not support {}_buffer_storage.",
|
||||
m_main_gl_context->IsGLES() ? "EXT" : "ARB"),
|
||||
60000);
|
||||
OSD::AddMessage("This device's performance will be terrible.", 60000);
|
||||
OSD::AddMessage("Please ask your device vendor for an updated OpenGL driver.", 60000);
|
||||
}
|
||||
|
||||
WARN_LOG(VIDEO, "Missing OGL Extensions: %s%s%s%s%s%s%s%s%s%s%s%s%s%s",
|
||||
g_ActiveConfig.backend_info.bSupportsDualSourceBlend ? "" : "DualSourceBlend ",
|
||||
g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? "" : "PrimitiveRestart ",
|
||||
g_ActiveConfig.backend_info.bSupportsEarlyZ ? "" : "EarlyZ ",
|
||||
g_ogl_config.bSupportsGLPinnedMemory ? "" : "PinnedMemory ",
|
||||
supports_glsl_cache ? "" : "ShaderCache ",
|
||||
g_ogl_config.bSupportsGLBaseVertex ? "" : "BaseVertex ",
|
||||
g_ogl_config.bSupportsGLBufferStorage ? "" : "BufferStorage ",
|
||||
g_ogl_config.bSupportsGLSync ? "" : "Sync ", g_ogl_config.bSupportsMSAA ? "" : "MSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsSSAA ? "" : "SSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsGSInstancing ? "" : "GSInstancing ",
|
||||
g_ActiveConfig.backend_info.bSupportsClipControl ? "" : "ClipControl ",
|
||||
g_ogl_config.bSupportsCopySubImage ? "" : "CopyImageSubData ",
|
||||
g_ActiveConfig.backend_info.bSupportsDepthClamp ? "" : "DepthClamp ");
|
||||
WARN_LOG_FMT(VIDEO, "Missing OGL Extensions: {}{}{}{}{}{}{}{}{}{}{}{}{}{}",
|
||||
g_ActiveConfig.backend_info.bSupportsDualSourceBlend ? "" : "DualSourceBlend ",
|
||||
g_ActiveConfig.backend_info.bSupportsPrimitiveRestart ? "" : "PrimitiveRestart ",
|
||||
g_ActiveConfig.backend_info.bSupportsEarlyZ ? "" : "EarlyZ ",
|
||||
g_ogl_config.bSupportsGLPinnedMemory ? "" : "PinnedMemory ",
|
||||
supports_glsl_cache ? "" : "ShaderCache ",
|
||||
g_ogl_config.bSupportsGLBaseVertex ? "" : "BaseVertex ",
|
||||
g_ogl_config.bSupportsGLBufferStorage ? "" : "BufferStorage ",
|
||||
g_ogl_config.bSupportsGLSync ? "" : "Sync ",
|
||||
g_ogl_config.bSupportsMSAA ? "" : "MSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsSSAA ? "" : "SSAA ",
|
||||
g_ActiveConfig.backend_info.bSupportsGSInstancing ? "" : "GSInstancing ",
|
||||
g_ActiveConfig.backend_info.bSupportsClipControl ? "" : "ClipControl ",
|
||||
g_ogl_config.bSupportsCopySubImage ? "" : "CopyImageSubData ",
|
||||
g_ActiveConfig.backend_info.bSupportsDepthClamp ? "" : "DepthClamp ");
|
||||
|
||||
// Handle VSync on/off
|
||||
if (!DriverDetails::HasBug(DriverDetails::BUG_BROKEN_VSYNC))
|
||||
|
Reference in New Issue
Block a user