From 6c161405dc191f3d4083a48dfc033d4401b8055a Mon Sep 17 00:00:00 2001 From: Francisco Jerez Date: Mon, 17 Aug 2015 02:05:43 +0300 Subject: [PATCH] mesa: Refuse to bind image uniforms using glUniform in GLES. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit The GLES 3.1 spec removed support for updating the image unit bound to an image uniform using glUniform1i() calls. Reviewed-by: Tapani Pälli Reviewed-by: Ian Romanick --- src/mesa/main/uniform_query.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/mesa/main/uniform_query.cpp b/src/mesa/main/uniform_query.cpp index 036530e..988ec76 100644 --- a/src/mesa/main/uniform_query.cpp +++ b/src/mesa/main/uniform_query.cpp @@ -677,9 +677,11 @@ _mesa_uniform(struct gl_context *ctx, struct gl_shader_program *shProg, match = (basicType != GLSL_TYPE_DOUBLE); break; case GLSL_TYPE_SAMPLER: - case GLSL_TYPE_IMAGE: match = (basicType == GLSL_TYPE_INT); break; + case GLSL_TYPE_IMAGE: + match = (basicType == GLSL_TYPE_INT && _mesa_is_desktop_gl(ctx)); + break; default: match = (basicType == uni->type->base_type); break; -- 2.7.4