KhronosGroup / OpenGL-Registry

OpenGL, OpenGL ES, and OpenGL ES-SC API and Extension Registry
679 stars 274 forks source link

Requirements for GL_EXT_EGL_image_array #496

Closed lexaknyazev closed 2 years ago

lexaknyazev commented 2 years ago

From the EXT_EGL_image_array extension spec:

OpenGL ES 2.0 is required. Requires EGL 1.2 and either the EGL_KHR_image or EGL_KHR_image_base extensions as well as OES_EGL_image.

Currently, <target> must be TEXTURE_2D or TEXTURE_2D_ARRAY.

None of ES 2.0, OES_EGL_image, or EXT_EGL_image_array define the TEXTURE_2D_ARRAY enum.


Moreover, the "Additions" section of OES_EGL_image refers to the OpenGL 2.0 spec despite the extension targeting OpenGL ES.

stonesthrow commented 2 years ago

Please assign @stonesthrow Please review when ready @pdaniell-nv , @jackohound

stonesthrow commented 2 years ago

GL_EXT_sparse_texture - defined token GL_TEXTURE_2D_ARRAY, extension in GLES 2.0 Token GL_TEXTURE_2D_ARRAY is core in GLES 3.0

Either GL_EXT_EGL_image_array must be updated to define token: TEXTURE_2D_ARRAY 0x8C1A or that extension must be based on GLES 3.0

Note that GL_EXT_sparse_texture requires GLES 3.1

@pdaniell-nv - suggested action? @oddhack - any comment on updating

oddhack commented 2 years ago

GL_EXT_sparse_texture - defined token GL_TEXTURE_2D_ARRAY, extension in GLES 2.0 Token GL_TEXTURE_2D_ARRAY is core in GLES 3.0

Either GL_EXT_EGL_image_array must be updated to define token: TEXTURE_2D_ARRAY 0x8C1A or that extension must be based on GLES 3.0

I'm not completely sure of what the question is, but I don't think we can retroactively introduce support for array textures in an extension running on GLES 2.0 unless the extension itself defines all the mechanism of array textures. The usual approach is to remove support for the token in this case, something like:

Dependencies
...
OpenGL ES 2.0 affects the definition of this extension
...

(this goes right before the 'Errors' section):

Interactions with OpenGL ES 2.0  

If the GL is not OpenGL ES 3.0 or above, references to TEXTURE_2D_ARRAY are omitted.

Refinement: I think it's possible in principle that you could have ES 2.0 + EXT_texture_array, which would alter this language to something more like 'If the GL is OpenGL ES 2.0 and GL_EXT_texture_array is not supported, ...' although then there's a bit of complication with whether to use the EXT suffix on TEXTURE_2D_array.

oddhack commented 2 years ago

N.b. I would guess there are quite a lot of ES extensions which have not been retroactively updated for all possible core version / equivalent extension functionality interactions.

stonesthrow commented 2 years ago

The issue is EXT_EGL_image_array uses TEXTURE_2D_ARRAY, but doesn't define it, and it is NOT defined in any of its required core/extensions. So author is requesting consistency in dependencies.

pdaniell-nv commented 2 years ago

@stonesthrow do you want to prepare a PR with Jon's refined suggestion? I think the extension should be updated to have a dependency on GL_EXT_texture_array.

lexaknyazev commented 2 years ago

GL_EXT_texture_array is not defined for GLES.

pdaniell-nv commented 2 years ago

GL_EXT_texture_array is not defined for GLES.

Okay, then the first suggestion from Jon is better.

stonesthrow commented 2 years ago

Milestone: Needs review