Mesa (master): gallium/radeon: handle buffer alloc failures in r600_draw_rectangle

Marek Olšák mareko at kemper.freedesktop.org
Thu Sep 24 17:51:48 UTC 2015


Module: Mesa
Branch: master
Commit: f95e695059c428a21a1e1a27d5cd5ccce2a97b0e
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=f95e695059c428a21a1e1a27d5cd5ccce2a97b0e

Author: Marek Olšák <marek.olsak at amd.com>
Date:   Thu Sep 10 17:54:41 2015 +0200

gallium/radeon: handle buffer alloc failures in r600_draw_rectangle

Cc: 11.0 <mesa-stable at lists.freedesktop.org>
Acked-by: Christian König <christian.koenig at amd.com>
Reviewed-by: Michel Dänzer <michel.daenzer at amd.com>

---

 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;




More information about the mesa-commit mailing list