summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-09-10 17:54:41 +0200
committerEmil Velikov <[email protected]>2015-10-07 14:09:11 +0100
commit62ac723a346892c455352d6b681f06caa6b15cf4 (patch)
tree798b8866c928ff8482970bdbcd03dd3dbd6fcfb1 /src/gallium/drivers
parent766a0b4661a75988cf1b1235e960226d72af71d9 (diff)
gallium/radeon: handle buffer alloc failures in r600_draw_rectangle
Cc: 11.0 <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (cherry picked from commit f95e695059c428a21a1e1a27d5cd5ccce2a97b0e)
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index ed5d1dabdc3..f0fb4af8dff 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -78,6 +78,9 @@ void r600_draw_rectangle(struct blitter_context *blitter,
* I guess the 4th one is derived from the first 3.
* The vertex specification should match u_blitter's vertex element state. */
u_upload_alloc(rctx->uploader, 0, sizeof(float) * 24, &offset, &buf, (void**)&vb);
+ if (!buf)
+ return;
+
vb[0] = x1;
vb[1] = y1;
vb[2] = depth;