Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001 |
| 2 | From: Frank Binns <frank.binns@imgtec.com> |
| 3 | Date: Fri, 29 Jun 2012 12:00:26 +0100 |
| 4 | Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension |
| 5 | before using it |
| 6 | |
| 7 | This code makes heavy use of the EGL_MESA_screen_surface extension so |
| 8 | check the display to determine if it's supported by the underlying EGL |
| 9 | implementation. If it doesn't then bail. |
| 10 | |
| 11 | Signed-off-by: Frank Binns <frank.binns@imgtec.com> |
| 12 | |
| 13 | Applied and fixed up in Yocto by... |
| 14 | |
| 15 | Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com> |
| 16 | |
| 17 | Upstream-Status: Pending |
| 18 | --- |
| 19 | src/egl/opengl/demo1.c | 6 ++++++ |
| 20 | 1 file changed, 6 insertions(+) |
| 21 | |
| 22 | diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c |
| 23 | index 3a3564c..06e2138 100644 |
| 24 | --- a/src/egl/opengl/demo1.c |
| 25 | +++ b/src/egl/opengl/demo1.c |
| 26 | @@ -110,6 +110,12 @@ main(int argc, char *argv[]) |
| 27 | printf("EGL version = %d.%d\n", maj, min); |
| 28 | printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR)); |
| 29 | |
| 30 | + if (!strstr(eglQueryString(d, EGL_EXTENSIONS), |
| 31 | + "EGL_MESA_screen_surface")) { |
| 32 | + printf("EGL_MESA_screen_surface is not supported\n"); |
| 33 | + exit(1); |
| 34 | + } |
| 35 | + |
| 36 | eglGetConfigs(d, NULL, 0, &numConfigs); |
| 37 | configs = malloc(sizeof(*configs) *numConfigs); |
| 38 | eglGetConfigs(d, configs, numConfigs, &numConfigs); |
| 39 | -- |
| 40 | 2.0.0 |
| 41 | |