aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/mesa/state_tracker/st_atom_image.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_atom_image.c b/src/mesa/state_tracker/st_atom_image.c
index 1c4980173f4..421c926cf04 100644
--- a/src/mesa/state_tracker/st_atom_image.c
+++ b/src/mesa/state_tracker/st_atom_image.c
@@ -97,6 +97,7 @@ st_convert_image(const struct st_context *st, const struct gl_image_unit *u,
img->resource = stObj->pt;
img->u.tex.level = u->Level + stObj->base.MinLevel;
+ assert(img->u.tex.level <= img->resource->last_level);
if (stObj->pt->target == PIPE_TEXTURE_3D) {
if (u->Layered) {
img->u.tex.first_layer = 0;