summaryrefslogtreecommitdiffstats
path: root/meta/recipes-graphics
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-graphics')
-rw-r--r--meta/recipes-graphics/piglit/piglit/0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch48
-rw-r--r--meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch30
-rw-r--r--meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch75
3 files changed, 153 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 @@
1From aa6728cc4941a87e3933c2aa770ab8ae3080b870 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
3Date: Tue, 16 May 2017 12:37:07 -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
9Signed-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
14diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c
15index 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--
471.9.1
48
diff --git a/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
new file mode 100644
index 0000000000..7ec71dd91d
--- /dev/null
+++ b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch
@@ -0,0 +1,30 @@
1From b02bdbfdba3464ce47f87c04bcd1d35a8fef3f54 Mon Sep 17 00:00:00 2001
2From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
3Date: Wed, 17 May 2017 17:53:10 -0500
4Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use
5 eglGetPlatformDisplay directly
6MIME-Version: 1.0
7Content-Type: text/plain; charset=UTF-8
8Content-Transfer-Encoding: 8bit
9
10Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
11---
12 .../spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c | 2 +-
13 1 file changed, 1 insertion(+), 1 deletion(-)
14
15diff --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
16index 3bbd6aa..81a3919 100644
17--- a/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
18+++ b/tests/egl/spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c
19@@ -31,7 +31,7 @@ test_setup(EGLDisplay *dpy)
20
21 piglit_require_egl_extension(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless");
22
23- *dpy = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, NULL, NULL);
24+ *dpy = piglit_egl_get_default_display(EGL_PLATFORM_SURFACELESS_MESA);
25 if (*dpy == EGL_NO_DISPLAY) {
26 printf("failed to get EGLDisplay\n");
27 piglit_report_result(PIGLIT_SKIP);
28--
291.9.1
30
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