summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.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/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.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/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.patch54
1 files changed, 54 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..f3aa1ba1dd
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch
@@ -0,0 +1,54 @@
1From a6608f218b5023cef36b3de5ec3c5f00b0211d1c Mon Sep 17 00:00:00 2001
2From: Daniel Diaz <daniel.diaz@linaro.org>
3Date: Wed, 17 May 2017 18:00:15 -0500
4Subject: [PATCH 2/4] util/egl: Honour Surfaceless MESA in get_default_display
5MIME-Version: 1.0
6Content-Type: text/plain; charset=UTF-8
7Content-Transfer-Encoding: 8bit
8
9The EGL_MESA_platform_surfaceless extension was introduced not too long
10ago. Add support for it our helper.
11
12Upstream-Status: Accepted, since git 7b74602.
13
14Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
15Reviewed-by: Emil Velikov <emil.velikov@collabora.com>
16---
17 tests/util/piglit-util-egl.c | 7 +++++++
18 1 file changed, 7 insertions(+)
19
20diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
21index 106c735..389fe12 100644
22--- a/tests/util/piglit-util-egl.c
23+++ b/tests/util/piglit-util-egl.c
24@@ -85,6 +85,7 @@ piglit_egl_get_default_display(EGLenum platform)
25 static bool has_x11 = false;
26 static bool has_wayland = false;
27 static bool has_gbm = false;
28+ static bool has_surfaceless_mesa = false;
29
30 static EGLDisplay (*peglGetPlatformDisplayEXT)(EGLenum platform, void *native_display, const EGLint *attrib_list);
31
32@@ -99,6 +100,7 @@ piglit_egl_get_default_display(EGLenum platform)
33 has_x11 = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_x11");
34 has_wayland = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_wayland");
35 has_gbm = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_EXT_platform_gbm");
36+ has_surfaceless_mesa = piglit_is_egl_extension_supported(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless");
37
38 peglGetPlatformDisplayEXT = (void*) eglGetProcAddress("eglGetPlatformDisplayEXT");
39 }
40@@ -123,6 +125,11 @@ piglit_egl_get_default_display(EGLenum platform)
41 return EGL_NO_DISPLAY;
42 }
43 break;
44+ case EGL_PLATFORM_SURFACELESS_MESA:
45+ if (!has_surfaceless_mesa) {
46+ return EGL_NO_DISPLAY;
47+ }
48+ break;
49 default:
50 fprintf(stderr, "%s: unrecognized platform %#x\n", __func__, platform);
51 return EGL_NO_DISPLAY;
52--
531.9.1
54