summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorZack Rusin <zackr@vmware.com>2009-10-11 06:08:42 -0400
committerZack Rusin <zackr@vmware.com>2009-10-15 00:06:43 -0400
commit074e069910c7082620be4211fe5496365f828886 (patch)
tree0253950f1167465f5efeb782e361bd3db3beb12b /src
parenta82fc97c643c4309a10cfefb108c4c0f11a2e55a (diff)
st/xorg: fix most of the composition modes
Diffstat (limited to 'src')
-rw-r--r--src/gallium/state_trackers/xorg/xorg_composite.c40
1 files changed, 32 insertions, 8 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c
index b39b39511e..b07192175e 100644
--- a/src/gallium/state_trackers/xorg/xorg_composite.c
+++ b/src/gallium/state_trackers/xorg/xorg_composite.c
@@ -22,7 +22,7 @@ struct xorg_composite_blend {
#define BLEND_OP_OVER 3
static const struct xorg_composite_blend xorg_blends[] = {
{ PictOpClear,
- PIPE_BLENDFACTOR_CONST_COLOR, PIPE_BLENDFACTOR_CONST_ALPHA,
+ PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ZERO,
PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ZERO },
{ PictOpSrc,
@@ -34,20 +34,44 @@ static const struct xorg_composite_blend xorg_blends[] = {
PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_ONE },
{ PictOpOver,
- PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_ONE,
PIPE_BLENDFACTOR_INV_SRC_ALPHA, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
{ PictOpOverReverse,
- PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_ONE,
- PIPE_BLENDFACTOR_INV_SRC_ALPHA, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
+ PIPE_BLENDFACTOR_INV_DST_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
+
+ { PictOpIn,
+ PIPE_BLENDFACTOR_DST_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
+
+ { PictOpInReverse,
+ PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_ONE },
+
+ { PictOpOut,
+ PIPE_BLENDFACTOR_INV_DST_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
{ PictOpOutReverse,
- PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ONE,
PIPE_BLENDFACTOR_INV_SRC_ALPHA, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
- { PictOpAdd,
- PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_ONE,
+ { PictOpAtop,
+ PIPE_BLENDFACTOR_DST_ALPHA, PIPE_BLENDFACTOR_ONE,
PIPE_BLENDFACTOR_INV_SRC_ALPHA, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
+
+ { PictOpAtopReverse,
+ PIPE_BLENDFACTOR_INV_DST_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_SRC_ALPHA, PIPE_BLENDFACTOR_INV_SRC_ALPHA },
+
+ { PictOpXor,
+ PIPE_BLENDFACTOR_INV_DST_ALPHA, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_INV_SRC_ALPHA, PIPE_BLENDFACTOR_ONE },
+
+ { PictOpAdd,
+ PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_ONE,
+ PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_ONE },
};
@@ -164,7 +188,7 @@ bind_blend_state(struct exa_context *exa, int op,
blend_opt = blend_for_op(op);
- memset(&blend, 0, sizeof(struct pipe_blend_state));
+ memset(&blend, 0, sizeof(struct pipe_blend_state));
blend.blend_enable = 1;
blend.colormask |= PIPE_MASK_RGBA;