Mesa (main): egl: Fix DETECT_OS macro usage

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri May 27 20:35:35 UTC 2022


Module: Mesa
Branch: main
Commit: 7c1498daba053b8d05dba1216f0e308b30076375
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=7c1498daba053b8d05dba1216f0e308b30076375

Author: Erico Nunes <nunes.erico at gmail.com>
Date:   Fri May 27 20:54:40 2022 +0200

egl: Fix DETECT_OS macro usage

As described in src/util/detect_os.h, the DETECT_OS macros are always
defined to a 0 or 1 value, and they should be used with #if rather
than #ifdef.
Commit 54b7227f158 accidentally disabled those extensions on all
platforms, so enable them again.

Fixes: 54b7227f158 ("egl/wgl: On win32, there is no support for EGL_EXT_device and EGL_EXT_platform_device")

Signed-off-by: Erico Nunes <nunes.erico at gmail.com>
Reviewed-by: Jesse Natalie <jenatali at microsoft.com>
Acked-by: Yonggang Luo <luoyonggang at gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/16751>

---

 src/egl/main/eglglobals.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/egl/main/eglglobals.c b/src/egl/main/eglglobals.c
index ebf7c573509..36213a28cc1 100644
--- a/src/egl/main/eglglobals.c
+++ b/src/egl/main/eglglobals.c
@@ -67,7 +67,7 @@ struct _egl_global _eglGlobal =
    .ClientExtensionString =
 #endif
    "EGL_EXT_client_extensions"
-#ifndef DETECT_OS_WINDOWS
+#if !DETECT_OS_WINDOWS
    " EGL_EXT_device_base"
    " EGL_EXT_device_enumeration"
    " EGL_EXT_device_query"
@@ -83,7 +83,7 @@ struct _egl_global _eglGlobal =
    " "
 #endif
 
-#ifndef DETECT_OS_WINDOWS
+#if !DETECT_OS_WINDOWS
    "EGL_EXT_platform_device"
 #endif
 #ifdef HAVE_WAYLAND_PLATFORM



More information about the mesa-commit mailing list