summaryrefslogtreecommitdiffstats
path: root/src/gallium
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-09-10 19:25:14 +0200
committerEmil Velikov <[email protected]>2015-10-07 14:41:30 +0100
commit0c5aacf44669762479ef467c0fb6853f9ff2a807 (patch)
tree4d0383448922f8517e81d46354f8dbba4111e5e6 /src/gallium
parentfb5dd331660eebfa12d14181e2e30cdfa994c535 (diff)
radeonsi: handle dummy constant buffer allocation failure
Cc: 11.0 <[email protected]> Acked-by: Christian König <[email protected]> Reviewed-by: Michel Dänzer <[email protected]> (cherry picked from commit ae418a7b5640aadb625bb7a7d6e4aa0a98ccb77f)
Diffstat (limited to 'src/gallium')
-rw-r--r--src/gallium/drivers/radeonsi/si_pipe.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/drivers/radeonsi/si_pipe.c b/src/gallium/drivers/radeonsi/si_pipe.c
index ec8cce40285..939ac666b22 100644
--- a/src/gallium/drivers/radeonsi/si_pipe.c
+++ b/src/gallium/drivers/radeonsi/si_pipe.c
@@ -170,6 +170,8 @@ static struct pipe_context *si_create_context(struct pipe_screen *screen, void *
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++) {