summaryrefslogtreecommitdiffstats
path: root/common/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch
diff options
context:
space:
mode:
Diffstat (limited to 'common/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch')
-rw-r--r--common/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch35
1 files changed, 35 insertions, 0 deletions
diff --git a/common/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch b/common/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch
new file mode 100644
index 0000000..7953708
--- /dev/null
+++ b/common/recipes-graphics/mesa/mesa-demos/egl-mesa-screen-surface-query.patch
@@ -0,0 +1,35 @@
1From cf90a5c0c173d017a80cde057da57c365b3b1a40 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 2/2] mesa-demos: Query display for EGL_MESA_screen_surface
5 extension 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
19Index: mesa-demos-8.0.1/src/egl/opengl/demo1.c
20===================================================================
21--- mesa-demos-8.0.1.orig/src/egl/opengl/demo1.c
22+++ mesa-demos-8.0.1/src/egl/opengl/demo1.c
23@@ -110,6 +110,12 @@ main(int argc, char *argv[])
24 printf("EGL version = %d.%d\n", maj, min);
25 printf("EGL_VENDOR = %s\n", eglQueryString(d, EGL_VENDOR));
26
27+ if (!strstr(eglQueryString(d, EGL_EXTENSIONS),
28+ "EGL_MESA_screen_surface")) {
29+ printf("EGL_MESA_screen_surface is not supported\n");
30+ exit(1);
31+ }
32+
33 eglGetConfigs(d, NULL, 0, &numConfigs);
34 configs = malloc(sizeof(*configs) *numConfigs);
35 eglGetConfigs(d, configs, numConfigs, &numConfigs);