From 159809eb32fe3baeed4bdd6fb993a2dafdea5b12 Mon Sep 17 00:00:00 2001 From: emufan4568 Date: Fri, 14 Oct 2022 16:02:11 +0300 Subject: [PATCH] renderer_opengl: Fix OpenGLES issues * Always request a 4.4 context until I figure out how to get Qt to cooperate * Use RGBA for BGR since the converted table will do that conversion --- src/citra_qt/bootmanager.cpp | 8 ++------ src/video_core/renderer_opengl/gl_driver.cpp | 6 ++++-- src/video_core/renderer_opengl/gl_texture_runtime.cpp | 2 +- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/citra_qt/bootmanager.cpp b/src/citra_qt/bootmanager.cpp index c967b1478..ca156b869 100644 --- a/src/citra_qt/bootmanager.cpp +++ b/src/citra_qt/bootmanager.cpp @@ -121,12 +121,8 @@ public: explicit OpenGLSharedContext(QSurface* surface) : surface(surface) { QSurfaceFormat format; - if (Settings::values.graphics_api == Settings::GraphicsAPI::OpenGLES) { - format.setVersion(3, 2); - } else { - format.setVersion(4, 4); - format.setProfile(QSurfaceFormat::CoreProfile); - } + format.setVersion(4, 4); + format.setProfile(QSurfaceFormat::CoreProfile); if (Settings::values.renderer_debug) { format.setOption(QSurfaceFormat::FormatOption::DebugContext); diff --git a/src/video_core/renderer_opengl/gl_driver.cpp b/src/video_core/renderer_opengl/gl_driver.cpp index 08545c545..cc4bb5330 100644 --- a/src/video_core/renderer_opengl/gl_driver.cpp +++ b/src/video_core/renderer_opengl/gl_driver.cpp @@ -79,8 +79,10 @@ Driver::Driver(bool gles, bool enable_debug) : is_gles{gles} { * Qualcomm has some spammy info messages that are marked as errors but not important * https://developer.qualcomm.com/comment/11845 */ - glEnable(GL_DEBUG_OUTPUT_SYNCHRONOUS); - glDebugMessageCallback(DebugHandler, nullptr); + if (!gles) { + glEnable(GL_DEBUG_OUTPUT); + glDebugMessageCallback(DebugHandler, nullptr); + } #endif ReportDriverInfo(); diff --git a/src/video_core/renderer_opengl/gl_texture_runtime.cpp b/src/video_core/renderer_opengl/gl_texture_runtime.cpp index 5bd5136a9..3af62917d 100644 --- a/src/video_core/renderer_opengl/gl_texture_runtime.cpp +++ b/src/video_core/renderer_opengl/gl_texture_runtime.cpp @@ -30,7 +30,7 @@ static constexpr std::array COLOR_TUPLES = { static constexpr std::array COLOR_TUPLES_OES = { FormatTuple{GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE}, // RGBA8 - FormatTuple{GL_RGB8, GL_RGB, GL_UNSIGNED_BYTE}, // RGB8 + FormatTuple{GL_RGBA8, GL_RGBA, GL_UNSIGNED_BYTE}, // RGB8 FormatTuple{GL_RGB5_A1, GL_RGBA, GL_UNSIGNED_SHORT_5_5_5_1}, // RGB5A1 FormatTuple{GL_RGB565, GL_RGB, GL_UNSIGNED_SHORT_5_6_5}, // RGB565 FormatTuple{GL_RGBA4, GL_RGBA, GL_UNSIGNED_SHORT_4_4_4_4}, // RGBA4