st/mesa: check for out-of-memory in st_DrawPixels()
authorBrian Paul <brianp@vmware.com>
Thu, 15 Oct 2015 15:38:00 +0000 (09:38 -0600)
committerBrian Paul <brianp@vmware.com>
Tue, 20 Oct 2015 18:52:40 +0000 (12:52 -0600)
commit31ae52acceb7defc84080e32db6d5b1b0fe2eace
tree5244d69c957721a53dc4eabb065e079bf07a626d
parentc5de38abc9eb71ba89fb1332946ee034e5a0c649
st/mesa: check for out-of-memory in st_DrawPixels()

Before, if make_texture() or st_create_texture_sampler_view() failed
we silently no-op'd the glDrawPixels.  Now, set GL_OUT_OF_MEMORY.
This also allows us to un-nest a bunch of code.

v2: also check if allocation of sv[1] fails, per Jose.

Reviewed-by: Jose Fonseca <jfonseca@vmware.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/mesa/state_tracker/st_cb_drawpixels.c