st/mesa: fix st_generate_mipmap() issues
authorBrian Paul <brianp@vmware.com>
Fri, 25 Sep 2009 23:24:27 +0000 (17:24 -0600)
committerBrian Paul <brianp@vmware.com>
Mon, 28 Sep 2009 15:37:16 +0000 (09:37 -0600)
commitc7fddaf6122da489f4430f6bc2211bcb4740f416
tree62c7572c755a2fda9b0c34817e3de1be9698efb3
parente3a6f57ad6c0e7bda5d45eb146194ed39f45abdd
st/mesa: fix st_generate_mipmap() issues

The main issue is we didn't always have a gallium texture object with
enough space to store the to-be-generated mipmap levels.  When that's
the case, allocate a new gallium texture and use st_texure_finalize()
to copy images from the old texture to the new one.

We also had the baseLevel parameter to st_render_mipmap() wrong.
src/mesa/state_tracker/st_gen_mipmap.c