diff options
author | Alex Deucher <alex@samba.(none)> | 2008-03-14 15:59:36 -0400 |
---|---|---|
committer | Alex Deucher <alex@samba.(none)> | 2008-03-14 15:59:36 -0400 |
commit | 96bea7906c4706fcd57a9cd8f1ce3feab6ac676d (patch) | |
tree | 59cc0203a0446b08fbec3809303117690905db10 | |
parent | cffe3dcc8991cd7c457a9c1a9f41055aa9ea3436 (diff) |
R3xx: theoretical support for component alpha
masks are still broken so...
-rw-r--r-- | src/radeon_exa_render.c | 35 |
1 files changed, 34 insertions, 1 deletions
diff --git a/src/radeon_exa_render.c b/src/radeon_exa_render.c index fc04463b..5511200b 100644 --- a/src/radeon_exa_render.c +++ b/src/radeon_exa_render.c @@ -1333,7 +1333,40 @@ static Bool FUNC_NAME(R300PrepareComposite)(int op, PicturePtr pSrcPicture, else src_alpha = R300_ALU_ALPHA_SRC0_A; - if (pMask) { + if (pMask && pMaskPicture->componentAlpha) { + if (RadeonBlendOp[op].src_alpha) { + if (PICT_FORMAT_A(pSrcPicture->format) == 0) { + src_color = R300_ALU_RGB_1_0; + src_alpha = R300_ALU_ALPHA_1_0; + } else { + src_color = R300_ALU_RGB_SRC0_AAA; + src_alpha = R300_ALU_ALPHA_SRC0_A; + } + + mask_color = R300_ALU_RGB_SRC1_RGB; + + if (PICT_FORMAT_A(pMaskPicture->format) == 0) + mask_alpha = R300_ALU_ALPHA_1_0; + else + mask_alpha = R300_ALU_ALPHA_SRC1_A; + + } else { + src_color = R300_ALU_RGB_SRC0_RGB; + + if (PICT_FORMAT_A(pSrcPicture->format) == 0) + src_alpha = R300_ALU_ALPHA_1_0; + else + src_alpha = R300_ALU_ALPHA_SRC0_A; + + mask_color = R300_ALU_RGB_SRC1_RGB; + + if (PICT_FORMAT_A(pMaskPicture->format) == 0) + mask_alpha = R300_ALU_ALPHA_1_0; + else + mask_alpha = R300_ALU_ALPHA_SRC1_A; + + } + } else if (pMask) { if (PICT_FORMAT_A(pMaskPicture->format) == 0) mask_color = R300_ALU_RGB_1_0; else |