Skip to content

Conversation

@castholm
Copy link
Contributor

b28b214 (PR: #662; issue: #656; CC: @zmike, @oddhack) introduced api="glcore" on <require> elements. This broke my code generator when I recently tried to update it to the latest gl.xml.

I tried to update my processing of gl.xml, but the problem is that using api="gl" and api="glcore" the way b28b214 did is fundamentally incompatible with how extensions have been defined in the past.

In other extensions, <require api="gl"> matches both the Compatibility and Core profiles. profile="compatibility" is used to further specify features that are exclusive to Compatibility. glcore is only ever used for <extension supported="gl|glcore">, never for anything else. For example:

<extension name="GL_ARB_vertex_type_2_10_10_10_rev" supported="gl|glcore">
    <require>
        <enum name="GL_UNSIGNED_INT_2_10_10_10_REV"/>
        <enum name="GL_INT_2_10_10_10_REV"/>
        <command name="glVertexAttribP1ui"/>
        <command name="glVertexAttribP1uiv"/>
        <command name="glVertexAttribP2ui"/>
        <command name="glVertexAttribP2uiv"/>
        <command name="glVertexAttribP3ui"/>
        <command name="glVertexAttribP3uiv"/>
        <command name="glVertexAttribP4ui"/>
        <command name="glVertexAttribP4uiv"/>
    </require>
    <require api="gl" profile="compatibility">
        <command name="glVertexP2ui"/>
        <command name="glVertexP2uiv"/>
        <command name="glVertexP3ui"/>
        <command name="glVertexP3uiv"/>
        <command name="glVertexP4ui"/>
        <command name="glVertexP4uiv"/>
        <command name="glTexCoordP1ui"/>
        <command name="glTexCoordP1uiv"/>
        <command name="glTexCoordP2ui"/>
        <command name="glTexCoordP2uiv"/>
        <command name="glTexCoordP3ui"/>
        <command name="glTexCoordP3uiv"/>
        <command name="glTexCoordP4ui"/>
        <command name="glTexCoordP4uiv"/>
        <command name="glMultiTexCoordP1ui"/>
        <command name="glMultiTexCoordP1uiv"/>
        <command name="glMultiTexCoordP2ui"/>
        <command name="glMultiTexCoordP2uiv"/>
        <command name="glMultiTexCoordP3ui"/>
        <command name="glMultiTexCoordP3uiv"/>
        <command name="glMultiTexCoordP4ui"/>
        <command name="glMultiTexCoordP4uiv"/>
        <command name="glNormalP3ui"/>
        <command name="glNormalP3uiv"/>
        <command name="glColorP3ui"/>
        <command name="glColorP3uiv"/>
        <command name="glColorP4ui"/>
        <command name="glColorP4uiv"/>
        <command name="glSecondaryColorP3ui"/>
        <command name="glSecondaryColorP3uiv"/>
    </require>
</extension>

But b28b214 takes <require api="gl"> to mean "Compatibility only" and <require api="glcore"> to mean "Core only". This inconsistency makes it impossible to process gl.xml fully automatically.

This PR rewrites the definitions for EXT_texture_sRGB to use profile="compatibility" for the luminance enums.

Other 'gl|glcore' extensions use 'profile="compatibility"' for
compatibility-exclusive definitions, so let's follow in their footsteps.
@NogginBops
Copy link
Contributor

We've also had issues with this change in our generator. This seems like the more consistent way to handle this.

Copy link
Contributor

@zmike zmike left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems fine to me. @oddhack up to you

@zmike zmike added this to the Approved to Merge milestone Jan 27, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants