[Mesa-dev] [PATCH 06/25] mesa: Refuse to bind a mutable texture object to an image unit in GLES.
Timothy Arceri
t_arceri at yahoo.com.au
Tue Aug 18 17:12:06 PDT 2015
On Mon, 2015-08-17 at 19:45 +0300, Francisco Jerez wrote:
> ---
> src/mesa/main/shaderimage.c | 11 +++++++++++
> 1 file changed, 11 insertions(+)
>
> diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
> index 5a3c47a..6f7d1c9 100644
> --- a/src/mesa/main/shaderimage.c
> +++ b/src/mesa/main/shaderimage.c
> @@ -546,6 +546,17 @@ _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(texture)");
Maybe better to have the error message say something like
"glBindImageTexture(!immutable)" or similar.
With that change Reviewed-by: Timothy Arceri <t_arceri at yahoo.com.au>
> + return;
> + }
> +
> _mesa_reference_texobj(&u->TexObj, t);
> } else {
> _mesa_reference_texobj(&u->TexObj, NULL);
More information about the mesa-dev
mailing list