From 28c2190336aec5b0b1d0f74d08e32dc604bcc4c1 Mon Sep 17 00:00:00 2001 From: Chia-I Wu Date: Wed, 30 Sep 2009 12:13:34 +0800 Subject: [PATCH] progs/egl: Check EGL_MESA_screen_surface is supported in demo2. Signed-off-by: Chia-I Wu --- progs/egl/demo2.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/progs/egl/demo2.c b/progs/egl/demo2.c index 5817771aec8..3994656721f 100644 --- a/progs/egl/demo2.c +++ b/progs/egl/demo2.c @@ -7,6 +7,7 @@ #include #include #include +#include #include #include @@ -129,6 +130,11 @@ main(int argc, char *argv[]) printf("EGL version = %d.%d\n", maj, min); printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); + if (!strstr(eglQueryString(d, EGL_EXTENSIONS), + "EGL_MESA_screen_surface")) { + printf("EGL_MESA_screen_surface is not supported\n"); + exit(1); + } eglGetConfigs(d, configs, 10, &numConfigs); printf("Got %d EGL configs:\n", numConfigs); -- 2.30.2