projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
b96a5df
)
st/mesa: Check for single level mipmap trees.
author
Younes Manton
<younes.m@gmail.com>
Mon, 21 Dec 2009 01:11:55 +0000
(20:11 -0500)
committer
Younes Manton
<younes.m@gmail.com>
Mon, 21 Dec 2009 05:59:06 +0000
(
00:59
-0500)
The assert in util_gen_mipmap() caught it, although
it does the right thing anyway.
src/mesa/state_tracker/st_gen_mipmap.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_gen_mipmap.c
b/src/mesa/state_tracker/st_gen_mipmap.c
index f75b2348b82cbdb43a8737e0b2270d4b9a2aaea8..c3bea3172a5d7f220bcbe630b90d81a1814c6d37 100644
(file)
--- a/
src/mesa/state_tracker/st_gen_mipmap.c
+++ b/
src/mesa/state_tracker/st_gen_mipmap.c
@@
-215,6
+215,9
@@
st_generate_mipmap(GLcontext *ctx, GLenum target,
/* find expected last mipmap level */
lastLevel = compute_num_levels(ctx, texObj, target) - 1;
+ if (lastLevel == 0)
+ return;
+
if (pt->last_level < lastLevel) {
/* The current gallium texture doesn't have space for all the
* mipmap levels we need to generate. So allocate a new texture.