mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-03-13 15:20:31 +01:00
st/mesa: fix non-mipmap lastLevel calculation.
reviewed by Brian Paul.
(cherry picked from master, commit ae2daacbac)
This commit is contained in:
parent
18883cdf23
commit
495628bc5c
1 changed files with 5 additions and 1 deletions
|
|
@ -1775,7 +1775,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]);
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue