summaryrefslogtreecommitdiffstats
path: root/src/mesa
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2014-04-24 14:48:37 +0100
committerJosé Fonseca <[email protected]>2014-04-24 14:48:37 +0100
commit878877d3c46ddb7b2a67c289b3f432435b95114c (patch)
tree159239ecaa5613f99491c30fbdadcd4117cb00cc /src/mesa
parentfd92346c53ed32709c7b56ce58fb9c9bf43ce9a8 (diff)
mesa/st: Handle empty frame-buffers without asserting.
Fixes assertion failures with radeonsi. Tested-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/mesa')
-rw-r--r--src/mesa/state_tracker/st_atom_framebuffer.c9
1 files 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);
}