mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 11:28:05 +02:00
st/mesa: fix computation of last_level during texture creation
Array textures were broken.
NOTE: This is a candidate for the stable branches.
Reviewed-by: Brian Paul <brianp@vmware.com>
Reviewed-by: Dave Airlie <airlied@redhat.com>
(cherry picked from commit 6dd839f23a)
This commit is contained in:
parent
d1dfe4e020
commit
7ca75b62cd
1 changed files with 2 additions and 4 deletions
|
|
@ -366,10 +366,8 @@ guess_and_alloc_texture(struct st_context *st,
|
|||
}
|
||||
else {
|
||||
/* alloc space for a full mipmap */
|
||||
GLuint l2width = util_logbase2(width);
|
||||
GLuint l2height = util_logbase2(height);
|
||||
GLuint l2depth = util_logbase2(depth);
|
||||
lastLevel = MAX2(MAX2(l2width, l2height), l2depth);
|
||||
lastLevel = _mesa_get_tex_max_num_levels(stObj->base.Target,
|
||||
width, height, depth) - 1;
|
||||
}
|
||||
|
||||
/* Save the level=0 dimensions */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue