From: Chia-I Wu Date: Wed, 30 Sep 2009 04:13:34 +0000 (+0800) Subject: progs/egl: Check EGL_MESA_screen_surface is supported in demo2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=28c2190336aec5b0b1d0f74d08e32dc604bcc4c1;p=mesa.git progs/egl: Check EGL_MESA_screen_surface is supported in demo2. Signed-off-by: Chia-I Wu --- 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);