blob: 12e0805f15284fefbea89fae31eaee9862a8eccf [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001From 6a19dba1d275579c73e7763b0554410ff4e1e650 Mon Sep 17 00:00:00 2001
2From: Frank Binns <frank.binns@imgtec.com>
3Date: Fri, 29 Jun 2012 12:00:26 +0100
4Subject: [PATCH 6/9] Query display for EGL_MESA_screen_surface extension
5 before using it
6
7This code makes heavy use of the EGL_MESA_screen_surface extension so
8check the display to determine if it's supported by the underlying EGL
9implementation. If it doesn't then bail.
10
11Signed-off-by: Frank Binns <frank.binns@imgtec.com>
12
13Applied and fixed up in Yocto by...
14
15Integrated-by: Tom Zanussi <tom.zanussi@linux.intel.com>
16
17Upstream-Status: Pending
18---
19 src/egl/opengl/demo1.c | 6 ++++++
20 1 file changed, 6 insertions(+)
21
22diff --git a/src/egl/opengl/demo1.c b/src/egl/opengl/demo1.c
23index 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--
402.0.0
41