diff options
author | Daniel Díaz <daniel.diaz@linaro.org> | 2017-05-18 13:22:37 -0500 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2017-05-30 10:15:19 +0100 |
commit | 0c40be9088f2fa2f02d6916a140967c80943fffd (patch) | |
tree | efe3902959e88fde3df55f1854a580cac6e95145 /meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch | |
parent | 58ca310b625a55dc56980112e51535f29addabb5 (diff) | |
download | poky-0c40be9088f2fa2f02d6916a140967c80943fffd.tar.gz |
piglit: add patches for unbuildable surfaceless Mesa test
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.
Upstream-Status: Submitted [piglit@lists.freedesktop.org]
(From OE-Core rev: 4f85500cfc76407fb4950bbb0df216577aea6bd7)
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-.patch | 75 |
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 @@ | |||
1 | From f3bb10947a87cc3a59619847f53d47708e10fbb7 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> | ||
3 | Date: Wed, 17 May 2017 10:51:48 -0500 | ||
4 | Subject: [PATCH 4/4] egl_mesa_platform_surfaceless: Use EXT functions for | ||
5 | surfaces | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | These EXT symbols are guaranteed to exist since they require | ||
11 | EGL_EXT_platform_base. | ||
12 | |||
13 | Signed-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 | |||
18 | diff --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 | ||
19 | index 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 | -- | ||
74 | 1.9.1 | ||
75 | |||