diff options
author | Marek Olšák <[email protected]> | 2015-09-02 15:08:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2015-09-03 18:14:09 +0200 |
commit | 8c6ff05517137ab9d96015783fcf1bf9d8d1fa12 (patch) | |
tree | 67cd2a9eec656895b803ac74f17054cfe9382369 /src/mesa | |
parent | 6c1e368cf38e02174a8c88218ae711ab0b27954f (diff) |
u_upload_mgr: remove the return value from u_upload_alloc
The return buffer or the returned pointer can be used instead.
Reviewed-by: Brian Paul <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r-- | src/mesa/state_tracker/st_cb_bitmap.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_clear.c | 7 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawpixels.c | 5 | ||||
-rw-r--r-- | src/mesa/state_tracker/st_cb_drawtex.c | 7 |
4 files changed, 14 insertions, 10 deletions
diff --git a/src/mesa/state_tracker/st_cb_bitmap.c b/src/mesa/state_tracker/st_cb_bitmap.c index 01a96c18264..ce593a94593 100644 --- a/src/mesa/state_tracker/st_cb_bitmap.c +++ b/src/mesa/state_tracker/st_cb_bitmap.c @@ -349,8 +349,9 @@ setup_bitmap_vertex_data(struct st_context *st, bool normalized, tBot = (GLfloat) height; } - if (u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), - vbuf_offset, vbuf, (void **) &vertices) != PIPE_OK) { + u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), + vbuf_offset, vbuf, (void **) &vertices); + if (!vbuf) { return; } diff --git a/src/mesa/state_tracker/st_cb_clear.c b/src/mesa/state_tracker/st_cb_clear.c index 137fac8a9a9..18efd14a57c 100644 --- a/src/mesa/state_tracker/st_cb_clear.c +++ b/src/mesa/state_tracker/st_cb_clear.c @@ -184,9 +184,10 @@ draw_quad(struct st_context *st, vb.stride = 8 * sizeof(float); - if (u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), - &vb.buffer_offset, &vb.buffer, - (void **) &vertices) != PIPE_OK) { + u_upload_alloc(st->uploader, 0, 4 * sizeof(vertices[0]), + &vb.buffer_offset, &vb.buffer, + (void **) &vertices); + if (!vb.buffer) { return; } diff --git a/src/mesa/state_tracker/st_cb_drawpixels.c b/src/mesa/state_tracker/st_cb_drawpixels.c index b372697026b..152160e1dd2 100644 --- a/src/mesa/state_tracker/st_cb_drawpixels.c +++ b/src/mesa/state_tracker/st_cb_drawpixels.c @@ -580,8 +580,9 @@ draw_quad(struct gl_context *ctx, GLfloat x0, GLfloat y0, GLfloat z, struct pipe_resource *buf = NULL; unsigned offset; - if (u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset, - &buf, (void **) &verts) != PIPE_OK) { + u_upload_alloc(st->uploader, 0, 4 * sizeof(verts[0]), &offset, + &buf, (void **) &verts); + if (!buf) { return; } diff --git a/src/mesa/state_tracker/st_cb_drawtex.c b/src/mesa/state_tracker/st_cb_drawtex.c index 2af4f6d4cf6..2634b09d777 100644 --- a/src/mesa/state_tracker/st_cb_drawtex.c +++ b/src/mesa/state_tracker/st_cb_drawtex.c @@ -149,9 +149,10 @@ st_DrawTex(struct gl_context *ctx, GLfloat x, GLfloat y, GLfloat z, GLfloat *vbuf = NULL; GLuint attr; - if (u_upload_alloc(st->uploader, 0, - numAttribs * 4 * 4 * sizeof(GLfloat), - &offset, &vbuffer, (void **) &vbuf) != PIPE_OK) { + u_upload_alloc(st->uploader, 0, + numAttribs * 4 * 4 * sizeof(GLfloat), + &offset, &vbuffer, (void **) &vbuf); + if (!vbuffer) { return; } |