[Piglit] [PATCH 2/2] egl: Add test egl-create-context-verify-gl-flavor (v2)

Ian Romanick idr at freedesktop.org
Wed Nov 14 16:28:48 PST 2012


On 11/14/2012 08:29 AM, Chad Versace wrote:
> On 11/13/2012 04:36 PM, Ian Romanick wrote:
>> On 11/09/2012 11:45 AM, Chad Versace wrote:
>>> This test requests various flavors (that is, api and version and profile) of
>>> contexts and verifies that the context's actual flavor is compatible with
>>> the requested flavor.
>>>
>>> The following subcases fail on mesa-a196f43 with Intel Sandybridge:
>>>       - For each OpenGL context >= 3.2, context creation fails with EGL
>>>         error EGL_SUCCESS.
>>>       - For OpenGL ES 3.0, the context version reported by glGetString is
>>>         2.0.
>>> All other cases skip or pass.
>>>
>>> v2:
>>>       - Document that we use eglGetProcAddress to avoid piglit-dispatch.
>>>       - Also verify that glGetString(GL_VERSION) and
>>>         glGetIntgerv(GL_MAJOR/MINOR_VERSION) return the same version.
>>>
>>> CC: Matt Turner <mattst88 at gmail.com>
>>> CC: Iam Romanick <idr at freedesktop.org>
>>> Signed-off-by: Chad Versace <chad.versace at linux.intel.com>
>>> ---
>>>
>>> Ian, I see your point in the foolishness of using eglGetProcAddress for the
>>> core functions. I tried your suggestion and attempted to use the statically
>>> available glGetIntegerv in this test, but got a surprise from piglit-dispatch.
>>>
>>> So, I still insist that we should use eglGetProcAddress in this test, but now
>>> for a different reason. See the comments in main().
>>>
>>>
>>>    tests/all_egl.tests                                |   1 +
>>>    .../spec/egl_khr_create_context/CMakeLists.gl.txt  |   1 +
>>>    .../spec/egl_khr_create_context/verify-gl-flavor.c | 443 +++++++++++++++++++++
>>>    3 files changed, 445 insertions(+)
>>>    create mode 100644 tests/egl/spec/egl_khr_create_context/verify-gl-flavor.c
>>>
>
>
>>> +    if (!eglMakeCurrent(egl_dpy, EGL_NO_SURFACE,
>>> +                EGL_NO_SURFACE, ctx)) {
>>> +        printf("%s", "error: failed to make context current\n");
>>> +        goto fail;
>>> +    }
>>
>> I missed this before.  This usage requires EGL_KHR_surfaceless_context.  At this
>> point, I think it's fine to require that extension.  If someone wants to run
>> this test on an implementation that doesn't support it, we will welcome patches
>> from them.
>
> It's not apparent from this patch, but the test does skip if EGL_KHR_surfaceless_context
> is not present. The function EGL_KHR_create_context_setup(), shared among all the
> EGL_KHR_create_context tests, handles the extension verification.

Ah.

Reviewed-by: Ian Romanick <ian.d.romanick at intel.com>



More information about the Piglit mailing list