Skip to content

OpenGL ES 3.0 + GL_EXT_texture_type_2_10_10_10_REV clarification #667

@kusma

Description

@kusma

The GL_EXT_texture_type_2_10_10_10_REV adds support for creating textures with an internal (and external) format of GL_RGB or GL_RGBA, and type GL_UNSIGNED_INT_2_10_10_10_REV_EXT.

The extension spec says the following:

Issues

    1. Should textures specified with this type be renderable?

    UNRESOLVED: No.  A separate extension could provide this functionality.

The way I interpret this, this makes a lot of sense because the spec is written against the OpenGL ES 2.0 spec. The OpenGL ES 2.0 spec defines color-renderable as a function of the internal format, and it doesn't not mark the (unsized) internal formats GL_RGB or GL_RGBA as color-renderable, only a few sized ones.

However, OpenGL ES 3.0 marks the unsized GL_RGB and GL_RGBA internal formats as color-renderable, with the following wording:

An internal format is color-renderable if it is one of the formats from table 3.13 noted as color-renderable or if it is unsized format RGBA or RGB.

The way I interpret this, the result of supporting GL_EXT_texture_type_2_10_10_10_REV in an OpenGL ES 3.0 context, would be that the a texture created with an internal/external format of GL_RGB / GL_RGBA and a type of GL_UNSIGNED_INT_2_10_10_10_REV_EXT would be color-renderable. In effect, the "A separate extension could provide this functionality" bit is covered by a later OpenGL ES version.

Is this interpretation correct?

The reason I'm asking, is that the CTS test case dEQP-GLES2.functional.fbo.completeness.renderable.texture.color0.rgba_unsigned_int_2_10_10_10_rev checks for the exact opposite; it expects the result to not be color-renderable. And I'm having a hard time interpreting the spec in this direction. But it seems a lot of implementations implement this extension on top of OpenGL ES 3.x, and I assume they're passing the CTS. So did everyone but me get this wrong, or is there some detail I'm just not getting here?

It's also worth noting that OpenGL ES 3.0 also marks the sized internal format of GL_RGB10_A2 as color-renderable, so it's not as if rendering to RGB10A2 textures was intended to not be supported. It just seems like an omission when adding OpenGL ES 3.0 support to the CTS to me.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions