Some systems such as the Raspberry Pi have limited GL memory, which can easily be filled up and result in GL out-of-memory errors in glamor. In such cases, a SEGFAULT would often happen because of a FBO alloc return code not being propagated on error. This is fixed by the first patch of this series. With it, X keeps running and no longer crashes.
The following patches improve error handling and add support for a PBO fallback path.
With that, I can still see some glitches (e.g. missing text after resizing a window) when running out of GL memory, so there is still room for improvement.