mesa: fix number of mipmaps calculation for proxy textures
authorMikko Juola <mikjuo@gmail.com>
Tue, 30 Jul 2013 03:19:59 +0000 (06:19 +0300)
committerBrian Paul <brianp@vmware.com>
Wed, 31 Jul 2013 13:26:43 +0000 (07:26 -0600)
commitde7e3741ebca9fb794b890e00b5fed5b2bbb62a2
treea3fd93f764620a950b546e54986663c0d9f0668b
parente5f32a0b3a9f8541f0c8ffc5f303612ac9963bb1
mesa: fix number of mipmaps calculation for proxy textures

The function _mesa_get_tex_max_num_levels() is supposed to calculate
the number of mipmap levels but it was not written to handle proxy
textures, at best returning a maximum of 1 mipmap level. Because of
this, at least glTexStorage*() calls would incorrectly fail when used
with proxy textures with more than one mipmap level.

Reviewed-by: Brian Paul <brianp@vmware.com>
Cc: mesa-stable@lists.freedesktop.org
src/mesa/main/teximage.c