From: Marek Olšák Date: Thu, 10 Sep 2015 17:25:14 +0000 (+0200) Subject: radeonsi: handle dummy constant buffer allocation failure X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=ae418a7b5640aadb625bb7a7d6e4aa0a98ccb77f;p=mesa.git radeonsi: handle dummy constant buffer allocation failure Cc: 11.0 Acked-by: Christian König Reviewed-by: Michel Dänzer --- diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c index 01fa5252f71..9edee50ac8a 100644 --- a/src/gallium/drivers/radeonsi/si_pipe.c +++ b/src/gallium/drivers/radeonsi/si_pipe.c @@ -180,6 +180,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, if (sctx->b.chip_class == CIK) { sctx->null_const_buf.buffer = pipe_buffer_create(screen, PIPE_BIND_CONSTANT_BUFFER, PIPE_USAGE_DEFAULT, 16); + if (!sctx->null_const_buf.buffer) + goto fail; sctx->null_const_buf.buffer_size = sctx->null_const_buf.buffer->width0; for (shader = 0; shader < SI_NUM_SHADERS; shader++) {