From 87d7235790866f9c19ef08972d5237f09d940cd9 Mon Sep 17 00:00:00 2001 From: Alex Deucher Date: Thu, 5 Nov 2009 10:23:03 -0500 Subject: EXA: fallback if no pMaskPicture->pDrawable A solid or gradient mask could be used for blending the source picture onto the destination picture. Fixes fdo bug 24838 Signed-off-by: Alex Deucher --- src/r600_exa.c | 7 ++++++- src/radeon_exa_render.c | 21 ++++++++++++++++++--- 2 files changed, 24 insertions(+), 4 deletions(-) diff --git a/src/r600_exa.c b/src/r600_exa.c index a2ce5c9..7d8cf46 100644 --- a/src/r600_exa.c +++ b/src/r600_exa.c @@ -1603,7 +1603,12 @@ static Bool R600CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP } if (pMaskPicture) { - PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + PixmapPtr pMaskPixmap; + + if (!pMaskPicture->pDrawable) + RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); + + pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width >= max_tex_w || pMaskPixmap->drawable.height >= max_tex_h) { diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index 7ae0d1f..b745705 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -524,7 +524,12 @@ static Bool R100CheckComposite(int op, PicturePtr pSrcPicture, } if (pMaskPicture) { - PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + PixmapPtr pMaskPixmap; + + if (!pMaskPicture->pDrawable) + RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); + + pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width > 2047 || pMaskPixmap->drawable.height > 2047) { @@ -900,7 +905,12 @@ static Bool R200CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP } if (pMaskPicture) { - PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + PixmapPtr pMaskPixmap; + + if (!pMaskPicture->pDrawable) + RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); + + pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width > 2047 || pMaskPixmap->drawable.height > 2047) { @@ -1359,7 +1369,12 @@ static Bool R300CheckComposite(int op, PicturePtr pSrcPicture, PicturePtr pMaskP } if (pMaskPicture) { - PixmapPtr pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); + PixmapPtr pMaskPixmap; + + if (!pMaskPicture->pDrawable) + RADEON_FALLBACK(("Solid or gradient pictures not supported yet\n")); + + pMaskPixmap = RADEONGetDrawablePixmap(pMaskPicture->pDrawable); if (pMaskPixmap->drawable.width > max_tex_w || pMaskPixmap->drawable.height > max_tex_h) { -- cgit v1.2.3