From 53af6aa99dfb67b5223c28d5129a79694165048d Mon Sep 17 00:00:00 2001 From: Jerome Glisse Date: Wed, 14 Nov 2012 12:15:47 -0500 Subject: radeon: avoid segfault when pixmap exceed GPU capabilities MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit We might get a request for a pixmap/drawable that is too big for GPU capabilities in the dri2 get buffer path. In face of such things just return NULL to dri2 get buffer request. The GL driver should then use something like transparent black to avoid something too ugly on the screen. Signed-off-by: Jerome Glisse Reviewed-by: Michel Dänzer --- src/radeon_dri2.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c index ebd813cc..919f1f67 100644 --- a/src/radeon_dri2.c +++ b/src/radeon_dri2.c @@ -444,6 +444,10 @@ radeon_dri2_create_buffer2(ScreenPtr pScreen, info->exa_force_create = TRUE; exaMoveInPixmap(pixmap); info->exa_force_create = FALSE; + if (exaGetPixmapDriverPrivate(pixmap) == NULL) { + /* this happen if pixmap is non accelerable */ + goto error; + } } if (is_glamor_pixmap) -- cgit v1.2.3