main: allow external textures for BindImageTexture
From issue 10 of the OES_EGL_image_external_essl3:
A limited set of use-cases is enabled by making glBindImageTexture
accept external textures. Shaders can access such external textures
using the existing <image2D> sampler type.
Fixes: 02a6d901ee ("mesa: add OES_EGL_image_external_essl3 support")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov@globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
This commit is contained in:
committed by
Tapani Pälli
parent
803fad43c3
commit
ed43dd62ac
@@ -654,9 +654,13 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
|
|||||||
* However note that issue 7 of the GL_OES_texture_buffer spec
|
* However note that issue 7 of the GL_OES_texture_buffer spec
|
||||||
* recognizes that there is no way to create immutable buffer textures,
|
* recognizes that there is no way to create immutable buffer textures,
|
||||||
* so those are excluded from this requirement.
|
* so those are excluded from this requirement.
|
||||||
|
*
|
||||||
|
* Additionally, issue 10 of the OES_EGL_image_external_essl3 spec
|
||||||
|
* states that glBindImageTexture must accept external textures.
|
||||||
*/
|
*/
|
||||||
if (_mesa_is_gles(ctx) && !texObj->Immutable &&
|
if (_mesa_is_gles(ctx) && !texObj->Immutable &&
|
||||||
texObj->Target != GL_TEXTURE_BUFFER) {
|
texObj->Target != GL_TEXTURE_BUFFER &&
|
||||||
|
texObj->Target != GL_TEXTURE_EXTERNAL_OES) {
|
||||||
_mesa_error(ctx, GL_INVALID_OPERATION,
|
_mesa_error(ctx, GL_INVALID_OPERATION,
|
||||||
"glBindImageTexture(!immutable)");
|
"glBindImageTexture(!immutable)");
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user