On 15/04/16 20:04, Chad Versace wrote:
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 <jfons...@vmware.com>
Cc: Ilia Mirkin <imir...@alum.mit.edu>
Signed-off-by: Emil Velikov <emil.l.veli...@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 <jfons...@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.


I somehow thought the requirement was introduced in 3.0, but it's indeed 3.2.


Jose
_______________________________________________
waffle mailing list
waffle@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/waffle

Reply via email to