[waffle] [PATCH 1/3] glx: don't use ARB_create_context with pre 3.0 contexts
Chad Versace
chad.versace at intel.com
Fri Apr 15 19:04:31 UTC 2016
On 04/06/2016 02:12 AM, Jose Fonseca wrote:
> On 05/04/16 22:45, Emil Velikov wrote:
>> This way if the user requests GL pre 3.0 context which lacks the
>> flags/extra bits which require ARB_create_context one can safely fall
>> back to the normal/legacy entry point.
>>
>> This resolves piglits on non 3.0 capable drivers such as classic swrast,
>> nouveau_vieux and alike.
>>
>> Cc: Jose Fonseca <jfonseca at vmware.com>
>> Cc: Ilia Mirkin <imirkin at alum.mit.edu>
>> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
>> +static inline bool
>> +glx_context_needs_arb_create_context(const struct wcore_config_attrs *attrs)
>> +{
>> + if (attrs->context_api == WAFFLE_CONTEXT_OPENGL &&
>> + (wcore_config_attrs_version_ge(attrs, 30) ||
>> + attrs->context_forward_compatible))
>> + return true;
>> +
>> + if (attrs->context_debug)
>> + return true;
>> +
>> + return false;
>> +}
> Looks good to me. Thanks.
>
> Reviewed-by: Jose Fonseca <jfonseca at vmware.com>
I reviewed the thread on the Piglit list, and I'm in favor of this change.
Jose and Emil, I believe the critical version should be 3.2, not 3.0. I don't
understand why this patch uses 3.0 as the cutoff version. The
GLX_ARB_create_context spec says:
The presence of an OpenGL 3.2 or later implementation determines whether or
not GLX_ARB_create_context_profile is required.
And the WGL spec contains the same text.
In other words, it never makes sense to request a 3.2 context without
GLX_ARB_create_context, because the availability of 3.2 mandates the
availability of GLX_ARB_create_context_profile.
More information about the waffle
mailing list