diff options
Diffstat (limited to 'meta/recipes-graphics')
4 files changed, 171 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 @@ | |||
1 | From a6608f218b5023cef36b3de5ec3c5f00b0211d1c Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Diaz <daniel.diaz@linaro.org> | ||
3 | Date: Wed, 17 May 2017 18:00:15 -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 | The EGL_MESA_platform_surfaceless extension was introduced not too long | ||
10 | ago. Add support for it our helper. | ||
11 | |||
12 | Upstream-Status: Accepted, since git 7b74602. | ||
13 | |||
14 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
15 | Reviewed-by: Emil Velikov <emil.velikov@collabora.com> | ||
16 | --- | ||
17 | tests/util/piglit-util-egl.c | 7 +++++++ | ||
18 | 1 file changed, 7 insertions(+) | ||
19 | |||
20 | diff --git a/tests/util/piglit-util-egl.c b/tests/util/piglit-util-egl.c | ||
21 | index 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 | -- | ||
53 | 1.9.1 | ||
54 | |||
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..0f24dc1815 --- /dev/null +++ b/meta/recipes-graphics/piglit/piglit/0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch | |||
@@ -0,0 +1,36 @@ | |||
1 | From c0dc430b8f5deeacdb11cd188195e16f512af233 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Diaz <daniel.diaz@linaro.org> | ||
3 | Date: Wed, 17 May 2017 18:00:16 -0500 | ||
4 | Subject: [PATCH 3/4] egl_mesa_platform_surfaceless: Don't use | ||
5 | eglGetPlatformDisplay directly | ||
6 | MIME-Version: 1.0 | ||
7 | Content-Type: text/plain; charset=UTF-8 | ||
8 | Content-Transfer-Encoding: 8bit | ||
9 | |||
10 | The entry point is not guaranteed to exist, so use the | ||
11 | piglit_egl_get_default_display() helper which does the correct thing. | ||
12 | |||
13 | Upstream-Status: Accepted, since git 7b74602. | ||
14 | |||
15 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
16 | Reviewed-by: Emil Velikov <emil.velikov@collabora.com> | ||
17 | --- | ||
18 | .../spec/egl_mesa_platform_surfaceless/egl_mesa_platform_surfaceless.c | 2 +- | ||
19 | 1 file changed, 1 insertion(+), 1 deletion(-) | ||
20 | |||
21 | 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 | ||
22 | index 3bbd6aa..81a3919 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 | @@ -31,7 +31,7 @@ test_setup(EGLDisplay *dpy) | ||
26 | |||
27 | piglit_require_egl_extension(EGL_NO_DISPLAY, "EGL_MESA_platform_surfaceless"); | ||
28 | |||
29 | - *dpy = eglGetPlatformDisplay(EGL_PLATFORM_SURFACELESS_MESA, NULL, NULL); | ||
30 | + *dpy = piglit_egl_get_default_display(EGL_PLATFORM_SURFACELESS_MESA); | ||
31 | if (*dpy == EGL_NO_DISPLAY) { | ||
32 | printf("failed to get EGLDisplay\n"); | ||
33 | piglit_report_result(PIGLIT_SKIP); | ||
34 | -- | ||
35 | 1.9.1 | ||
36 | |||
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 @@ | |||
1 | From 57de1ff6758ec5ea4a52637f233e3e3150086255 Mon Sep 17 00:00:00 2001 | ||
2 | From: Daniel Diaz <daniel.diaz@linaro.org> | ||
3 | Date: Wed, 17 May 2017 18:00:17 -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 | Upstream-Status: Accepted, since git 7b74602. | ||
14 | |||
15 | Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org> | ||
16 | Reviewed-by: Emil Velikov <emil.velikov@collabora.com> | ||
17 | --- | ||
18 | .../egl_mesa_platform_surfaceless.c | 23 ++++++++++++++++++++-- | ||
19 | 1 file changed, 21 insertions(+), 2 deletions(-) | ||
20 | |||
21 | 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 | ||
22 | index 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 | -- | ||
77 | 1.9.1 | ||
78 | |||
diff --git a/meta/recipes-graphics/piglit/piglit_git.bb b/meta/recipes-graphics/piglit/piglit_git.bb index 19db86c70b..2ea57794a6 100644 --- a/meta/recipes-graphics/piglit/piglit_git.bb +++ b/meta/recipes-graphics/piglit/piglit_git.bb | |||
@@ -6,6 +6,9 @@ SRC_URI = "git://anongit.freedesktop.org/piglit \ | |||
6 | file://0001-cmake-install-bash-completions-in-the-right-place.patch \ | 6 | file://0001-cmake-install-bash-completions-in-the-right-place.patch \ |
7 | file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ | 7 | file://0001-tests-Use-FE_UPWARD-only-if-its-defined-in-fenv.h.patch \ |
8 | file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch \ | 8 | file://0001-CMake-define-GBM_BO_MAP-only-when-symbol-is-found.patch \ |
9 | file://0002-util-egl-Honour-Surfaceless-MESA-in-get_default_disp.patch \ | ||
10 | file://0003-egl_mesa_platform_surfaceless-Don-t-use-eglGetPlatfo.patch \ | ||
11 | file://0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch \ | ||
9 | " | 12 | " |
10 | 13 | ||
11 | # From 2017-02-06 | 14 | # From 2017-02-06 |