diff options
author | Marek Olšák <[email protected]> | 2011-03-12 21:44:04 +0100 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2011-03-12 21:46:01 +0100 |
commit | b5d293e4fdb2944b27bea94204086c8ec9be8dbc (patch) | |
tree | cfe9271ebd1291d0cf43345cd11b3a2c17a6eced | |
parent | 3a02a2bf25945d4afbb72add08d7d7b983e77ee8 (diff) |
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.
(cherry picked from commit fb5d9e1199cabe653ae1bb822bb66ce9f0ce7f55)
Conflicts:
src/mesa/state_tracker/st_cb_fbo.c
-rw-r--r-- | src/mesa/state_tracker/st_cb_fbo.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/mesa/state_tracker/st_cb_fbo.c b/src/mesa/state_tracker/st_cb_fbo.c index 15f8fb31faf..473ed4d9134 100644 --- a/src/mesa/state_tracker/st_cb_fbo.c +++ b/src/mesa/state_tracker/st_cb_fbo.c @@ -77,6 +77,10 @@ st_renderbuffer_alloc_storage(struct gl_context * ctx, struct gl_renderbuffer *r 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; |