meta: use _mesa_prepare_mipmap_levels()
authorBrian Paul <brianp@vmware.com>
Tue, 29 Mar 2016 23:44:00 +0000 (17:44 -0600)
committerBrian Paul <brianp@vmware.com>
Wed, 30 Mar 2016 00:13:46 +0000 (18:13 -0600)
commited39de90f1cd209b10baeed8ae98b1f56127c8de
treef74b95710b05bb3050d696208ebbee9236c19c0e
parentbab0752a805214645af92aec7ca692f723640c36
meta: use _mesa_prepare_mipmap_levels()

The prepare_mipmap_level() wrapper for _mesa_prepare_mipmap_level() is
not needed.  It only served to undo the GL_TEXTURE_1D_ARRAY height/depth
change was was made before the call to prepare_mipmap_level()

Said another way, regardless of how the meta code manipulates the height/
depth dims for GL_TEXTURE_1D_ARRAY, the gl_texture_image dimensions are
correctly set up by _mesa_prepare_mipmap_levels().

Tested by plugging _mesa_meta_GenerateMipmap() into the swrast driver
and testing with piglit.

v2 (idr): Early out of the mipmap generation loop with dstImage is NULL.
This can occur for immutable textures that have a limited range of
levels or in the presense of memory allocation failures.  Fixes
arb_texture_view-mipgen on Intel platforms.

Reviewed-by: José Fonseca <jfonseca@vmware.com>
Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Reviewed-by: Ian Romanick <ian.d.romanick@intel.com>
Tested-by: Ian Romanick <ian.d.romanick@intel.com>
Reviewed-by: Brian Paul <brianp@vmware.com>
src/mesa/drivers/common/meta_generate_mipmap.c