summaryrefslogtreecommitdiffstats
path: root/src/mesa/state_tracker/st_texture.c
diff options
context:
space:
mode:
authorNicolai Hähnle <[email protected]>2016-06-24 17:54:51 +0200
committerNicolai Hähnle <[email protected]>2016-07-01 17:55:19 +0200
commit07cc838b105dd3f34526db73064f1f21b452240e (patch)
treeda348f48e20f696571eaee71bef15656bedb16cd /src/mesa/state_tracker/st_texture.c
parent0ba053b34c29106817568996ac53b41029cf4e4c (diff)
st/mesa: check the texture image level in st_texture_match_image
Otherwise, 1x1 images of arbitrarily high level are accepted. Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=96639#add_comment Cc: 11.2 12.0 <[email protected]> Reviewed-by: Ilia Mirkin <[email protected]>
Diffstat (limited to 'src/mesa/state_tracker/st_texture.c')
-rw-r--r--src/mesa/state_tracker/st_texture.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 52b094330b9..42616ca4cb4 100644
--- a/src/mesa/state_tracker/st_texture.c
+++ b/src/mesa/state_tracker/st_texture.c
@@ -226,6 +226,9 @@ st_texture_match_image(struct st_context *st,
ptLayers != pt->array_size)
return GL_FALSE;
+ if (image->Level > pt->last_level)
+ return GL_FALSE;
+
return GL_TRUE;
}