diff options
-rw-r--r-- | src/i830.h | 3 | ||||
-rw-r--r-- | src/i830_render.c | 45 | ||||
-rw-r--r-- | src/i915_render.c | 3 |
3 files changed, 34 insertions, 17 deletions
@@ -788,6 +788,9 @@ i830_transform_is_affine (PictTransformPtr t); void i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, int dstX, int dstY, int w, int h); +void i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY, + int maskX, int maskY, int dstX, int dstY, + int w, int h); void i830_done_composite(PixmapPtr pDst); /* i915_render.c */ Bool i915_check_composite(int op, PicturePtr pSrc, PicturePtr pMask, diff --git a/src/i830_render.c b/src/i830_render.c index ecee6f2a..c5196ccd 100644 --- a/src/i830_render.c +++ b/src/i830_render.c @@ -581,14 +581,10 @@ i830_emit_composite_state(ScrnInfoPtr pScrn) } } -/** - * Do a single rectangle composite operation. - * - * This function is shared between i830 and i915 generation code. - */ void -i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, - int dstX, int dstY, int w, int h) +i830_emit_composite_primitive(PixmapPtr pDst, int srcX, int srcY, + int maskX, int maskY, + int dstX, int dstY, int w, int h) { ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; I830Ptr pI830 = I830PTR(pScrn); @@ -670,15 +666,6 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, num_floats = 3 * per_vertex; - intel_batch_start_atomic(pScrn, - 58 + /* invarient */ - 24 + /* setup */ - 20 + /* 2 * setup_texture */ - 6 + num_floats /* verts */); - - if (pI830->needs_render_state_emit) - i830_emit_composite_state(pScrn); - BEGIN_BATCH(6 + num_floats); OUT_BATCH(MI_NOOP); @@ -740,6 +727,32 @@ i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, } ADVANCE_BATCH(); +} + + +/** + * Do a single rectangle composite operation. + * + * This function is shared between i830 and i915 generation code. + */ +void +i830_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, + int dstX, int dstY, int w, int h) +{ + ScrnInfoPtr pScrn = xf86Screens[pDst->drawable.pScreen->myNum]; + I830Ptr pI830 = I830PTR(pScrn); + + intel_batch_start_atomic(pScrn, + 58 + /* invarient */ + 24 + /* setup */ + 20 + /* 2 * setup_texture */ + 6 + 30 /* verts */); + + if (pI830->needs_render_state_emit) + i830_emit_composite_state(pScrn); + + i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY, + w, h); intel_batch_end_atomic(pScrn); diff --git a/src/i915_render.c b/src/i915_render.c index ab04e9c9..2d119862 100644 --- a/src/i915_render.c +++ b/src/i915_render.c @@ -556,7 +556,8 @@ i915_composite(PixmapPtr pDst, int srcX, int srcY, int maskX, int maskY, if (pI830->i915_render_state.needs_emit) i915_emit_composite_setup(pScrn); - i830_composite(pDst, srcX, srcY, maskX, maskY, dstX, dstY, w, h); + i830_emit_composite_primitive(pDst, srcX, srcY, maskX, maskY, dstX, dstY, + w, h); intel_batch_end_atomic(pScrn); } |