r300g: don't return NULL in resource_from_handle if the resource is too small
authorMarek Olšák <maraeo@gmail.com>
Thu, 20 Oct 2011 21:14:36 +0000 (23:14 +0200)
committerMarek Olšák <maraeo@gmail.com>
Thu, 20 Oct 2011 21:37:22 +0000 (23:37 +0200)
commita04f8c361211dda6a27c5577070492e17a2f4743
tree7564052c0268b05aeef490b418022bf3442cd3f1
parentc60eb632b7884fb00ba4d3ec460f070e0214d1b8
r300g: don't return NULL in resource_from_handle if the resource is too small

The DDX may allocate a buffer with a too small size.
Instead of failing, let's pretend everything's alright.

Such bugs should be fixed in the DDX, of course.

NOTE: This is a candidate for the stable branches.
src/gallium/drivers/r300/r300_texture.c
src/gallium/drivers/r300/r300_texture.h
src/gallium/drivers/r300/r300_texture_desc.c
src/gallium/drivers/r300/r300_texture_desc.h