st/mesa: check image size before copy_image_data_to_texture()
authorBrian Paul <brianp@vmware.com>
Thu, 21 Apr 2011 18:59:16 +0000 (12:59 -0600)
committerBrian Paul <brianp@vmware.com>
Thu, 21 Apr 2011 19:02:02 +0000 (13:02 -0600)
commita22aba4eae9b29db731487bce90e8292f7e82c72
tree2b6248fd65f95003e703209b864b42260cff3b33
parent4ad63659c09499f4e538d71aec42035246747ffd
st/mesa: check image size before copy_image_data_to_texture()

We should only copy images into the dest texture if the size is correct.
This fixes a failed assertion when finalizing a texture with mis-defined
mipmap levels such as:
level 0: 32x32
level 1: 8x8

Also, fix incorrect mipmap level used in assertion at the top of
copy_image_data_to_texture().

NOTE: This is a candidate for the 7.10 branch.
src/mesa/state_tracker/st_cb_texture.c