<p dir="ltr">I think this is a case where using the forward compatibility bit may be a reasonable fix. This is because it will always disable the compatibility profile on core...</p>
<p dir="ltr"><a href="http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts">http://www.opengl.org/wiki/Core_And_Compatibility_in_Contexts</a></p>
<div class="gmail_quote">On Jun 18, 2014 4:43 PM, "Chad Versace" <<a href="mailto:chad.versace@intel.com">chad.versace@intel.com</a>> wrote:<br type="attribution"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
On Wed, Jun 18, 2014 at 12:29:09AM +0100, Emil Velikov wrote:<br>
> On 17/06/14 23:50, Ian Romanick wrote:<br>
> > On 06/16/2014 11:29 PM, Ilia Mirkin wrote:<br>
<br>
> > This poses a problem for piglit.  We want to make tests for things that<br>
> > don't have GL_ARB_compatibility, but we can't actually ask for that.<br>
> > When a test says<br>
> ><br>
> >     config.supports_gl_core_version = 31;<br>
> ><br>
> > Waffle uses glXCreateContextAttribsARB to create 3.1 context.  It then<br>
> > checks to see whether or not that context has GL_ARB_compatibility.  If<br>
> > it does, then context creation fails.  Waffle will then try to create<br>
> > some other kind of context if you set another supports_gl_* value.<br>
> ><br>
> Waffle itself does not check for GL_ARB_compat when creating a context. The<br>
> decision of what to do if the extension is available is left to the user -<br>
> which imho is the only sane solution.<br>
><br>
> From the man page<br>
>    If the chosen API is <constant>WAFFLE_CONTEXT_OPENGL</constant><br>
>    and version 3.1 is requested,<br>
>    then the returned context may implement any of:<br>
><br>
>     * Version 3.1, with or without the GL_ARB_compatibility extension.<br>
>     * The core profile of version 3.2 or greater.<br>
><br>
> > I think this is a bug in Waffle (or maybe piglit's usage of Waffle).  If<br>
> > a 3.1 context with GL_ARB_compatibility was created, Waffle should try<br>
> > again by asking for a 3.2 core profile.<br>
> ><br>
> >> This seems to come from piglit_wfl_framework.c:special_case_gl_31.<br>
> >><br>
> >> Unfortunately I know ~nothing about the subtleties of all this, but<br>
> >> what's the way forward? Is the driver at fault? Piglit? FTR, changing<br>
> >> the supports_gl_core_version to 32 fixes it.<br>
<br>
This is not a bug in Waffle. Waffle does the only sane and correct<br>
thing. Waffle could do the thing you want only if the OpenGL API were<br>
more friendly to middleware libraries. Specifically, OpenGL needs to<br>
provide an API with an explicit context parameter.<br>
<br>
The bug is in Piglit.<br>
<br>
I wrote a fix that gives Ilia the behavior he wants. I'm regression<br>
testing the fix right now.<br>
_______________________________________________<br>
Piglit mailing list<br>
<a href="mailto:Piglit@lists.freedesktop.org">Piglit@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/piglit" target="_blank">http://lists.freedesktop.org/mailman/listinfo/piglit</a><br>
</blockquote></div>