[Mesa-dev] [PATCH 2/2] st/mesa: fail to alloc a renderbuffer if st_choose_renderbuffer_format fails
Marek Olšák
maraeo at gmail.com
Sat Mar 5 20:26:13 PST 2011
This fixes:
state_tracker/st_format.c:401:st_pipe_format_to_mesa_format:
Assertion `0' failed.
---
src/mesa/state_tracker/st_cb_fbo.c | 6 +++++-
1 files changed, 5 insertions(+), 1 deletions(-)
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;
--
1.7.1
More information about the mesa-dev
mailing list