projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d3a37d9
)
mesa: added another check in check_gen_mipmap()
author
Brian Paul
<brianp@vmware.com>
Mon, 16 Nov 2009 15:14:23 +0000
(08:14 -0700)
committer
Brian Paul
<brianp@vmware.com>
Mon, 16 Nov 2009 15:18:03 +0000
(08:18 -0700)
We don't need to call ctx->Driver.GenerateMipmap() if we're updating
a texture level >= MAX_LEVEL.
src/mesa/main/teximage.c
patch
|
blob
|
history
diff --git
a/src/mesa/main/teximage.c
b/src/mesa/main/teximage.c
index b10076875bc84bc992819bed45473c2bab4da833..b946f3c69d7e846f9dc6c09ac60b377d4c82d62f 100644
(file)
--- a/
src/mesa/main/teximage.c
+++ b/
src/mesa/main/teximage.c
@@
-2035,7
+2035,9
@@
check_gen_mipmap(GLcontext *ctx, GLenum target,
struct gl_texture_object *texObj, GLint level)
{
ASSERT(target != GL_TEXTURE_CUBE_MAP);
- if (texObj->GenerateMipmap && level == texObj->BaseLevel) {
+ if (texObj->GenerateMipmap &&
+ level == texObj->BaseLevel &&
+ level < texObj->MaxLevel) {
ASSERT(ctx->Driver.GenerateMipmap);
ctx->Driver.GenerateMipmap(ctx, target, texObj);
}