projects
/
mesa.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
81a62ed
)
st/mesa: fix non-mipmap lastLevel calculation.
author
Cooper Yuan
<cooperyuan@gmail.com>
Thu, 1 Oct 2009 09:54:27 +0000
(17:54 +0800)
committer
Cooper Yuan
<cooperyuan@gmail.com>
Thu, 1 Oct 2009 09:54:27 +0000
(17:54 +0800)
reviewed by Brian Paul.
src/mesa/state_tracker/st_cb_texture.c
patch
|
blob
|
history
diff --git
a/src/mesa/state_tracker/st_cb_texture.c
b/src/mesa/state_tracker/st_cb_texture.c
index 771a0e2bbdfc18f4c517fb659cf1c22f0fcdf807..9a634bb9302f0033d28ea61896f7cb50f3d1067f 100644
(file)
--- a/
src/mesa/state_tracker/st_cb_texture.c
+++ b/
src/mesa/state_tracker/st_cb_texture.c
@@
-1766,7
+1766,11
@@
st_finalize_texture(GLcontext *ctx,
* incomplete. In that case, we'll have set stObj->lastLevel before
* we get here.
*/
- stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel;
+ if (stObj->base.MinFilter == GL_LINEAR ||
+ stObj->base.MinFilter == GL_NEAREST)
+ stObj->lastLevel = stObj->base.BaseLevel;
+ else
+ stObj->lastLevel = stObj->base._MaxLevel - stObj->base.BaseLevel;
}
firstImage = st_texture_image(stObj->base.Image[0][stObj->base.BaseLevel]);