diff options
| author | lizzie <lizzie@eden-emu.dev> | 2025-10-29 03:25:22 +0100 |
|---|---|---|
| committer | crueter <crueter@eden-emu.dev> | 2025-10-29 03:25:22 +0100 |
| commit | ce0a299bdb7cec59d453f9c978c7affc71a8f4e8 (patch) | |
| tree | f1f60700019d6400291bfcd7fade7c4be2a79031 | |
| parent | d3dbabcfc7d4375a30987047f3c1a14d5ba5a9ef (diff) | |
[qt] do not fatally error out immediately if OpenGL is missing some extensions (#2876)
It may be possible to run without the extensions, with decreased stability of course (or partial implementation thereof)
Signed-off-by: lizzie <lizzie@eden-emu.dev>
Reviewed-on: https://git.eden-emu.dev/eden-emu/eden/pulls/2876
Reviewed-by: crueter <crueter@eden-emu.dev>
Reviewed-by: MaranBr <maranbr@eden-emu.dev>
Co-authored-by: lizzie <lizzie@eden-emu.dev>
Co-committed-by: lizzie <lizzie@eden-emu.dev>
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 53 |
1 files changed, 20 insertions, 33 deletions
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 30ac18d139..8ecce2831e 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp @@ -1052,53 +1052,40 @@ bool GRenderWindow::LoadOpenGL() { tr("Your GPU may not support OpenGL, or you do not have the latest graphics driver.")); return false; } - - const QString renderer = - QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); - + // Display various warnings (but not fatal errors) for missing OpenGL extensions or lack of + // OpenGL 4.6 support + const QString renderer = QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); if (!GLAD_GL_VERSION_4_6) { - LOG_ERROR(Frontend, "GPU does not support OpenGL 4.6: {}", renderer.toStdString()); QMessageBox::warning(this, tr("Error while initializing OpenGL 4.6!"), - tr("Your GPU may not support OpenGL 4.6, or you do not have the " - "latest graphics driver.<br><br>GL Renderer:<br>%1") - .arg(renderer)); + tr("Your GPU may not support OpenGL 4.6, or you do not have the " + "latest graphics driver.<br><br>GL Renderer:<br>%1") + .arg(renderer)); return false; } - - QStringList unsupported_gl_extensions = GetUnsupportedGLExtensions(); - if (!unsupported_gl_extensions.empty()) { + if (QStringList missing_ext = GetUnsupportedGLExtensions(); !missing_ext.empty()) { QMessageBox::warning( this, tr("Error while initializing OpenGL!"), tr("Your GPU may not support one or more required OpenGL extensions. Please ensure you " - "have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported " - "extensions:<br>%2") - .arg(renderer) - .arg(unsupported_gl_extensions.join(QStringLiteral("<br>")))); - return false; + "have the latest graphics driver.<br><br>GL Renderer:<br>%1<br><br>Unsupported " + "extensions:<br>%2") + .arg(renderer).arg(missing_ext.join(QStringLiteral("<br>")))); + // Non fatal } return true; } QStringList GRenderWindow::GetUnsupportedGLExtensions() const { - QStringList unsupported_ext; - + QStringList missing_ext; // Extensions required to support some texture formats. - if (!GLAD_GL_EXT_texture_compression_s3tc) { - unsupported_ext.append(QStringLiteral("EXT_texture_compression_s3tc")); - } - if (!GLAD_GL_ARB_texture_compression_rgtc) { - unsupported_ext.append(QStringLiteral("ARB_texture_compression_rgtc")); - } - - if (!unsupported_ext.empty()) { - const std::string gl_renderer{reinterpret_cast<const char*>(glGetString(GL_RENDERER))}; - LOG_ERROR(Frontend, "GPU does not support all required extensions: {}", gl_renderer); - } - for (const QString& ext : unsupported_ext) { + if (!GLAD_GL_EXT_texture_compression_s3tc) + missing_ext.append(QStringLiteral("EXT_texture_compression_s3tc")); + if (!GLAD_GL_ARB_texture_compression_rgtc) + missing_ext.append(QStringLiteral("ARB_texture_compression_rgtc")); + if (!missing_ext.empty()) + LOG_ERROR(Frontend, "GPU does not support all required extensions"); + for (const QString& ext : missing_ext) LOG_ERROR(Frontend, "Unsupported GL extension: {}", ext.toStdString()); - } - - return unsupported_ext; + return missing_ext; } void GRenderWindow::OnEmulationStarting(EmuThread* emu_thread_) { |
