[PATCH 2/2] glamor: Add an assert to catch the previous bug.

Michel Dänzer michel at daenzer.net
Thu Jul 2 01:28:18 PDT 2015


On 02.07.2015 06:56, Eric Anholt wrote:
> Signed-off-by: Eric Anholt <eric at anholt.net>
> ---
>  glamor/glamor_transfer.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/glamor/glamor_transfer.c b/glamor/glamor_transfer.c
> index aa5e861..155d7e0 100644
> --- a/glamor/glamor_transfer.c
> +++ b/glamor/glamor_transfer.c
> @@ -186,6 +186,8 @@ glamor_download_boxes(PixmapPtr pixmap, BoxPtr in_boxes, int in_nbox,
>          BoxPtr                  boxes = in_boxes;
>          int                     nbox = in_nbox;
>  
> +        /* This should not be called on GLAMOR_FBO_NO_FBO-allocated pixmaps. */
> +        assert(fbo->fb);
>          glBindFramebuffer(GL_FRAMEBUFFER, fbo->fb);
>  
>          while (nbox--) {
> 

The problem with assert() is that it's a bad failure mode for people
starting Xorg with startx or xinit: After an assertion failure, they're
left with a black screen and no obvious way to restore sanity locally.
Anyway, that probably needs to be dealt with elsewhere, so

Acked-by: Michel Dänzer <michel.daenzer at amd.com>


-- 
Earthling Michel Dänzer               |               http://www.amd.com
Libre software enthusiast             |             Mesa and X developer


More information about the xorg-devel mailing list