diff options
| author | 2021-02-07 21:44:49 -0300 | |
|---|---|---|
| committer | 2021-02-07 21:44:49 -0300 | |
| commit | 4c82c08897c75f2c323f58fe84bd3b207a9ceacf (patch) | |
| tree | 659cbfab57d49ceec48094cb6ee9b41a7868a8cb /src | |
| parent | Merge pull request #5889 from ogniK5377/morton-remove (diff) | |
| parent | renderer_opengl: Update OpenGL backend version requirement to 4.6 (diff) | |
| download | yuzu-4c82c08897c75f2c323f58fe84bd3b207a9ceacf.tar.gz yuzu-4c82c08897c75f2c323f58fe84bd3b207a9ceacf.tar.xz yuzu-4c82c08897c75f2c323f58fe84bd3b207a9ceacf.zip | |
Merge pull request #5888 from Morph1984/ogl-4.6
renderer_opengl: Update OpenGL backend version requirement to 4.6
Diffstat (limited to 'src')
| -rw-r--r-- | src/video_core/renderer_opengl/renderer_opengl.cpp | 2 | ||||
| -rw-r--r-- | src/yuzu/bootmanager.cpp | 31 | ||||
| -rw-r--r-- | src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | 26 |
3 files changed, 17 insertions, 42 deletions
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp index dd77a543c..21159e498 100644 --- a/src/video_core/renderer_opengl/renderer_opengl.cpp +++ b/src/video_core/renderer_opengl/renderer_opengl.cpp | |||
| @@ -506,7 +506,7 @@ bool RendererOpenGL::Init() { | |||
| 506 | 506 | ||
| 507 | AddTelemetryFields(); | 507 | AddTelemetryFields(); |
| 508 | 508 | ||
| 509 | if (!GLAD_GL_VERSION_4_3) { | 509 | if (!GLAD_GL_VERSION_4_6) { |
| 510 | return false; | 510 | return false; |
| 511 | } | 511 | } |
| 512 | 512 | ||
diff --git a/src/yuzu/bootmanager.cpp b/src/yuzu/bootmanager.cpp index 4528eb196..ffdf34a4a 100644 --- a/src/yuzu/bootmanager.cpp +++ b/src/yuzu/bootmanager.cpp | |||
| @@ -126,7 +126,7 @@ public: | |||
| 126 | /// Create the original context that should be shared from | 126 | /// Create the original context that should be shared from |
| 127 | explicit OpenGLSharedContext(QSurface* surface) : surface(surface) { | 127 | explicit OpenGLSharedContext(QSurface* surface) : surface(surface) { |
| 128 | QSurfaceFormat format; | 128 | QSurfaceFormat format; |
| 129 | format.setVersion(4, 3); | 129 | format.setVersion(4, 6); |
| 130 | format.setProfile(QSurfaceFormat::CompatibilityProfile); | 130 | format.setProfile(QSurfaceFormat::CompatibilityProfile); |
| 131 | format.setOption(QSurfaceFormat::FormatOption::DeprecatedFunctions); | 131 | format.setOption(QSurfaceFormat::FormatOption::DeprecatedFunctions); |
| 132 | if (Settings::values.renderer_debug) { | 132 | if (Settings::values.renderer_debug) { |
| @@ -651,10 +651,10 @@ bool GRenderWindow::LoadOpenGL() { | |||
| 651 | const QString renderer = | 651 | const QString renderer = |
| 652 | QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); | 652 | QString::fromUtf8(reinterpret_cast<const char*>(glGetString(GL_RENDERER))); |
| 653 | 653 | ||
| 654 | if (!GLAD_GL_VERSION_4_3) { | 654 | if (!GLAD_GL_VERSION_4_6) { |
| 655 | LOG_ERROR(Frontend, "GPU does not support OpenGL 4.3: {}", renderer.toStdString()); | 655 | LOG_ERROR(Frontend, "GPU does not support OpenGL 4.6: {}", renderer.toStdString()); |
| 656 | QMessageBox::warning(this, tr("Error while initializing OpenGL 4.3!"), | 656 | QMessageBox::warning(this, tr("Error while initializing OpenGL 4.6!"), |
| 657 | tr("Your GPU may not support OpenGL 4.3, or you do not have the " | 657 | tr("Your GPU may not support OpenGL 4.6, or you do not have the " |
| 658 | "latest graphics driver.<br><br>GL Renderer:<br>%1") | 658 | "latest graphics driver.<br><br>GL Renderer:<br>%1") |
| 659 | .arg(renderer)); | 659 | .arg(renderer)); |
| 660 | return false; | 660 | return false; |
| @@ -677,26 +677,13 @@ bool GRenderWindow::LoadOpenGL() { | |||
| 677 | QStringList GRenderWindow::GetUnsupportedGLExtensions() const { | 677 | QStringList GRenderWindow::GetUnsupportedGLExtensions() const { |
| 678 | QStringList unsupported_ext; | 678 | QStringList unsupported_ext; |
| 679 | 679 | ||
| 680 | if (!GLAD_GL_ARB_buffer_storage) | ||
| 681 | unsupported_ext.append(QStringLiteral("ARB_buffer_storage")); | ||
| 682 | if (!GLAD_GL_ARB_direct_state_access) | ||
| 683 | unsupported_ext.append(QStringLiteral("ARB_direct_state_access")); | ||
| 684 | if (!GLAD_GL_ARB_vertex_type_10f_11f_11f_rev) | ||
| 685 | unsupported_ext.append(QStringLiteral("ARB_vertex_type_10f_11f_11f_rev")); | ||
| 686 | if (!GLAD_GL_ARB_texture_mirror_clamp_to_edge) | ||
| 687 | unsupported_ext.append(QStringLiteral("ARB_texture_mirror_clamp_to_edge")); | ||
| 688 | if (!GLAD_GL_ARB_multi_bind) | ||
| 689 | unsupported_ext.append(QStringLiteral("ARB_multi_bind")); | ||
| 690 | if (!GLAD_GL_ARB_clip_control) | ||
| 691 | unsupported_ext.append(QStringLiteral("ARB_clip_control")); | ||
| 692 | |||
| 693 | // Extensions required to support some texture formats. | 680 | // Extensions required to support some texture formats. |
| 694 | if (!GLAD_GL_EXT_texture_compression_s3tc) | 681 | if (!GLAD_GL_EXT_texture_compression_s3tc) { |
| 695 | unsupported_ext.append(QStringLiteral("EXT_texture_compression_s3tc")); | 682 | unsupported_ext.append(QStringLiteral("EXT_texture_compression_s3tc")); |
| 696 | if (!GLAD_GL_ARB_texture_compression_rgtc) | 683 | } |
| 684 | if (!GLAD_GL_ARB_texture_compression_rgtc) { | ||
| 697 | unsupported_ext.append(QStringLiteral("ARB_texture_compression_rgtc")); | 685 | unsupported_ext.append(QStringLiteral("ARB_texture_compression_rgtc")); |
| 698 | if (!GLAD_GL_ARB_depth_buffer_float) | 686 | } |
| 699 | unsupported_ext.append(QStringLiteral("ARB_depth_buffer_float")); | ||
| 700 | 687 | ||
| 701 | if (!unsupported_ext.empty()) { | 688 | if (!unsupported_ext.empty()) { |
| 702 | LOG_ERROR(Frontend, "GPU does not support all required extensions: {}", | 689 | LOG_ERROR(Frontend, "GPU does not support all required extensions: {}", |
diff --git a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp index a103b04bd..deddea9ee 100644 --- a/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp +++ b/src/yuzu_cmd/emu_window/emu_window_sdl2_gl.cpp | |||
| @@ -59,29 +59,17 @@ private: | |||
| 59 | bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() { | 59 | bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() { |
| 60 | std::vector<std::string_view> unsupported_ext; | 60 | std::vector<std::string_view> unsupported_ext; |
| 61 | 61 | ||
| 62 | if (!GLAD_GL_ARB_buffer_storage) | ||
| 63 | unsupported_ext.push_back("ARB_buffer_storage"); | ||
| 64 | if (!GLAD_GL_ARB_direct_state_access) | ||
| 65 | unsupported_ext.push_back("ARB_direct_state_access"); | ||
| 66 | if (!GLAD_GL_ARB_vertex_type_10f_11f_11f_rev) | ||
| 67 | unsupported_ext.push_back("ARB_vertex_type_10f_11f_11f_rev"); | ||
| 68 | if (!GLAD_GL_ARB_texture_mirror_clamp_to_edge) | ||
| 69 | unsupported_ext.push_back("ARB_texture_mirror_clamp_to_edge"); | ||
| 70 | if (!GLAD_GL_ARB_multi_bind) | ||
| 71 | unsupported_ext.push_back("ARB_multi_bind"); | ||
| 72 | if (!GLAD_GL_ARB_clip_control) | ||
| 73 | unsupported_ext.push_back("ARB_clip_control"); | ||
| 74 | |||
| 75 | // Extensions required to support some texture formats. | 62 | // Extensions required to support some texture formats. |
| 76 | if (!GLAD_GL_EXT_texture_compression_s3tc) | 63 | if (!GLAD_GL_EXT_texture_compression_s3tc) { |
| 77 | unsupported_ext.push_back("EXT_texture_compression_s3tc"); | 64 | unsupported_ext.push_back("EXT_texture_compression_s3tc"); |
| 78 | if (!GLAD_GL_ARB_texture_compression_rgtc) | 65 | } |
| 66 | if (!GLAD_GL_ARB_texture_compression_rgtc) { | ||
| 79 | unsupported_ext.push_back("ARB_texture_compression_rgtc"); | 67 | unsupported_ext.push_back("ARB_texture_compression_rgtc"); |
| 80 | if (!GLAD_GL_ARB_depth_buffer_float) | 68 | } |
| 81 | unsupported_ext.push_back("ARB_depth_buffer_float"); | ||
| 82 | 69 | ||
| 83 | for (const auto& extension : unsupported_ext) | 70 | for (const auto& extension : unsupported_ext) { |
| 84 | LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", extension); | 71 | LOG_CRITICAL(Frontend, "Unsupported GL extension: {}", extension); |
| 72 | } | ||
| 85 | 73 | ||
| 86 | return unsupported_ext.empty(); | 74 | return unsupported_ext.empty(); |
| 87 | } | 75 | } |
| @@ -89,7 +77,7 @@ bool EmuWindow_SDL2_GL::SupportsRequiredGLExtensions() { | |||
| 89 | EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsystem, bool fullscreen) | 77 | EmuWindow_SDL2_GL::EmuWindow_SDL2_GL(InputCommon::InputSubsystem* input_subsystem, bool fullscreen) |
| 90 | : EmuWindow_SDL2{input_subsystem} { | 78 | : EmuWindow_SDL2{input_subsystem} { |
| 91 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); | 79 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MAJOR_VERSION, 4); |
| 92 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 3); | 80 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_MINOR_VERSION, 6); |
| 93 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); | 81 | SDL_GL_SetAttribute(SDL_GL_CONTEXT_PROFILE_MASK, SDL_GL_CONTEXT_PROFILE_COMPATIBILITY); |
| 94 | SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); | 82 | SDL_GL_SetAttribute(SDL_GL_DOUBLEBUFFER, 1); |
| 95 | SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); | 83 | SDL_GL_SetAttribute(SDL_GL_RED_SIZE, 8); |