diff options
author | Francisco Jerez <[email protected]> | 2015-08-17 02:02:17 +0300 |
---|---|---|
committer | Francisco Jerez <[email protected]> | 2015-08-20 12:26:53 +0300 |
commit | 86a64dfccfd3e98befa1e58f1a252cf993e5b680 (patch) | |
tree | cf10c475503861eb6cbdab8a51d4eaf51633bea4 /src/mesa/main | |
parent | d70edfcfd53b50da0c4bb7aad909302dca6d4722 (diff) |
mesa: Refuse to bind a mutable texture object to an image unit in GLES.
Reviewed-by: Ian Romanick <[email protected]>
Reviewed-by: Timothy Arceri <[email protected]>
Diffstat (limited to 'src/mesa/main')
-rw-r--r-- | src/mesa/main/shaderimage.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c index 5a3c47a62c8..c4bba842ca7 100644 --- a/src/mesa/main/shaderimage.c +++ b/src/mesa/main/shaderimage.c @@ -546,6 +546,18 @@ _mesa_BindImageTexture(GLuint unit, GLuint texture, GLint level, return; } + /* From section 8.22 "Texture Image Loads and Stores" of the OpenGL ES + * 3.1 spec: + * + * "An INVALID_OPERATION error is generated if texture is not the name + * of an immutable texture object." + */ + if (_mesa_is_gles(ctx) && !t->Immutable) { + _mesa_error(ctx, GL_INVALID_OPERATION, + "glBindImageTexture(!immutable)"); + return; + } + _mesa_reference_texobj(&u->TexObj, t); } else { _mesa_reference_texobj(&u->TexObj, NULL); |