util: add new error checking code in vbuf helper
authorBrian Paul <brianp@vmware.com>
Mon, 11 Feb 2013 19:28:23 +0000 (12:28 -0700)
committerAndreas Boll <andreas.boll.dev@gmail.com>
Wed, 13 Feb 2013 20:48:36 +0000 (21:48 +0100)
commit914368538ec72926f160e784dcbae5db05e34abe
tree465a44be56d2b7a1f907eefdb4a01ee53f59f5cf
parentc760677c85a1019eef67b2ce0ce97e8218918f44
util: add new error checking code in vbuf helper

Check the return value of calls to u_upload_alloc() and
u_upload_data() and return early if needed.

Since we don't have a way to propagate errors all the way up to
Mesa through pipe_context::draw_vbo(), call debug_warn_once() so
the user might have some clue about OOM errors.

Note: This is a candidate for the 9.0 branch.
(cherry picked from commit b13c534f1479549e53b9896ea4d25d79f8466c24)

Conflicts:

src/gallium/auxiliary/util/u_vbuf.c
src/gallium/auxiliary/util/u_vbuf.c