summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
diff options
context:
space:
mode:
authorDaniel Díaz <daniel.diaz@linaro.org>2017-06-07 09:51:21 -0500
committerRichard Purdie <richard.purdie@linuxfoundation.org>2017-06-12 17:03:17 +0100
commitc63903443bab75cda3bfccb8f872985bd7e943c0 (patch)
tree456d1baa4e126ec555e2ba5750318e4544e7bacc /meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
parent262af7bf2d22d3a41865965b21aec06d9b9976cc (diff)
downloadpoky-c63903443bab75cda3bfccb8f872985bd7e943c0.tar.gz
piglit: add patches for unbuildable surfaceless Mesa test
[Backported from master.] Some EGL implementations do not actually ship all Khronos- extensions. As it turns out, the Mali 450 driver does not include any of the following symbols, used by the egl_mesa_platform_surfaceless.c spec test: * eglGetPlatformDisplay * eglCreatePlatformPixmapSurface * eglCreatePlatformWindowSurface The Right Thing To Do was to obtain the implementation of these functions (via eglGetProcAddress), as is provided by their EXT counterparts. These are guaranteed to exist since they are required by EGL_EXT_platform_base. (From OE-Core rev: 903a051d47e550553aa9d6d9c38c43737f376cfe) Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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-.patch78
1 files changed, 78 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..0952af5821
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch
@@ -0,0 +1,78 @@
1From 57de1ff6758ec5ea4a52637f233e3e3150086255 Mon Sep 17 00:00:00 2001
2From: Daniel Diaz <daniel.diaz@linaro.org>
3Date: Wed, 17 May 2017 18:00:17 -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
13Upstream-Status: Accepted, since git 7b74602.
14
15Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
16Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
17---
18 .../egl_mesa_platform_surfaceless.c | 23 ++++++++++++++++++++--
19 1 file changed, 21 insertions(+), 2 deletions(-)
20
21diff --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
22index 81a3919..264ed71 100644
23--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
24+++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
25@@ -24,6 +24,24 @@
26 #include "piglit-util.h"
27 #include "piglit-util-egl.h"
28
29+/* Extension function pointers.
30+ *
31+ * Use prefix 'pegl' (piglit egl) instead of 'egl' to avoid collisions with
32+ * prototypes in eglext.h. */
33+EGLSurface (*peglCreatePlatformPixmapSurfaceEXT)(EGLDisplay display, EGLConfig config,
34+ NativePixmapType native_pixmap, const EGLint *attrib_list);
35+EGLSurface (*peglCreatePlatformWindowSurfaceEXT)(EGLDisplay display, EGLConfig config,
36+ NativeWindowType native_window, const EGLint *attrib_list);
37+
38+static void
39+init_egl_extension_funcs(void)
40+{
41+ peglCreatePlatformPixmapSurfaceEXT = (void*)
42+ eglGetProcAddress("eglCreatePlatformPixmapSurfaceEXT");
43+ peglCreatePlatformWindowSurfaceEXT = (void*)
44+ eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT");
45+}
46+
47 static void
48 test_setup(EGLDisplay *dpy)
49 {
50@@ -72,7 +90,7 @@ test_create_window(void *test_data)
51
52 test_setup(&dpy);
53
54- surf = eglCreatePlatformWindowSurface(dpy, EGL_NO_CONFIG_KHR,
55+ surf = peglCreatePlatformWindowSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
56 /*native_window*/ NULL,
57 /*attrib_list*/ NULL);
58 if (surf) {
59@@ -103,7 +121,7 @@ test_create_pixmap(void *test_data)
60
61 test_setup(&dpy);
62
63- surf = eglCreatePlatformPixmapSurface(dpy, EGL_NO_CONFIG_KHR,
64+ surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR,
65 /*native_window*/ NULL,
66 /*attrib_list*/ NULL);
67 if (surf) {
68@@ -205,6 +223,7 @@ main(int argc, char **argv)
69 piglit_report_result(PIGLIT_FAIL);
70 }
71
72+ init_egl_extension_funcs();
73 result = piglit_run_selected_subtests(subtests, selected_names,
74 num_selected, result);
75 piglit_report_result(result);
76--
771.9.1
78