src in mask was brokentags/mesa_7_7_rc1
@@ -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, |
@@ -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, | |||
@@ -525,6 +525,9 @@ ExaCheckComposite(int op, | |||
#if DEBUG_PRINT | |||
debug_printf("ExaCheckComposite(%d, %p, %p, %p) = %d\n", | |||
op, pSrcPicture, pMaskPicture, pDstPicture, accelerated); | |||
#endif | |||
#if DISABLE_ACCEL | |||
accelerated = FALSE; | |||
#endif | |||
return accelerated; | |||
} |
@@ -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); | |||
} | |||