diff options
author | Zack Rusin <[email protected]> | 2009-10-10 04:45:41 -0400 |
---|---|---|
committer | Zack Rusin <[email protected]> | 2009-10-13 12:25:13 -0400 |
commit | 89bb33fb20e69d9fa5325da10abf31d61d51d371 (patch) | |
tree | 10ddee2def6dfc0071eb186658869b228c2fe745 | |
parent | eefecf5d2a5bf9fc0f0f7919faf1747b0add8d6f (diff) |
st/xorg: fix and enable by default xrender acceleration
src in mask was broken
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_composite.c | 2 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_exa.c | 5 | ||||
-rw-r--r-- | src/gallium/state_trackers/xorg/xorg_exa_tgsi.c | 14 |
3 files changed, 17 insertions, 4 deletions
diff --git a/src/gallium/state_trackers/xorg/xorg_composite.c b/src/gallium/state_trackers/xorg/xorg_composite.c index 54b9ecaba1a..90283fe6af5 100644 --- a/src/gallium/state_trackers/xorg/xorg_composite.c +++ b/src/gallium/state_trackers/xorg/xorg_composite.c @@ -320,7 +320,7 @@ boolean xorg_composite_bind_state(struct exa_context *exa, pDstPicture, pSrc, pMask, pDst); setup_constant_buffers(exa, pDst); - return FALSE; + return TRUE; } void xorg_composite(struct exa_context *exa, diff --git a/src/gallium/state_trackers/xorg/xorg_exa.c b/src/gallium/state_trackers/xorg/xorg_exa.c index 29785c0040c..af76d6690f5 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa.c +++ b/src/gallium/state_trackers/xorg/xorg_exa.c @@ -506,7 +506,7 @@ ExaComposite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, struct exa_pixmap_priv *priv = exaGetPixmapDriverPrivate(pDst); #if DEBUG_PRINT - debug_printf("\tExaComposite\n"); + debug_printf("\tExaComposite(src[%d,%d], mask=[%d, %d], dst=[%d, %d], dim=[%d, %d])\n", srcX, srcY, maskX, maskY, dstX, dstY, width, height); #endif xorg_composite(exa, priv, srcX, srcY, maskX, maskY, @@ -526,6 +526,9 @@ ExaCheckComposite(int op, debug_printf("ExaCheckComposite(%d, %p, %p, %p) = %d\n", op, pSrcPicture, pMaskPicture, pDstPicture, accelerated); #endif +#if DISABLE_ACCEL + accelerated = FALSE; +#endif return accelerated; } diff --git a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c index 8ce06e374a9..8c9b674b4b6 100644 --- a/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c +++ b/src/gallium/state_trackers/xorg/xorg_exa_tgsi.c @@ -67,9 +67,19 @@ src_in_mask(struct ureg_program *ureg, struct ureg_src src, struct ureg_src mask) { - /* MUL dst, src, mask.wwww */ +#if 0 + /* MUL dst, src, mask.a */ ureg_MUL(ureg, dst, src, ureg_scalar(mask, TGSI_SWIZZLE_W)); +#else + /* MOV dst, src */ + /* MUL dst.a, src.a, mask.a */ + ureg_MOV(ureg, dst, src); + ureg_MUL(ureg, + ureg_writemask(dst, TGSI_WRITEMASK_W), + ureg_scalar(src, TGSI_SWIZZLE_W), + ureg_scalar(mask, TGSI_SWIZZLE_W)); +#endif } static struct ureg_src @@ -271,7 +281,7 @@ create_vs(struct pipe_context *pipe, if (has_mask) { src = ureg_DECL_vs_input(ureg, input_slot++); - dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 2); + dst = ureg_DECL_output(ureg, TGSI_SEMANTIC_GENERIC, 1); ureg_MOV(ureg, dst, src); } |