[Piglit] [PATCH 1/2] egl_khr_create_context: Fix for drivers that don't support GL >= 2.0
Matt Turner
mattst88 at gmail.com
Mon Jan 28 17:29:50 PST 2013
On Mon, Jan 28, 2013 at 5:04 PM, Chad Versace
<chad.versace at linux.intel.com> wrote:
> Fix for test egl_khr_create_context/default-minor-version-gl.
>
> According to comments in the test: "The Linux OpenGL ABI only requires
> OpenGL 1.2, so this might fail to create a context." If the driver failed
> to create a 2.x context, then the test failed. This patch changes it to
> skip.
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=59510
> Reported-by: Lu Hua <huax.lu at intel.com>
> CC: Matt Turner <mattst88 at gmail.com>
> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
> ---
> tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c | 6 ++++--
> 1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
> index ef61067..77050df 100644
> --- a/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
> +++ b/tests/egl/spec/egl_khr_create_context/default-minor-version-gl.c
> @@ -54,8 +54,10 @@ int main(int argc, char **argv)
> */
> ctx = eglCreateContext(egl_dpy, cfg, EGL_NO_CONTEXT, attribs);
> if (ctx == EGL_NO_CONTEXT) {
> - fprintf(stderr, "eglCreateContext() failed\n");
> - piglit_report_result(PIGLIT_FAIL);
> + fprintf(stderr, "eglCreateContext() failed with "
> + "EGL_CONTEXT_MAJOR_VERSION_KHR=%d. skipping "
> + "test.\n", attribs[1]);
> + piglit_report_result(PIGLIT_SKIP);
> }
>
> if (!eglMakeCurrent(egl_dpy, EGL_NO_SURFACE, EGL_NO_SURFACE, ctx)) {
> --
> 1.8.1.1
Sort of undermines the purpose of the test, but I allowing non-2.0
drivers to pass/skip while still being a useful test is sort of hard.
I'd have to think about a better solution.
Your call. Acked-by: Matt Turner <mattst88 at gmail.com>
More information about the Piglit
mailing list