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/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.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/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch')
-rw-r--r-- | meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch new file mode 100644 index 0000000000..734de2bc75 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch | |||
@@ -0,0 +1,48 @@ | |||
1 | From aa6728cc4941a87e3933c2aa770ab8ae3080b870 Mon Sep 17 00:00:00 2001 | ||
2 | From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org> | ||
3 | Date: Tue, 16 May 2017 12:37:07 -0500 | ||
4 | Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display | ||
5 | MIME-Version: 1.0 | ||
6 | Content-Type: text/plain; charset=UTF-8 | ||
7 | Content-Transfer-Encoding: 8bit | ||
8 | |||
9 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
10 | --- | ||
11 | tests/util/piglit-util-egl.c | 7 +++++++ | ||
12 | 1 file changed, 7 insertions(+) | ||
13 | |||
14 | diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c | ||
15 | index 106c735..389fe12 100644 | ||
16 | --- a/tests/util/piglit-util-egl.c | ||
17 | +++ b/tests/util/piglit-util-egl.c | ||
18 | @@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform) | ||
19 | static bool has_x11 = false; | ||
20 | static bool has_wayland = false; | ||
21 | static bool has_gbm = false; | ||
22 | + static bool has_surfaceless_mesa = false; | ||
23 | |||
24 | static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list); | ||
25 | |||
26 | @@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform) | ||
27 | has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_x11"); | ||
28 | has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_wayland"); | ||
29 | has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_gbm"); | ||
30 | + has_surfaceless_mesa = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless"); | ||
31 | |||
32 | peglGetPlatformDisplayEXT = (void*) eglGetProcAddress("eglGetPlatformDisplayEXT"); | ||
33 | } | ||
34 | @@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform) | ||
35 | return EGL_NO_DISPLAY; | ||
36 | } | ||
37 | break; | ||
38 | + case EGL_PLATFORM_SURFACELESS_MESA: | ||
39 | + if (!has_surfaceless_mesa) { | ||
40 | + return EGL_NO_DISPLAY; | ||
41 | + } | ||
42 | + break; | ||
43 | default: | ||
44 | fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, platform); | ||
45 | return EGL_NO_DISPLAY; | ||
46 | -- | ||
47 | 1.9.1 | ||
48 | |||