diff --git a/src/mesa/main/teximage.c b/src/mesa/main/teximage.c index 88cea224420..4b1ad59aa11 100644 --- a/src/mesa/main/teximage.c +++ b/src/mesa/main/teximage.c @@ -3557,7 +3557,7 @@ egl_image_target_texture(struct gl_context *ctx, * Otherwise, the error INVALID_OPERATION is generated. */ if (stimg.imported_dmabuf && - (target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES)) { + !(target == GL_TEXTURE_2D || target == GL_TEXTURE_EXTERNAL_OES)) { _mesa_error(ctx, GL_INVALID_OPERATION, "%s(texture is imported from dmabuf)", caller); return;