st/mesa: simplify st_generate_mipmap()
authorBrian Paul <brianp@vmware.com>
Thu, 24 Mar 2016 20:09:24 +0000 (14:09 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 30 Mar 2016 00:13:45 +0000 (18:13 -0600)
commitd8d029f22bcb49c26ddb11d0bb968d24f2a5fb7e
tree811e8ff86e292acf272167522cff44fae66d9074
parent105fe527840ed5fc55e78c4561915fbe1fded76c
st/mesa: simplify st_generate_mipmap()

The whole st_generate_mipmap() function was overly complicated.  Now
we just call the new _mesa_prepare_mipmap_levels() function to prepare
the texture mipmap memory, then call the generate function which fills
in the texture images.

This fixes a failed assertion in llvmpipe/softpipe which is hit with the
new piglit generatemipmap-base-change test.  Also fixes some device errors
(format mismatches) with the VMware svga driver.

v2: fix a comment typo, per Sinclair

Reviewed-by: Sinclair Yeh <syeh@vmware.com>
Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
src/mesa/state_tracker/st_gen_mipmap.c