Blob Blame Raw
From 783cdb7374941bb1d2b63eea375fbf2f1b808cc3 Mon Sep 17 00:00:00 2001
From: Dave Airlie <airlied@redhat.com>
Date: Thu, 27 Nov 2008 15:29:06 +1000
Subject: [PATCH] r100/r200: EXA misrenders dst == a8 + dst alpha use.

Fedora BZ#469556

I've played with various dst and texture formats and rewritten large
parts of this to no avail, so I'm punting for now.
---
 src/radeon_exa_render.c |    6 ++++++
 1 files changed, 6 insertions(+), 0 deletions(-)

diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c
index 97199ae..e5cc196 100644
--- a/src/radeon_exa_render.c
+++ b/src/radeon_exa_render.c
@@ -533,6 +533,9 @@ static Bool FUNC_NAME(R100PrepareComposite)(int op,
     if (!RADEONGetDestFormat(pDstPicture, &dst_format))
 	return FALSE;
 
+    if (pDstPicture->format == PICT_a8 && RadeonBlendOp[op].dst_alpha)
+        RADEON_FALLBACK("Can't dst alpha blend A8\n");
+
     if (pMask)
 	info->accel_state->has_mask = TRUE;
     else
@@ -833,6 +836,9 @@ static Bool FUNC_NAME(R200PrepareComposite)(int op, PicturePtr pSrcPicture,
     if (!RADEONGetDestFormat(pDstPicture, &dst_format))
 	return FALSE;
 
+    if (pDstPicture->format == PICT_a8 && RadeonBlendOp[op].dst_alpha)
+        RADEON_FALLBACK("Can't dst alpha blend A8\n");
+
     if (pMask)
 	info->accel_state->has_mask = TRUE;
     else
-- 
1.6.0.3