From: José Fonseca Date: Thu, 24 Apr 2014 13:48:37 +0000 (+0100) Subject: mesa/st: Handle empty frame-buffers without asserting. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=878877d3c46ddb7b2a67c289b3f432435b95114c;p=mesa.git mesa/st: Handle empty frame-buffers without asserting. Fixes assertion failures with radeonsi. Tested-by: Marek Olšák --- 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); }