From c63903443bab75cda3bfccb8f872985bd7e943c0 Mon Sep 17 00:00:00 2001 From: Daniel Díaz Date: Wed, 7 Jun 2017 09:51:21 -0500 Subject: piglit: add patches for unbuildable surfaceless Mesa test MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit [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 Signed-off-by: Richard Purdie --- ...atform_surfaceless-Use-EXT-functions-for-.patch | 78 ++++++++++++++++++++++ 1 file changed, 78 insertions(+) create mode 100644 meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch (limited to 'meta/recipes-graphics/piglit/piglit/0004-egl_mesa_platform_surfaceless-Use-EXT-functions-for-.patch') 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 @@ +From 57de1ff6758ec5ea4a52637f233e3e3150086255 Mon Sep 17 00:00:00 2001 +From: Daniel Diaz +Date: Wed, 17 May 2017 18:00:17 -0500 +Subject: [PATCH 4/4] egl_mesa_platform_surfaceless: Use EXT functions for + surfaces +MIME-Version: 1.0 +Content-Type: text/plain; charset=UTF-8 +Content-Transfer-Encoding: 8bit + +These EXT symbols are guaranteed to exist since they require +EGL_EXT_platform_base. + +Upstream-Status: Accepted, since git 7b74602. + +Signed-off-by: Daniel Díaz +Reviewed-by: Emil Velikov +--- + .../egl_mesa_platform_surfaceless.c | 23 ++++++++++++++++++++-- + 1 file changed, 21 insertions(+), 2 deletions(-) + +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 +index 81a3919..264ed71 100644 +--- 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 +@@ -24,6 +24,24 @@ + #include "piglit-util.h" + #include "piglit-util-egl.h" + ++/* Extension function pointers. ++ * ++ * Use prefix 'pegl' (piglit egl) instead of 'egl' to avoid collisions with ++ * prototypes in eglext.h. */ ++EGLSurface (*peglCreatePlatformPixmapSurfaceEXT)(EGLDisplay display, EGLConfig config, ++ NativePixmapType native_pixmap, const EGLint *attrib_list); ++EGLSurface (*peglCreatePlatformWindowSurfaceEXT)(EGLDisplay display, EGLConfig config, ++ NativeWindowType native_window, const EGLint *attrib_list); ++ ++static void ++init_egl_extension_funcs(void) ++{ ++ peglCreatePlatformPixmapSurfaceEXT = (void*) ++ eglGetProcAddress("eglCreatePlatformPixmapSurfaceEXT"); ++ peglCreatePlatformWindowSurfaceEXT = (void*) ++ eglGetProcAddress("eglCreatePlatformWindowSurfaceEXT"); ++} ++ + static void + test_setup(EGLDisplay *dpy) + { +@@ -72,7 +90,7 @@ test_create_window(void *test_data) + + test_setup(&dpy); + +- surf = eglCreatePlatformWindowSurface(dpy, EGL_NO_CONFIG_KHR, ++ surf = peglCreatePlatformWindowSurfaceEXT(dpy, EGL_NO_CONFIG_KHR, + /*native_window*/ NULL, + /*attrib_list*/ NULL); + if (surf) { +@@ -103,7 +121,7 @@ test_create_pixmap(void *test_data) + + test_setup(&dpy); + +- surf = eglCreatePlatformPixmapSurface(dpy, EGL_NO_CONFIG_KHR, ++ surf = peglCreatePlatformPixmapSurfaceEXT(dpy, EGL_NO_CONFIG_KHR, + /*native_window*/ NULL, + /*attrib_list*/ NULL); + if (surf) { +@@ -205,6 +223,7 @@ main(int argc, char **argv) + piglit_report_result(PIGLIT_FAIL); + } + ++ init_egl_extension_funcs(); + result = piglit_run_selected_subtests(subtests, selected_names, + num_selected, result); + piglit_report_result(result); +-- +1.9.1 + -- cgit v1.2.3-54-g00ecf