diff options
author | Eric Anholt <eric@anholt.net> | 2008-12-05 12:21:53 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2008-12-05 12:27:35 -0800 |
commit | 2e3c098c5ed9a8451713dc754a5f086992249336 (patch) | |
tree | 7c24676f3702e3e808110e711f06c92c45580308 | |
parent | 261c20a479f6ec1e94c2ba801323072227cc3ade (diff) |
uxa: Reject solid/copy to under-8bpp destinations.
EXA wouldn't create pixmaps for under-8bpp, but UXA does. Fixes
mis-rendering in xfwm, evolution message compose, firefox link
drag'n'drop, and I'm sure more. Big thanks to Pierre Willenbrock for
debugging the issue!
Bug #18050
-rw-r--r-- | src/i830_exa.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/i830_exa.c b/src/i830_exa.c index 0be0614f..3e3487e8 100644 --- a/src/i830_exa.c +++ b/src/i830_exa.c @@ -185,6 +185,9 @@ I830EXAPrepareSolid(PixmapPtr pPixmap, int alu, Pixel planemask, Pixel fg) if (pPixmap->drawable.bitsPerPixel == 24) I830FALLBACK("solid 24bpp unsupported!\n"); + if (pPixmap->drawable.bitsPerPixel < 8) + I830FALLBACK("under 8bpp pixmaps unsupported\n"); + i830_exa_check_pitch_2d(pPixmap); pitch = i830_pixmap_pitch(pPixmap); @@ -273,6 +276,9 @@ I830EXAPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir, if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planemask)) I830FALLBACK("planemask is not solid"); + if (pDstPixmap->drawable.bitsPerPixel < 8) + I830FALLBACK("under 8bpp pixmaps unsupported\n"); + i830_exa_check_pitch_2d(pSrcPixmap); i830_exa_check_pitch_2d(pDstPixmap); |