Mesa (staging/19.3): main: allow external textures for BindImageTexture
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Jan 8 19:33:43 UTC 2020
Module: Mesa
Branch: staging/19.3
Commit: d4a1f1daaf36fb5b70b18c858d2a2c1716e4b550
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d4a1f1daaf36fb5b70b18c858d2a2c1716e4b550
Author: Yevhenii Kolesnikov <yevhenii.kolesnikov at globallogic.com>
Date: Thu Jan 2 15:06:48 2020 +0200
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: 02a6d901eee ("mesa: add OES_EGL_image_external_essl3 support")
Signed-off-by: Yevhenii Kolesnikov <yevhenii.kolesnikov at globallogic.com>
Reviewed-by: Marek Olšák <marek.olsak at amd.com>
(cherry picked from commit ed43dd62acc045e71d73dc28b74b6a9a9d52286f)
---
src/mesa/main/shaderimage.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index 3f5dc16f2ff..5deca07b6a4 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -654,9 +654,13 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level,
* However note that issue 7 of the GL_OES_texture_buffer spec
* recognizes that there is no way to create immutable buffer textures,
* 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 &&
- texObj->Target != GL_TEXTURE_BUFFER) {
+ texObj->Target != GL_TEXTURE_BUFFER &&
+ texObj->Target != GL_TEXTURE_EXTERNAL_OES) {
_mesa_error(ctx, GL_INVALID_OPERATION,
"glBindImageTexture(!immutable)");
return;
More information about the mesa-commit
mailing list