diff options
author | Pauli Nieminen <suokkos@gmail.com> | 2009-08-25 02:36:13 +0300 |
---|---|---|
committer | Pauli Nieminen <suokkos@gmail.com> | 2009-08-25 02:36:13 +0300 |
commit | ce7ed63f0c2f5cb1c030f73a5d8f6544eaac0f81 (patch) | |
tree | 7554a2723fabb39037101724e5f179b70bb5a948 /src/gallium/state_trackers/xorg/xorg_composite.c | |
parent | 4297f32c246cc5b726d02745456c06952322958d (diff) | |
parent | 1d5a06a1f7812c055db1d724e40d21a0e3686dd1 (diff) |
Merge branch 'master' of ssh://git.freedesktop.org/git/mesa/mesa into r600_state_predict
Diffstat (limited to 'src/gallium/state_trackers/xorg/xorg_composite.c')
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_composite.c | 31 |
1 files changed, 31 insertions, 0 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index 255ae91f09..05143ad11a 100644 --- a/src/gallium/state_trackers/xorg/xorg_composite.c +++ b/src/gallium/state_trackers/xorg/xorg_composite.c @@ -1,5 +1,36 @@ #include "xorg_composite.h" +struct xorg_composite_blend { + int op:8; + + unsigned rgb_src_factor:5; /**< PIPE_BLENDFACTOR_x */ + unsigned rgb_dst_factor:5; /**< PIPE_BLENDFACTOR_x */ + + unsigned alpha_src_factor:5; /**< PIPE_BLENDFACTOR_x */ + unsigned alpha_dst_factor:5; /**< PIPE_BLENDFACTOR_x */ +}; + +static const struct xorg_composite_blend xorg_blends[] = { + { PictOpClear, + PIPE_BLENDFACTOR_CONST_COLOR, PIPE_BLENDFACTOR_CONST_ALPHA, + PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ZERO }, + + { PictOpSrc, + PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_ONE, + PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ZERO }, + + { PictOpDst, + PIPE_BLENDFACTOR_ZERO, PIPE_BLENDFACTOR_ZERO, + PIPE_BLENDFACTOR_ONE, PIPE_BLENDFACTOR_ONE }, + + { PictOpOver, + PIPE_BLENDFACTOR_SRC_ALPHA, 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 }, +}; boolean xorg_composite_accelerated(int op, PicturePtr pSrcPicture, |