Mesa (master): st/mesa: check the texture image level in st_texture_match_image

Nicolai Hähnle nh at kemper.freedesktop.org
Fri Jul 1 15:56:53 UTC 2016


Module: Mesa
Branch: master
Commit: 07cc838b105dd3f34526db73064f1f21b452240e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=07cc838b105dd3f34526db73064f1f21b452240e

Author: Nicolai Hähnle <nicolai.haehnle at amd.com>
Date:   Fri Jun 24 17:54:51 2016 +0200

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 <mesa-stable at lists.freedesktop.org>
Reviewed-by: Ilia Mirkin <imirkin at alum.mit.edu>

---

 src/mesa/state_tracker/st_texture.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/src/mesa/state_tracker/st_texture.c b/src/mesa/state_tracker/st_texture.c
index 52b0943..42616ca 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;
 }
 




More information about the mesa-commit mailing list