main: allow all external textures for BindImageTexture
According to OES_EGL_image_external_essl3
:
On p. 196 in the errors section for BindImageTexture, replace the last error with the following:
"An INVALID_OPERATION error is generated if is neither the name of an immutable texture object, nor the name of an external texture object."
According to OES_EGL_image_external
:
The command
void EGLImageTargetTexture2DOES(enum target, eglImageOES image);
with set to TEXTURE_EXTERNAL_OES defines the currently bound external texture object to be a target sibling of <image>.
...
If is not TEXTURE_EXTERNAL_OES, the error INVALID_ENUM is generated. (Note: if GL_OES_EGL_image is supported then <target> may also be TEXTURE_2D).
Currently, mesa only allows GL_TEXTURE_EXTERNAL_OES
textures to be bound
by glBindImageTexture
. However, the language of the specification does not
appear to use "external" to refer to GL_TEXTURE_EXTERNAL_OES
specifically,
since OES_EGL_image_external
allows external eglImageOES
to be attached
to GL_TEXTURE_2D
in the presence of GL_OES_EGL_image
. Thus, it should be
interpreted to refer to all types of external textures, including 2D
textures attached via glEGLImageTargetTexture2DOES
.
Fixes: ed43dd62 ("main: allow external textures for BindImageTexture")
Note to reviewers:
- I am not sure if I got all the places where an image is redefined and the texture ceases to be external.