[Mesa-dev] [PATCH 04/17] gallium/radeon: handle buffer alloc failures in r600_draw_rectangle
Marek Olšák
maraeo at gmail.com
Thu Sep 10 10:56:27 PDT 2015
From: Marek Olšák <marek.olsak at amd.com>
Cc: 11.0 <mesa-stable at lists.freedesktop.org>
---
src/gallium/drivers/radeon/r600_pipe_common.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index 836da76..d97b721 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;
--
2.1.4
More information about the mesa-dev
mailing list