Mesa (master): progs/egl: Check EGL_MESA_screen_surface is supported in demo2.
Brian Paul
brianp at kemper.freedesktop.org
Wed Sep 30 14:19:54 UTC 2009
Module: Mesa
Branch: master
Commit: 28c2190336aec5b0b1d0f74d08e32dc604bcc4c1
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=28c2190336aec5b0b1d0f74d08e32dc604bcc4c1
Author: Chia-I Wu <olvaffe at gmail.com>
Date: Wed Sep 30 12:13:34 2009 +0800
progs/egl: Check EGL_MESA_screen_surface is supported in demo2.
Signed-off-by: Chia-I Wu <olvaffe at gmail.com>
---
progs/egl/demo2.c | 6 ++++++
1 files changed, 6 insertions(+), 0 deletions(-)
diff --git a/progs/egl/demo2.c b/progs/egl/demo2.c
index 5817771..3994656 100644
--- a/progs/egl/demo2.c
+++ b/progs/egl/demo2.c
@@ -7,6 +7,7 @@
#include <assert.h>
#include <stdio.h>
#include <stdlib.h>
+#include <string.h>
#include <unistd.h>
#include <EGL/egl.h>
@@ -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);
More information about the mesa-commit
mailing list