From 8f69f2969433ba88b8eda923ef2d576f81a959c1 Mon Sep 17 00:00:00 2001 From: Riteo Date: Sat, 1 Jun 2024 20:04:16 +0200 Subject: EGL: Use EGL_EXT_platform_base whenever possible This avoids any assumption from the driver, which would otherwise select a specific platform and potentially mess up everything, resulting usually in a display server failure. --- platform/linuxbsd/wayland/display_server_wayland.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'platform/linuxbsd/wayland/display_server_wayland.cpp') diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index 12d3a6fd2f..1981614970 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -1343,7 +1343,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win if (prime_idx == -1) { print_verbose("Detecting GPUs, set DRI_PRIME in the environment to override GPU detection logic."); - prime_idx = DetectPrimeEGL::detect_prime(); + prime_idx = DetectPrimeEGL::detect_prime(EGL_PLATFORM_WAYLAND_KHR); } if (prime_idx) { @@ -1356,7 +1356,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win if (rendering_driver == "opengl3") { egl_manager = memnew(EGLManagerWayland); - if (egl_manager->initialize() != OK || egl_manager->open_display(wayland_thread.get_wl_display()) != OK) { + if (egl_manager->initialize(wayland_thread.get_wl_display()) != OK || egl_manager->open_display(wayland_thread.get_wl_display()) != OK) { memdelete(egl_manager); egl_manager = nullptr; @@ -1376,7 +1376,7 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win if (rendering_driver == "opengl3_es") { egl_manager = memnew(EGLManagerWaylandGLES); - if (egl_manager->initialize() != OK) { + if (egl_manager->initialize(wayland_thread.get_wl_display()) != OK) { memdelete(egl_manager); egl_manager = nullptr; r_error = ERR_CANT_CREATE; -- cgit v1.2.3