st/mesa: a couple fixes for st_BlitFramebuffer()
authorBrian Paul <brianp@vmware.com>
Wed, 16 Jan 2013 15:41:01 +0000 (08:41 -0700)
committerBrian Paul <brianp@vmware.com>
Thu, 17 Jan 2013 00:06:17 +0000 (17:06 -0700)
commit56c01d81094795286828ecb83713e043695e905a
treee78a126279b8bf18920594220201b08ee44cb15b
parentaf7b4b01f1b61d6177d947bec2ecdfae28d0874d
st/mesa: a couple fixes for st_BlitFramebuffer()

1. Loop over multiple destination color buffers.  If we set
glDrawBuffers(GL_FRONT_AND_BACK) we need to loop over multiple color
buffers, blitting to each.

2. Add checks for null src/dst surface pointers.  This fixes a crash
in the piglit fbo-missing-attachment-blit test.
See bug http://bugs.freedesktop.org/show_bug.cgi?id=59450

Reviewed-by: Reviewed-by: Marek Olšák <maraeo@gmail.com>
src/mesa/state_tracker/st_cb_blit.c