summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJerome Glisse <jglisse@redhat.com>2012-11-14 12:15:47 -0500
committerJerome Glisse <jglisse@redhat.com>2012-11-15 12:07:11 -0500
commit53af6aa99dfb67b5223c28d5129a79694165048d (patch)
tree755367c6ee44895f1c5296ff802c502f680041b9 /src
parent71eeb0833489ece745f1e5dc41379ec63161ee81 (diff)
radeon: avoid segfault when pixmap exceed GPU capabilities
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 <jglisse@redhat.com> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/radeon_dri2.c4
1 files changed, 4 insertions, 0 deletions
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)