projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
c939231
)
main: _mesa_cube_level_complete checks NumLayers.
author
Laura Ekstrand
<laura@jlekstrand.net>
Wed, 4 Mar 2015 18:49:55 +0000
(10:49 -0800)
committer
Laura Ekstrand
<laura@jlekstrand.net>
Mon, 9 Mar 2015 20:33:53 +0000
(13:33 -0700)
_mesa_cube_level_complete now verifies that a cube map texture object actually
has six texture images before proceeding.
Reviewed-by: Anuj Phogat <anuj.phogat@gmail.com>
src/mesa/main/texobj.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/texobj.c
b/src/mesa/main/texobj.c
index e018ab9103c2c18149b7b40bc8dc42b5a57d44ca..a99b108d35f1995dbb316db0367cb45e67c9931c 100644
(file)
--- a/
src/mesa/main/texobj.c
+++ b/
src/mesa/main/texobj.c
@@
-879,6
+879,10
@@
_mesa_cube_level_complete(const struct gl_texture_object *texObj,
if (texObj->Target != GL_TEXTURE_CUBE_MAP)
return GL_FALSE;
+ /* Make sure we have enough image planes for a cube map. */
+ if (texObj->NumLayers < 6)
+ return GL_FALSE;
+
if ((level < 0) || (level >= MAX_TEXTURE_LEVELS))
return GL_FALSE;