diff options
author | Eric Anholt <eric@anholt.net> | 2009-07-16 11:40:51 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2009-07-16 11:48:33 -0700 |
commit | 8dd7ccf37e2de6d80b556e6d18af244cefc1e417 (patch) | |
tree | cf1fa14e7e2f68d6cbd1838b63dab1495b3e7fe0 /src/i830_render.c | |
parent | a1e6abb5ca89d699144d10fdc4309b3b78f2f7a9 (diff) |
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.
Diffstat (limited to 'src/i830_render.c')
-rw-r--r-- | src/i830_render.c | 45 |
1 files changed, 29 insertions, 16 deletions
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); |