From: Marek Olšák Date: Sun, 6 Mar 2011 04:26:13 +0000 (+0100) Subject: st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format fails X-Git-Tag: mesa-7.11-rc1~1622 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=fb5d9e1199cabe653ae1bb822bb66ce9f0ce7f55;p=platform%2Fupstream%2Fmesa.git st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format fails This fixes: state_tracker/st_format.c:401:st_pipe_format_to_mesa_format: Assertion `0' failed. --- diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 5eda234..ae49434 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -79,7 +79,11 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, else format = st_choose_renderbuffer_format(screen, internalFormat, rb->NumSamples); - + + if (format == PIPE_FORMAT_NONE) { + return FALSE; + } + /* init renderbuffer fields */ strb->Base.Width = width; strb->Base.Height = height;