GS/GL: Rework logging for supported extensions/features.

Make it clear what extension is supported, what isn't and what it's currently used such as alternatives or fallbacks.
This commit is contained in:
lightningterror
2026-09-20 07:36:06 +02:00
parent 6c4f4114a5
commit 5b6843ad2b
+105 -37
View File
@@ -852,7 +852,7 @@ bool GSDeviceOGL::CheckFeatures()
extensions.append(ext);
}
}
DevCon.WriteLn(std::move(extensions));
DbgConWriter.WriteLn(std::move(extensions));
if (!GLAD_GL_ARB_shading_language_420pack)
{
@@ -861,23 +861,10 @@ bool GSDeviceOGL::CheckFeatures()
return false;
}
if (!GLAD_GL_VERSION_4_3 && !GLAD_GL_ARB_copy_image && !GLAD_GL_EXT_copy_image && !GLAD_GL_NV_copy_image)
{
Host::AddOSDMessage(
"GL_ARB_copy_image is not supported, copies will be slower.", Host::OSD_ERROR_DURATION);
}
if (!GLAD_GL_VERSION_4_5 && !GLAD_GL_ARB_clip_control)
{
Host::AddOSDMessage(
"GL_ARB_clip_control is not supported, depth will be less accurate.", Host::OSD_ERROR_DURATION);
}
if (!GLAD_GL_ARB_viewport_array)
{
glScissorIndexed = ReplaceGL::ScissorIndexed;
glViewportIndexedf = ReplaceGL::ViewportIndexedf;
Console.Warning("GL_ARB_viewport_array is not supported! Function pointer will be replaced.");
}
if (!GLAD_GL_ARB_texture_barrier)
@@ -890,8 +877,6 @@ bool GSDeviceOGL::CheckFeatures()
{
glTextureBarrier = ReplaceGL::TextureBarrier;
m_features.multidraw_fb_copy = true;
Host::AddOSDMessage(
"GL_ARB_texture_barrier is not supported, blending will be slower.", Host::OSD_ERROR_DURATION);
}
}
@@ -900,10 +885,7 @@ bool GSDeviceOGL::CheckFeatures()
if (GLAD_GL_EXT_direct_state_access)
Emulate_DSA_EXT::Init();
else
{
Console.Warning("GL: Direct State Access is not supported, this will reduce performance.");
Emulate_DSA::Init();
}
}
// Don't use PBOs when we don't have ARB_buffer_storage, orphaning buffers probably ends up worse than just
@@ -935,7 +917,7 @@ bool GSDeviceOGL::CheckFeatures()
m_features.texture_barrier = m_features.framebuffer_fetch; // Force Disabled
m_features.multidraw_fb_copy = false;
Host::AddOSDMessage(
"Texture Barrier is disabled, blending will not be accurate.", Host::OSD_ERROR_DURATION);
"Texture Barriers are disabled, blending will not be accurate.", Host::OSD_ERROR_DURATION);
}
else if (GSConfig.OverrideTextureBarriers == 1)
{
@@ -972,8 +954,6 @@ bool GSDeviceOGL::CheckFeatures()
DevCon.WriteLn("GL_MAX_VERTEX_SHADER_STORAGE_BLOCKS: %d", max_vertex_ssbos);
m_features.vs_expand = (!GSConfig.DisableVertexShaderExpand && max_vertex_ssbos > 0 && GLAD_GL_ARB_gpu_shader5);
}
if (!m_features.vs_expand)
Console.Warning("GL: Vertex expansion is not supported. This will reduce performance.");
GLint point_range[2] = {};
glGetIntegerv(GL_ALIASED_POINT_SIZE_RANGE, point_range);
@@ -993,22 +973,110 @@ bool GSDeviceOGL::CheckFeatures()
else
m_rgba16_unorm_hw_blend = true;
if (!GLAD_GL_VERSION_4_2 && !GLAD_GL_ARB_conservative_depth && !GLAD_GL_AMD_conservative_depth)
{
Console.Warning("Conservative depth is not supported. This will reduce performance.");
}
Console.WriteLn("GL: Using %s for point expansion, %s for line expansion and %s for sprite expansion.",
m_features.point_expand ? "hardware" : (m_features.vs_expand ? "vertex expanding" : "UNSUPPORTED"),
m_features.line_expand ? "hardware" : (m_features.vs_expand ? "vertex expanding" : "UNSUPPORTED"),
m_features.vs_expand ? "vertex expanding" : "CPU");
Console.WriteLnFmt("GL: DXTn Texture Compression: {}", m_features.dxt_textures ? "Supported" : "Not Supported");
Console.WriteLnFmt("GL: BC6/7 Texture Compression: {}", m_features.bptc_textures ? "Supported" : "Not Supported");
Console.WriteLnFmt("GL: RGBA16 UNORM Hardware Blending: {}", m_rgba16_unorm_hw_blend ? "Supported" : "Not Supported");
m_features.aa1 = GSConfig.HWAA1 && m_features.vs_expand && m_features.feedback_loops();
// Log the extension support.
constexpr int LABEL_WIDTH = 26;
constexpr int STATUS_WIDTH = 15;
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Viewport Array:",
STATUS_WIDTH, GLAD_GL_ARB_viewport_array ? "Supported" : "Fallback",
GLAD_GL_ARB_viewport_array ? "GL_ARB_viewport_array" : "Emulation");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Direct State Access:",
STATUS_WIDTH, GLAD_GL_VERSION_4_5 || GLAD_GL_ARB_direct_state_access || GLAD_GL_EXT_direct_state_access ? "Supported" : "Fallback",
GLAD_GL_VERSION_4_5 ? "OpenGL 4.5 Core" :
GLAD_GL_ARB_direct_state_access ? "GL_ARB_direct_state_access" :
GLAD_GL_EXT_direct_state_access ? "GL_EXT_direct_state_access" :
"Emulation");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Copy Image:",
STATUS_WIDTH, GLAD_GL_VERSION_4_3 || GLAD_GL_ARB_copy_image || GLAD_GL_EXT_copy_image || GLAD_GL_NV_copy_image ? "Supported" : "Fallback",
GLAD_GL_VERSION_4_3 ? "OpenGL 4.3 Core" :
GLAD_GL_ARB_copy_image ? "GL_ARB_copy_image" :
GLAD_GL_EXT_copy_image ? "GL_EXT_copy_image" :
"Framebuffer Copy");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Clip Control:",
STATUS_WIDTH, GLAD_GL_VERSION_4_5 || GLAD_GL_ARB_clip_control ? "Supported" : "Fallback",
GLAD_GL_VERSION_4_5 ? "OpenGL 4.5 Core" :
GLAD_GL_ARB_clip_control ? "GL_ARB_clip_control" :
"Shader Fallback");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Conservative Depth:",
STATUS_WIDTH, GLAD_GL_VERSION_4_2 || GLAD_GL_ARB_conservative_depth || GLAD_GL_AMD_conservative_depth ? "Supported" : "Not Supported",
GLAD_GL_VERSION_4_2 ? "OpenGL 4.2 Core" :
GLAD_GL_ARB_conservative_depth ? "GL_ARB_conservative_depth" :
GLAD_GL_AMD_conservative_depth ? "GL_AMD_conservative_depth" :
"None");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Texture Barriers:",
STATUS_WIDTH, GSConfig.OverrideTextureBarriers == 0 ? "Forced Disabled" : GSConfig.OverrideTextureBarriers == 1 ? "Forced Enabled" :
"Auto",
GSConfig.OverrideTextureBarriers == 0 ? "Disabled" :
GSConfig.OverrideTextureBarriers == 1 ?
(!GLAD_GL_ARB_texture_barrier && !GLAD_GL_NV_texture_barrier &&
GLAD_GL_ARB_shader_image_load_store ?
"Memory Barrier (GL_ARB_shader_image_load_store)" :
GLAD_GL_ARB_texture_barrier ? "GL_ARB_texture_barrier" :
GLAD_GL_NV_texture_barrier ? "GL_NV_texture_barrier" :
"No Barriers") :
m_features.framebuffer_fetch ? "Framebuffer Fetch" :
GLAD_GL_ARB_texture_barrier ? "GL_ARB_texture_barrier" :
GLAD_GL_NV_texture_barrier ? "GL_NV_texture_barrier" :
"Framebuffer Copy");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "RGBA16 HW Blending:",
STATUS_WIDTH, m_rgba16_unorm_hw_blend ? "Supported" : "Fallback",
m_rgba16_unorm_hw_blend ? "RGBA16 UNORM" : "RGBA16F Fallback");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Point Expansion:",
STATUS_WIDTH, m_features.point_expand ? "Supported" : (m_features.vs_expand ? "Fallback" : "Not Supported"),
m_features.point_expand ? "Hardware" : (m_features.vs_expand ? "Vertex Expansion" : "None"));
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Line Expansion:",
STATUS_WIDTH, m_features.line_expand ? "Supported" : (m_features.vs_expand ? "Fallback" : "Not Supported"),
m_features.line_expand ? "Hardware" : (m_features.vs_expand ? "Vertex Expansion" : "None"));
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "Sprite Expansion:",
STATUS_WIDTH, m_features.vs_expand ? "Supported" : "Fallback",
m_features.vs_expand ? "Vertex Expansion" : "CPU");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "DXTn Texture Compression:",
STATUS_WIDTH, m_features.dxt_textures ? "Supported" : "Not Supported",
GLAD_GL_EXT_texture_compression_s3tc ? "GL_EXT_texture_compression_s3tc" : "None");
Console.WriteLnFmt(
"GL: {1:<{0}} {3:<{2}} => Using: {4}",
LABEL_WIDTH, "BC6/7 Texture Compression:",
STATUS_WIDTH, m_features.bptc_textures ? "Supported" : "Not Supported",
GLAD_GL_VERSION_4_2 ? "OpenGL 4.2 Core" :
GLAD_GL_ARB_texture_compression_bptc ? "GL_ARB_texture_compression_bptc" :
GLAD_GL_EXT_texture_compression_bptc ? "GL_EXT_texture_compression_bptc" :
"None");
return true;
}