[Piglit] [PATCH 2/2] gles-2.0: Check that ES 3 queries are not allowed in ES 2

Matt Turner mattst88 at gmail.com
Tue Dec 11 10:12:34 PST 2012


On Tue, Dec 11, 2012 at 9:57 AM, Eric Anholt <eric at anholt.net> wrote:
> Matt Turner <mattst88 at gmail.com> writes:
>> +void
>> +piglit_init(int argc, char **argv)
>> +{
>> +     /* ES 3 adds many new queries over ES 2. This test confirms that ES 2
>> +      * correctly rejects them with an INVALID_OPERATION error.
>> +      */
>> +     static const struct {
>> +             const char *name;
>> +             GLenum val;
>> +     } query[] = {
>> +             /* GL_ARB_ES3_compatibility */
>> +             { "GL_MAX_ELEMENT_INDEX", 0x8D6B },
>
> I guess we can't use piglit_get_gl_enum_name() because it doesn't cover
> these with this tests built for GLES2?  Or we don't have the enums
> included in our build at all?

Right, we don't have a piglit_get_gl_enum_name() for gles2 and it
wouldn't contain these enums anyway. Although I wonder why we need an
piglit_get_gl_enum_name for GL and another for GLES3. Do we have any
collisions?

Also, including non-GLES2 headers to get these enums doesn't seem right.

>> +             /* GL_ARB_framebuffer_object */
>> +             { "GL_MAX_SAMPLES", 0x8D57 },
>
> Have you confirmed that the enums in this list don't get exposed by any
> of the extensions we suppport?  That was my concern with this patch.

They are exposed by extensions we support, but not under GLES2. I
pulled all of these enums from my Mesa patches that enable them for
GLES3.

>> +     for (i = 0; i < ARRAY_SIZE(query); i++) {
>> +             glGetInteger64v(query[i].val, &param);
>
> I'm confused, I don't see glGetInteger64v in my GLES2 spec.

Right, fixed in v2.


More information about the Piglit mailing list