summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/i830_render.c14
-rw-r--r--src/i965_render.c16
2 files changed, 30 insertions, 0 deletions
diff --git a/src/i830_render.c b/src/i830_render.c
index f87a6926..43f4e28b 100644
--- a/src/i830_render.c
+++ b/src/i830_render.c
@@ -466,6 +466,20 @@ i830_prepare_composite(int op, PicturePtr source_picture,
if (!intel_check_pitch_3d(source))
return FALSE;
if (mask) {
+ if (mask_picture->componentAlpha &&
+ PICT_FORMAT_RGB(mask_picture->format)) {
+ /* Check if it's component alpha that relies on a source alpha and on
+ * the source value. We can only get one of those into the single
+ * source value that we get to blend with.
+ */
+ if (i830_blend_op[op].src_alpha &&
+ (i830_blend_op[op].src_blend != BLENDFACTOR_ZERO)) {
+ intel_debug_fallback(scrn, "Component alpha not "
+ "supported with source alpha and "
+ "source value blending.\n");
+ return FALSE;
+ }
+ }
if (!intel_check_pitch_3d(mask))
return FALSE;
}
diff --git a/src/i965_render.c b/src/i965_render.c
index 3e425efc..02b74f42 100644
--- a/src/i965_render.c
+++ b/src/i965_render.c
@@ -1491,6 +1491,22 @@ i965_prepare_composite(int op, PicturePtr source_picture,
}
if (mask_picture) {
+ if (mask_picture->componentAlpha &&
+ PICT_FORMAT_RGB(mask_picture->format)) {
+ /* Check if it's component alpha that relies on a source alpha and on
+ * the source value. We can only get one of those into the single
+ * source value that we get to blend with.
+ */
+ if (i965_blend_op[op].src_alpha &&
+ (i965_blend_op[op].src_blend != BRW_BLENDFACTOR_ZERO)) {
+ intel_debug_fallback(scrn,
+ "Component alpha not supported "
+ "with source alpha and source "
+ "value blending.\n");
+ return FALSE;
+ }
+ }
+
composite_op->mask_filter =
sampler_state_filter_from_picture(mask_picture->filter);
if (composite_op->mask_filter < 0) {