diff options
author | Ilia Mirkin <imirkin@alum.mit.edu> | 2016-03-29 15:31:05 -0400 |
---|---|---|
committer | Ilia Mirkin <imirkin@alum.mit.edu> | 2016-03-29 21:41:03 -0400 |
commit | 553e37aa337783d468f218291f6de6a74e49289b (patch) | |
tree | 7017891dcf1dd6eec5378ba69ce0b565fa5d46b2 /src/mesa/main/shaderimage.c | |
parent | 513384d7e8db294d54a910f40c90492c211abc54 (diff) | |
download | external_mesa3d-553e37aa337783d468f218291f6de6a74e49289b.zip external_mesa3d-553e37aa337783d468f218291f6de6a74e49289b.tar.gz external_mesa3d-553e37aa337783d468f218291f6de6a74e49289b.tar.bz2 |
mesa: allow mutable buffer textures to back GL ES images
Since there is no way to create immutable texture buffers in GL ES,
mutable buffer textures are allowed to back images. See issue 7 of the
GL_OES_texture_buffer specification.
Signed-off-by: Ilia Mirkin <imirkin@alum.mit.edu>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Diffstat (limited to 'src/mesa/main/shaderimage.c')
-rw-r--r-- | src/mesa/main/shaderimage.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c index fd5934f..90643c4 100644 --- a/src/mesa/main/shaderimage.c +++ b/src/mesa/main/shaderimage.c @@ -583,8 +583,13 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level, * * "An INVALID_OPERATION error is generated if texture is not the name * of an immutable texture object." + * + * 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. */ - if (_mesa_is_gles(ctx) && !t->Immutable) { + if (_mesa_is_gles(ctx) && !t->Immutable && + t->Target != GL_TEXTURE_BUFFER) { _mesa_error(ctx, GL_INVALID_OPERATION, "glBindImageTexture(!immutable)"); return; |