From 4e15823db236feeee0f43a9c41434e8489146758 Mon Sep 17 00:00:00 2001 From: SachinVin <26602104+SachinVin@users.noreply.github.com> Date: Mon, 24 Jan 2022 14:14:28 +0530 Subject: [PATCH] gl_format_reinterpreter.cpp: fallback to PBO path on obsolete intel drivers (#5928) --- .../renderer_opengl/gl_format_reinterpreter.cpp | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp b/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp index 33067c873..0aec38123 100644 --- a/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp +++ b/src/video_core/renderer_opengl/gl_format_reinterpreter.cpp @@ -363,7 +363,15 @@ private: }; FormatReinterpreterOpenGL::FormatReinterpreterOpenGL() { - if ((GLAD_GL_ARB_stencil_texturing && GLAD_GL_ARB_texture_storage && GLAD_GL_ARB_copy_image) || + const std::string_view vendor{reinterpret_cast(glGetString(GL_VENDOR))}; + const std::string_view version{reinterpret_cast(glGetString(GL_VERSION))}; + // Fallback to PBO path on obsolete intel drivers + // intel`s GL_VERSION string - `3.3.0 - Build 25.20.100.6373` + const bool intel_broken_drivers = + vendor.find("Intel") != vendor.npos && (std::atoi(version.substr(14, 2).data()) < 30); + + if ((!intel_broken_drivers && GLAD_GL_ARB_stencil_texturing && GLAD_GL_ARB_texture_storage && + GLAD_GL_ARB_copy_image) || GLES) { reinterpreters.emplace(PixelFormatPair{PixelFormat::RGBA8, PixelFormat::D24S8}, std::make_unique());