[Piglit] [PATCH 5/5] glx_ext_create_context_es2_profile: Verify that the invalid ES versions are rejected

James Jones jajones at nvidia.com
Tue Jun 12 15:33:04 PDT 2012


On 6/12/12 3:13 PM, Ian Romanick wrote:
> On 06/12/2012 02:40 PM, James Jones wrote:
>> On 6/12/12 2:25 PM, Ian Romanick wrote:
>>> From: Ian Romanick<ian.d.romanick at intel.com>
>>>
>>> NVIDIA's closed-source driver fails this test.  GLXBadProfileARB is
>>> generated instead of BadMatch.  The specification isn't specific about
>>> what error should be generated, but I don't think GLXBadProfileARB is
>>> correct.  GLXBadProfileARB seems to only be generated in cases where
>>> the bit mask specified for GLX_CONTEXT_PROFILE_MASK_ARB is invalid.
>>> Cases where the GLX_CONTEXT_PROFILE_MASK_ARB is incongruous with the
>>> specified version either result in GLX_CONTEXT_PROFILE_MASK_ARB being
>>> ignored or BadMatch.
>>
>> GLXBadProfileARB fell out more naturally from our implementation. I
>> see no good argument for either side. I think I could construct an
>> equally convincing case for generating GLXBadProfileARB, but I don't
>> have a strong opinion. If you really want it to be BadMatch, I can
>> update our implementation and the spec to conform to that as well, so we
>> can be consistent at least.
> 
> Since it appears you are the only shipping implementation, I'm content
> with having the first one be the winner.  I'll submit a bug against the
> spec with some suggested language change.
> 
> Something like...
> 
> Replace:
> 
>      "... If the GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set, and the
>       requested version is 2.0, then a context implementing OpenGL ES 2.0
>       is returned; otherwise, if the requested OpenGL version is less than
>       3.2, GLX_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality
>       of the context is determined solely by the requested version."
> 
> with
> 
>      "... If the GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set, and the
>       requested version is 2.0, then a context implementing OpenGL ES 2.0
>       is returned.  If the GLX_CONTEXT_ES2_PROFILE_BIT_EXT bit is set,
>       and the requested version is not 2.0, the error GLXBadProfileARB is
>       generated.  Otherwise, if the requested OpenGL version is less than
>       3.2, GLX_CONTEXT_PROFILE_MASK_ARB is ignored and the functionality
>       of the context is determined solely by the requested version."
> 
> The original language is, as worded, broken anyway.  It implies that if
> you specify GLX_CONTEXT_ES2_PROFILE_BIT_EXT and 2.1, that a desktop
> OpenGL 2.1 context should be created.
> 
> Generating GLXBadProfileARB is also consistent with
> 
>        "* If attribute GLX_CONTEXT_PROFILE_MASK_ARB has no bits set; has
>           any bits set other than GLX_CONTEXT_CORE_PROFILE_BIT_ARB and
>           GLX_CONTEXT_COMPATIBILITY_PROFILE_BIT_ARB; has more than one of
>           these bits set; or *if the implementation does not support the
>           requested profile*, then GLXBadProfileARB is generated."
>           (emphasis mine)

Right.  There are no other errors specified in the general sections of the GLX_ARB_create_context spec.  Would it be better to just add a clause to the GLXBadProfileARB bullet point above:

    "...; or if the version and profile requested are incompatible for any reason, ..."

Thanks,
-James

nvpublic


More information about the Piglit mailing list