[Piglit] Core vs compat 3.1 contexts
Emil Velikov
emil.l.velikov at gmail.com
Tue Jun 17 16:29:09 PDT 2014
On 17/06/14 23:50, Ian Romanick wrote:
> On 06/16/2014 11:29 PM, Ilia Mirkin wrote:
>> All the arb_shader_atomic_counters tests start with
>>
>> config.supports_gl_core_version = 31;
>>
>> However when I try to run them on the NVIDIA proprietary driver, I get:
>>
>> piglit: info: Requested a OpenGL 3.1 Context, but the actual context
>> is a 3.1 context that exposes the GL_ARB_compatibility extension
>> piglit: info: Failed to create any GL context
>> PIGLIT: {'result': 'skip' }
>
> Some back story: OpenGL 3.0 marked a bunch of stuff deprecated. All of
> the deprecated functionality was scheduled to be removed in the next GL
> version. OpenGL 3.1 removed all of that functionalty, but... one vendor
> was unwilling to let go of the past. As a compromise, the
> GL_ARB_compatibility extension was created.
>
> If you create an OpenGL 3.1 context you may or may not get a context
> with GL_ARB_compatibility. There is no way to request one way or the
> other at context creation... you just get what you get.
>
> OpenGL 3.2 introduced profiles. With profiles an application can ask
> for a context with or without the compatibility functionality.
>
> The only implementation of OpenGL 3.1 that does not provide
> GL_ARB_compatibility is Mesa. Apple supports either 2.1 or 3.2 core
> profile. Quite a few drivers in Mesa support only OpenGL 3.1. Quite a
> few of those are gaining 3.2 support, but some, like the Sandybridge
> driver, will probably never get 3.2.
>
> This poses a problem for piglit. We want to make tests for things that
> don't have GL_ARB_compatibility, but we can't actually ask for that.
> When a test says
>
> config.supports_gl_core_version = 31;
>
> Waffle uses glXCreateContextAttribsARB to create 3.1 context. It then
> checks to see whether or not that context has GL_ARB_compatibility. If
> it does, then context creation fails. Waffle will then try to create
> some other kind of context if you set another supports_gl_* value.
>
Waffle itself does not check for GL_ARB_compat when creating a context. The
decision of what to do if the extension is available is left to the user -
which imho is the only sane solution.
>From the man page
If the chosen API is <constant>WAFFLE_CONTEXT_OPENGL</constant>
and version 3.1 is requested,
then the returned context may implement any of:
* Version 3.1, with or without the GL_ARB_compatibility extension.
* The core profile of version 3.2 or greater.
-Emil
> I think this is a bug in Waffle (or maybe piglit's usage of Waffle). If
> a 3.1 context with GL_ARB_compatibility was created, Waffle should try
> again by asking for a 3.2 core profile.
>
>> This seems to come from piglit_wfl_framework.c:special_case_gl_31.
>>
>> Unfortunately I know ~nothing about the subtleties of all this, but
>> what's the way forward? Is the driver at fault? Piglit? FTR, changing
>> the supports_gl_core_version to 32 fixes it.
>>
>> -ilia
>> _______________________________________________
>> Piglit mailing list
>> Piglit at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/piglit
>>
>
> _______________________________________________
> Piglit mailing list
> Piglit at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/piglit
>
More information about the Piglit
mailing list