From 878877d3c46ddb7b2a67c289b3f432435b95114c Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jos=C3=A9=20Fonseca?= Date: Thu, 24 Apr 2014 14:48:37 +0100 Subject: [PATCH] mesa/st: Handle empty frame-buffers without asserting. MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Fixes assertion failures with radeonsi. Tested-by: Marek Olšák --- src/mesa/state_tracker/st_atom_framebuffer.c | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/src/mesa/state_tracker/st_atom_framebuffer.c b/src/mesa/state_tracker/st_atom_framebuffer.c index a17417c3590..eb5f783cecb 100644 --- a/src/mesa/state_tracker/st_atom_framebuffer.c +++ b/src/mesa/state_tracker/st_atom_framebuffer.c @@ -147,11 +147,10 @@ update_framebuffer_state( struct st_context *st ) } #endif - /* _mesa_test_framebuffer_completeness refuses framebuffers with no - * attachments, so this should never happen. - */ - assert(framebuffer->width != UINT_MAX); - assert(framebuffer->height != UINT_MAX); + if (framebuffer->width == UINT_MAX) + framebuffer->width = 0; + if (framebuffer->height == UINT_MAX) + framebuffer->height = 0; cso_set_framebuffer(st->cso_context, framebuffer); } -- 2.30.2