diff options
author | Zhigang Gong <zhigang.gong@linux.intel.com> | 2011-11-16 15:04:37 +0800 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2011-11-16 23:57:57 +0000 |
commit | c4c2eb1fae2518578a56a278afeaec66d544439d (patch) | |
tree | b3118085c66789139858286d98e522b7ffb1252e /uxa/uxa-render.c | |
parent | ac7df2919b92c9fe47c6745975e1848932f989e8 (diff) |
uxa/glamor: Introduce additional access modes to wrap glamor acceleration
Integrate glamor acceleration into UXA framework. Add
necessary flushing at the following points:
1. Flush UXA batch buffer before call into glamor.
2. Flush GL operations after return from a glamor function.
3. The point we need to flush UXA batch buffer, we also
need to flush GL operations, for example, in
intel_flush_callback and couple of places in intel_display.c.
Signed-off-by: Zhigang Gong <zhigang.gong@linux.intel.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'uxa/uxa-render.c')
-rw-r--r-- | uxa/uxa-render.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/uxa/uxa-render.c b/uxa/uxa-render.c index 34257c6e..51c12f17 100644 --- a/uxa/uxa-render.c +++ b/uxa/uxa-render.c @@ -571,7 +571,7 @@ uxa_picture_from_pixman_image(ScreenPtr screen, if (uxa_picture_prepare_access(picture, UXA_ACCESS_RW)) { fbComposite(PictOpSrc, src, NULL, picture, 0, 0, 0, 0, 0, 0, width, height); - uxa_picture_finish_access(picture); + uxa_picture_finish_access(picture, UXA_ACCESS_RW); } FreePicture(src, 0); @@ -599,7 +599,7 @@ uxa_create_solid(ScreenPtr screen, uint32_t color) return 0; } *((uint32_t *)pixmap->devPrivate.ptr) = color; - uxa_finish_access((DrawablePtr)pixmap); + uxa_finish_access((DrawablePtr)pixmap, UXA_ACCESS_RW); picture = CreatePicture(0, &pixmap->drawable, PictureMatchFormat(screen, 32, PICT_a8r8g8b8), @@ -702,7 +702,7 @@ uxa_acquire_pattern(ScreenPtr pScreen, if (uxa_picture_prepare_access(pDst, UXA_ACCESS_RW)) { fbComposite(PictOpSrc, pSrc, NULL, pDst, x, y, 0, 0, 0, 0, width, height); - uxa_picture_finish_access(pDst); + uxa_picture_finish_access(pDst, UXA_ACCESS_RW); return pDst; } else { FreePicture(pDst, 0); @@ -761,9 +761,9 @@ uxa_render_picture(ScreenPtr screen, ret = 1; fbComposite(PictOpSrc, src, NULL, picture, x, y, 0, 0, 0, 0, width, height); - uxa_picture_finish_access(src); + uxa_picture_finish_access(src, UXA_ACCESS_RO); } - uxa_picture_finish_access(picture); + uxa_picture_finish_access(picture, UXA_ACCESS_RW); } if (!ret) { @@ -1902,7 +1902,7 @@ uxa_trapezoids(CARD8 op, PicturePtr src, PicturePtr dst, for (; ntrap; ntrap--, traps++) (*ps->RasterizeTrapezoid) (dst, traps, 0, 0); - uxa_finish_access(pDraw); + uxa_finish_access(pDraw, UXA_ACCESS_RW); } } else if (maskFormat) { PixmapPtr scratch = NULL; @@ -2013,7 +2013,7 @@ uxa_triangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, DrawablePtr pDraw = pDst->pDrawable; if (uxa_prepare_access(pDraw, UXA_ACCESS_RW)) { (*ps->AddTriangles) (pDst, 0, 0, ntri, tris); - uxa_finish_access(pDraw); + uxa_finish_access(pDraw, UXA_ACCESS_RW); } } else if (maskFormat) { PicturePtr pPicture; @@ -2049,7 +2049,7 @@ uxa_triangles(CARD8 op, PicturePtr pSrc, PicturePtr pDst, if (uxa_prepare_access(pPicture->pDrawable, UXA_ACCESS_RW)) { (*ps->AddTriangles) (pPicture, -bounds.x1, -bounds.y1, ntri, tris); - uxa_finish_access(pPicture->pDrawable); + uxa_finish_access(pPicture->pDrawable, UXA_ACCESS_RW); } xRel = bounds.x1 + xSrc - xDst; |