summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWill Thompson <will@willthompson.co.uk>2012-05-09 17:20:29 +0100
committerWill Thompson <will@willthompson.co.uk>2012-05-09 17:21:11 +0100
commit2a6c080a8505436228606f46256fa5d4c36962f6 (patch)
tree4d411981d2b3f83b1be3c512e2a9b8dbe6500a2c
parent0c3e654c1cdf3703b2d2feb7a2930bc4f1a3f0b6 (diff)
exa: refuse to allocate images for bpp != 32
-rw-r--r--src/videocore-exa.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/videocore-exa.c b/src/videocore-exa.c
index d097af7..b39a67c 100644
--- a/src/videocore-exa.c
+++ b/src/videocore-exa.c
@@ -361,7 +361,6 @@ VideoCoreModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
if (pPixData == VIDEOCORE_FAKE_SCREEN_BITMAP) {
priv->is_screen_pixmap = TRUE;
DestroyGlobalImage(vcExa, pScrn, priv);
- return TRUE;
} else if (pPixData) {
/* Unaccelerated pixel soup */
pPixmap->devPrivate.ptr = pPixData;
@@ -391,6 +390,11 @@ VideoCoreModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
depth = pPixmap->drawable.depth;
bitsPerPixel = pPixmap->drawable.bitsPerPixel;
+ if (bitsPerPixel != 32) {
+ DEBUG_MSG("Can't accelerate pixmap %p with bpp %u", pPixmap, bitsPerPixel);
+ return TRUE; /* ??? */
+ }
+
if (width * height == 0) {
DEBUG_MSG("zero area! (%u x %u)", width, height);
return TRUE;