Fix 915-class Render after the 8xx-class Render fix.

The two shared i830_composite.c, so giving i830 atomic batch support
triggered anger about starting i830's atomic area while in i915's atomic
area.  Instead, split the emit-a-primitive stuff from the state emission.
This commit is contained in:
Eric Anholt 2009-07-16 11:40:51 -07:00
parent a1e6abb5ca
commit 8dd7ccf37e
3 changed files with 34 additions and 17 deletions

View File

@ -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,

View File

@ -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);

View File

@ -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);
}