summaryrefslogtreecommitdiffstats
path: root/src/mesa/main/shaderimage.c
diff options
context:
space:
mode:
authorFrancisco Jerez <[email protected]>2013-11-22 19:58:10 -0800
committerFrancisco Jerez <[email protected]>2014-01-15 16:42:08 +0100
commit647344bf3e739c537a97ae54046b6b55cd068721 (patch)
treedf50c443507c3a296371ea015892550cd4e3394c /src/mesa/main/shaderimage.c
parentace31f4bc05ad35ef42626ecd667a4bbbe044ddc (diff)
mesa: Validate image units when the texture state changes.
Reviewed-by: Chris Forbes <[email protected]> Reviewed-by: Paul Berry <[email protected]>
Diffstat (limited to 'src/mesa/main/shaderimage.c')
-rw-r--r--src/mesa/main/shaderimage.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/mesa/main/shaderimage.c b/src/mesa/main/shaderimage.c
index ade0a7b822d..80c4693663b 100644
--- a/src/mesa/main/shaderimage.c
+++ b/src/mesa/main/shaderimage.c
@@ -380,6 +380,17 @@ validate_image_unit(struct gl_context *ctx, struct gl_image_unit *u)
return GL_TRUE;
}
+void
+_mesa_validate_image_units(struct gl_context *ctx)
+{
+ int i;
+
+ for (i = 0; i < ctx->Const.MaxImageUnits; ++i) {
+ struct gl_image_unit *u = &ctx->ImageUnits[i];
+ u->_Valid = validate_image_unit(ctx, u);
+ }
+}
+
static GLboolean
validate_bind_image_texture(struct gl_context *ctx, GLuint unit,
GLuint texture, GLint level, GLboolean layered,