aboutsummaryrefslogtreecommitdiff
path: root/render
diff options
context:
space:
mode:
authorzccrs <zccrs@live.com>2021-04-07 21:15:39 +0800
committerSimon Ser <contact@emersion.fr>2021-04-07 15:38:35 +0200
commit69e1997ebe3e38dee2f7318c3989f16e2bcac8f3 (patch)
tree1e17693ec77f77739cb2d1a54fd9d34f55a4def3 /render
parent8ccb4bbb5f6e196f14e3da275e310ebd7e2942e3 (diff)
render/egl: check "EGL_KHR_platform_gbm" for EGL gbm platform
See the https://www.khronos.org/registry/EGL/extensions/KHR/EGL_KHR_platform_gbm.txt example code. On EGL_PLATFORM_GBM_KHR platform, we should be check the "EGL_KHR_platform_gbm" extension. Change-Id: Icf11c07c2949841a80b10527fb09987257fbd63b
Diffstat (limited to 'render')
-rw-r--r--render/egl.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/render/egl.c b/render/egl.c
index 80b38a90..9e6c366e 100644
--- a/render/egl.c
+++ b/render/egl.c
@@ -172,6 +172,13 @@ struct wlr_egl *wlr_egl_create(EGLenum platform, void *remote_display) {
return NULL;
}
+ if (platform == EGL_PLATFORM_GBM_KHR) {
+ if (!check_egl_ext(client_exts_str, "EGL_KHR_platform_gbm")) {
+ wlr_log(WLR_ERROR, "EGL_KHR_platform_gbm not supported");
+ return NULL;
+ }
+ }
+
if (!check_egl_ext(client_exts_str, "EGL_EXT_platform_base")) {
wlr_log(WLR_ERROR, "EGL_EXT_platform_base not supported");
return NULL;