summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch')
-rw-r--r--meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch75
1 files changed, 75 insertions, 0 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch b/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
new file mode 100644
index 0000000000..b3931ddf99
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
@@ -0,0 +1,75 @@
1From f3bb10947a87cc3a59619847f53d47708e10fbb7 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
3Date: Wed, 17 May 2017 10:51:48 -0500
4Subject: [PATCH 4/4] egl_mesa_platform_surfaceless: Use EXT functions for
5 surfaces
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10These EXT symbols are guaranteed to exist since they require
11EGL_EXT_platform_base.
12
13Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
14---
15 .../egl_mesa_platform_surfaceless.c | 23 ++++++++++++++++++++--
16 1 file changed, 21 insertions(+), 2 deletions(-)
17
18diff --git a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
19index 81a3919..264ed71 100644
20--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
21+++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
22@@ -24,6 +24,24 @@
23 #include "piglit-util.h"
24 #include "piglit-util-egl.h"
25
26+/* Extension function pointers.
27+ *
28+ * Use prefix 'pegl' (piglit egl) instead of 'egl' to avoid collisions with
29+ * prototypes in eglext.h. */
30+EGLSurface (*peglCreatePlatformPixmapSurfaceEXT)(EGLDisplay display, EGLConfig config,
31+ NativePixmapType native_pixmap, const EGLint *attrib_list);
32+EGLSurface (*peglCreatePlatformWindowSurfaceEXT)(EGLDisplay display, EGLConfig config,
33+ NativeWindowType native_window, const EGLint *attrib_list);
34+
35+static void
36+init_egl_extension_funcs(void)
37+{
38+ peglCreatePlatformPixmapSurfaceEXT = (void*)
39+ eglGetProcAddress("eglCreatePlatformPixmapSurfaceEXT");
40+ peglCreatePlatformWindowSurfaceEXT = (void*)
41+ eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT");
42+}
43+
44 static void
45 test_setup(EGLDisplay *dpy)
46 {
47@@ -72,7 +90,7 @@ test_create_window(void *test_data)
48
49 test_setup(&dpy);
50
51- surf = eglCreatePlatformWindowSurface(dpy, EGL_NO_CONFIG_KHR,
52+ surf = peglCreatePlatformWindowSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
53 /*native_window*/ NULL,
54 /*attrib_list*/ NULL);
55 if (surf) {
56@@ -103,7 +121,7 @@ test_create_pixmap(void *test_data)
57
58 test_setup(&dpy);
59
60- surf = eglCreatePlatformPixmapSurface(dpy, EGL_NO_CONFIG_KHR,
61+ surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
62 /*native_window*/ NULL,
63 /*attrib_list*/ NULL);
64 if (surf) {
65@@ -205,6 +223,7 @@ main(int argc, char **argv)
66 piglit_report_result(PIGLIT_FAIL);
67 }
68
69+ init_egl_extension_funcs();
70 result = piglit_run_selected_subtests(subtests, selected_names,
71 num_selected, result);
72 piglit_report_result(result);
73--
741.9.1
75