Check vtSema before accelerating primitives and sync in fallbacks only if
we got vtSema
This commit is contained in:
parent
6cba5f1260
commit
d0dc574adb
60
exa/exa.c
60
exa/exa.c
|
@ -330,12 +330,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pScreen);
|
||||||
|
pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth);
|
||||||
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
if (!w || !h)
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
|
else
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||||
|
|
||||||
|
pExaPixmap->area = NULL;
|
||||||
|
pExaPixmap->dirty = FALSE;
|
||||||
|
return pPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
bpp = BitsPerPixel (depth);
|
bpp = BitsPerPixel (depth);
|
||||||
if (bpp == 32 && depth == 24)
|
if (bpp == 32 && depth == 24)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
|
||||||
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
||||||
if (pScrn->formats[format].depth == 24)
|
if (pScrn->formats[format].depth == 24)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +490,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
int partX1, partX2;
|
int partX1, partX2;
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
|
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
||||||
|
@ -610,6 +631,12 @@ static RegionPtr
|
||||||
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
||||||
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDstDrawable->pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
srcx, srcy, width, height, dstx, dsty);
|
||||||
|
}
|
||||||
|
|
||||||
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
||||||
srcx, srcy, width, height,
|
srcx, srcy, width, height,
|
||||||
dstx, dsty, exaCopyNtoN, 0, 0);
|
dstx, dsty, exaCopyNtoN, 0, 0);
|
||||||
|
@ -623,6 +650,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
|
@ -634,7 +662,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (!pScrn->vtSema ||
|
||||||
|
pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
|
@ -729,6 +758,7 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -736,7 +766,8 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int partX1, partX2, partY1, partY2;
|
int partX1, partX2, partY1, partY2;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
if (!pScrn->vtSema ||
|
||||||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
exaWaitSync (pDrawable->pScreen);
|
exaWaitSync (pDrawable->pScreen);
|
||||||
|
@ -981,6 +1012,13 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
pExaScr->SavedCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
|
@ -1041,7 +1079,20 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
static void
|
static void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
switch (what) {
|
||||||
|
case PW_BACKGROUND:
|
||||||
|
pExaScr->SavedPaintWindowBackground(pWin, pRegion, what);
|
||||||
|
case PW_BORDER:
|
||||||
|
pExaScr->SavedPaintWindowBorder(pWin, pRegion, what);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
if (!REGION_NUM_RECTS(pRegion))
|
||||||
return;
|
return;
|
||||||
switch (what) {
|
switch (what) {
|
||||||
|
@ -1224,8 +1275,9 @@ void exaWaitSync(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
ExaCardInfoPtr card = &(pExaScr->info->card);
|
ExaCardInfoPtr card = &(pExaScr->info->card);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
if (card->needsSync) {
|
if (card->needsSync && pScrn->vtSema) {
|
||||||
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
||||||
card->needsSync = FALSE;
|
card->needsSync = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,12 +330,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pScreen);
|
||||||
|
pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth);
|
||||||
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
if (!w || !h)
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
|
else
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||||
|
|
||||||
|
pExaPixmap->area = NULL;
|
||||||
|
pExaPixmap->dirty = FALSE;
|
||||||
|
return pPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
bpp = BitsPerPixel (depth);
|
bpp = BitsPerPixel (depth);
|
||||||
if (bpp == 32 && depth == 24)
|
if (bpp == 32 && depth == 24)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
|
||||||
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
||||||
if (pScrn->formats[format].depth == 24)
|
if (pScrn->formats[format].depth == 24)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +490,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
int partX1, partX2;
|
int partX1, partX2;
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
|
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
||||||
|
@ -610,6 +631,12 @@ static RegionPtr
|
||||||
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
||||||
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDstDrawable->pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
srcx, srcy, width, height, dstx, dsty);
|
||||||
|
}
|
||||||
|
|
||||||
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
||||||
srcx, srcy, width, height,
|
srcx, srcy, width, height,
|
||||||
dstx, dsty, exaCopyNtoN, 0, 0);
|
dstx, dsty, exaCopyNtoN, 0, 0);
|
||||||
|
@ -623,6 +650,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
|
@ -634,7 +662,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (!pScrn->vtSema ||
|
||||||
|
pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
|
@ -729,6 +758,7 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -736,7 +766,8 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int partX1, partX2, partY1, partY2;
|
int partX1, partX2, partY1, partY2;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
if (!pScrn->vtSema ||
|
||||||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
exaWaitSync (pDrawable->pScreen);
|
exaWaitSync (pDrawable->pScreen);
|
||||||
|
@ -981,6 +1012,13 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
pExaScr->SavedCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
|
@ -1041,7 +1079,20 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
static void
|
static void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
switch (what) {
|
||||||
|
case PW_BACKGROUND:
|
||||||
|
pExaScr->SavedPaintWindowBackground(pWin, pRegion, what);
|
||||||
|
case PW_BORDER:
|
||||||
|
pExaScr->SavedPaintWindowBorder(pWin, pRegion, what);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
if (!REGION_NUM_RECTS(pRegion))
|
||||||
return;
|
return;
|
||||||
switch (what) {
|
switch (what) {
|
||||||
|
@ -1224,8 +1275,9 @@ void exaWaitSync(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
ExaCardInfoPtr card = &(pExaScr->info->card);
|
ExaCardInfoPtr card = &(pExaScr->info->card);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
if (card->needsSync) {
|
if (card->needsSync && pScrn->vtSema) {
|
||||||
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
||||||
card->needsSync = FALSE;
|
card->needsSync = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,12 +330,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pScreen);
|
||||||
|
pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth);
|
||||||
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
if (!w || !h)
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
|
else
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||||
|
|
||||||
|
pExaPixmap->area = NULL;
|
||||||
|
pExaPixmap->dirty = FALSE;
|
||||||
|
return pPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
bpp = BitsPerPixel (depth);
|
bpp = BitsPerPixel (depth);
|
||||||
if (bpp == 32 && depth == 24)
|
if (bpp == 32 && depth == 24)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
|
||||||
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
||||||
if (pScrn->formats[format].depth == 24)
|
if (pScrn->formats[format].depth == 24)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +490,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
int partX1, partX2;
|
int partX1, partX2;
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
|
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
||||||
|
@ -610,6 +631,12 @@ static RegionPtr
|
||||||
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
||||||
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDstDrawable->pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
srcx, srcy, width, height, dstx, dsty);
|
||||||
|
}
|
||||||
|
|
||||||
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
||||||
srcx, srcy, width, height,
|
srcx, srcy, width, height,
|
||||||
dstx, dsty, exaCopyNtoN, 0, 0);
|
dstx, dsty, exaCopyNtoN, 0, 0);
|
||||||
|
@ -623,6 +650,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
|
@ -634,7 +662,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (!pScrn->vtSema ||
|
||||||
|
pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
|
@ -729,6 +758,7 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -736,7 +766,8 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int partX1, partX2, partY1, partY2;
|
int partX1, partX2, partY1, partY2;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
if (!pScrn->vtSema ||
|
||||||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
exaWaitSync (pDrawable->pScreen);
|
exaWaitSync (pDrawable->pScreen);
|
||||||
|
@ -981,6 +1012,13 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
pExaScr->SavedCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
|
@ -1041,7 +1079,20 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
static void
|
static void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
switch (what) {
|
||||||
|
case PW_BACKGROUND:
|
||||||
|
pExaScr->SavedPaintWindowBackground(pWin, pRegion, what);
|
||||||
|
case PW_BORDER:
|
||||||
|
pExaScr->SavedPaintWindowBorder(pWin, pRegion, what);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
if (!REGION_NUM_RECTS(pRegion))
|
||||||
return;
|
return;
|
||||||
switch (what) {
|
switch (what) {
|
||||||
|
@ -1224,8 +1275,9 @@ void exaWaitSync(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
ExaCardInfoPtr card = &(pExaScr->info->card);
|
ExaCardInfoPtr card = &(pExaScr->info->card);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
if (card->needsSync) {
|
if (card->needsSync && pScrn->vtSema) {
|
||||||
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
||||||
card->needsSync = FALSE;
|
card->needsSync = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
#include "mipict.h"
|
#include "mipict.h"
|
||||||
|
|
||||||
|
#include "xf86str.h"
|
||||||
|
#include "xf86.h"
|
||||||
|
|
||||||
#define EXA_DEBUG_FALLBACKS 0
|
#define EXA_DEBUG_FALLBACKS 0
|
||||||
|
|
||||||
#if EXA_DEBUG_FALLBACKS
|
#if EXA_DEBUG_FALLBACKS
|
||||||
|
@ -502,6 +505,15 @@ exaComposite(CARD8 op,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDst->pDrawable->pScreen);
|
ExaScreenPriv (pDst->pDrawable->pScreen);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
exaDrawableDirty(pDst->pDrawable);
|
||||||
|
pExaScr->SavedComposite(op, pSrc, pMask, pDst, xSrc, ySrc,
|
||||||
|
xMask, yMask, xDst, yDst, width, height);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!pMask && pSrc->pDrawable)
|
if (!pMask && pSrc->pDrawable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -330,12 +330,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pScreen);
|
||||||
|
pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth);
|
||||||
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
if (!w || !h)
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
|
else
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||||
|
|
||||||
|
pExaPixmap->area = NULL;
|
||||||
|
pExaPixmap->dirty = FALSE;
|
||||||
|
return pPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
bpp = BitsPerPixel (depth);
|
bpp = BitsPerPixel (depth);
|
||||||
if (bpp == 32 && depth == 24)
|
if (bpp == 32 && depth == 24)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
|
||||||
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
||||||
if (pScrn->formats[format].depth == 24)
|
if (pScrn->formats[format].depth == 24)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +490,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
int partX1, partX2;
|
int partX1, partX2;
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
|
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
||||||
|
@ -610,6 +631,12 @@ static RegionPtr
|
||||||
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
||||||
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDstDrawable->pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
srcx, srcy, width, height, dstx, dsty);
|
||||||
|
}
|
||||||
|
|
||||||
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
||||||
srcx, srcy, width, height,
|
srcx, srcy, width, height,
|
||||||
dstx, dsty, exaCopyNtoN, 0, 0);
|
dstx, dsty, exaCopyNtoN, 0, 0);
|
||||||
|
@ -623,6 +650,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
|
@ -634,7 +662,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (!pScrn->vtSema ||
|
||||||
|
pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
|
@ -729,6 +758,7 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -736,7 +766,8 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int partX1, partX2, partY1, partY2;
|
int partX1, partX2, partY1, partY2;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
if (!pScrn->vtSema ||
|
||||||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
exaWaitSync (pDrawable->pScreen);
|
exaWaitSync (pDrawable->pScreen);
|
||||||
|
@ -981,6 +1012,13 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
pExaScr->SavedCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
|
@ -1041,7 +1079,20 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
static void
|
static void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
switch (what) {
|
||||||
|
case PW_BACKGROUND:
|
||||||
|
pExaScr->SavedPaintWindowBackground(pWin, pRegion, what);
|
||||||
|
case PW_BORDER:
|
||||||
|
pExaScr->SavedPaintWindowBorder(pWin, pRegion, what);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
if (!REGION_NUM_RECTS(pRegion))
|
||||||
return;
|
return;
|
||||||
switch (what) {
|
switch (what) {
|
||||||
|
@ -1224,8 +1275,9 @@ void exaWaitSync(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
ExaCardInfoPtr card = &(pExaScr->info->card);
|
ExaCardInfoPtr card = &(pExaScr->info->card);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
if (card->needsSync) {
|
if (card->needsSync && pScrn->vtSema) {
|
||||||
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
||||||
card->needsSync = FALSE;
|
card->needsSync = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,12 +330,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pScreen);
|
||||||
|
pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth);
|
||||||
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
if (!w || !h)
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
|
else
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||||
|
|
||||||
|
pExaPixmap->area = NULL;
|
||||||
|
pExaPixmap->dirty = FALSE;
|
||||||
|
return pPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
bpp = BitsPerPixel (depth);
|
bpp = BitsPerPixel (depth);
|
||||||
if (bpp == 32 && depth == 24)
|
if (bpp == 32 && depth == 24)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
|
||||||
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
||||||
if (pScrn->formats[format].depth == 24)
|
if (pScrn->formats[format].depth == 24)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +490,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
int partX1, partX2;
|
int partX1, partX2;
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
|
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
||||||
|
@ -610,6 +631,12 @@ static RegionPtr
|
||||||
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
||||||
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDstDrawable->pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
srcx, srcy, width, height, dstx, dsty);
|
||||||
|
}
|
||||||
|
|
||||||
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
||||||
srcx, srcy, width, height,
|
srcx, srcy, width, height,
|
||||||
dstx, dsty, exaCopyNtoN, 0, 0);
|
dstx, dsty, exaCopyNtoN, 0, 0);
|
||||||
|
@ -623,6 +650,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
|
@ -634,7 +662,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (!pScrn->vtSema ||
|
||||||
|
pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
|
@ -729,6 +758,7 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -736,7 +766,8 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int partX1, partX2, partY1, partY2;
|
int partX1, partX2, partY1, partY2;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
if (!pScrn->vtSema ||
|
||||||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
exaWaitSync (pDrawable->pScreen);
|
exaWaitSync (pDrawable->pScreen);
|
||||||
|
@ -981,6 +1012,13 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
pExaScr->SavedCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
|
@ -1041,7 +1079,20 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
static void
|
static void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
switch (what) {
|
||||||
|
case PW_BACKGROUND:
|
||||||
|
pExaScr->SavedPaintWindowBackground(pWin, pRegion, what);
|
||||||
|
case PW_BORDER:
|
||||||
|
pExaScr->SavedPaintWindowBorder(pWin, pRegion, what);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
if (!REGION_NUM_RECTS(pRegion))
|
||||||
return;
|
return;
|
||||||
switch (what) {
|
switch (what) {
|
||||||
|
@ -1224,8 +1275,9 @@ void exaWaitSync(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
ExaCardInfoPtr card = &(pExaScr->info->card);
|
ExaCardInfoPtr card = &(pExaScr->info->card);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
if (card->needsSync) {
|
if (card->needsSync && pScrn->vtSema) {
|
||||||
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
||||||
card->needsSync = FALSE;
|
card->needsSync = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -330,12 +330,26 @@ exaCreatePixmap(ScreenPtr pScreen, int w, int h, int depth)
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
ExaPixmapPrivPtr pExaPixmap;
|
ExaPixmapPrivPtr pExaPixmap;
|
||||||
int bpp;
|
int bpp;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pScreen);
|
||||||
|
pPixmap = pExaScr->SavedCreatePixmap(pScreen, w, h, depth);
|
||||||
|
pExaPixmap = ExaGetPixmapPriv(pPixmap);
|
||||||
|
if (!w || !h)
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_PINNED;
|
||||||
|
else
|
||||||
|
pExaPixmap->score = EXA_PIXMAP_SCORE_INIT;
|
||||||
|
|
||||||
|
pExaPixmap->area = NULL;
|
||||||
|
pExaPixmap->dirty = FALSE;
|
||||||
|
return pPixmap;
|
||||||
|
}
|
||||||
|
|
||||||
bpp = BitsPerPixel (depth);
|
bpp = BitsPerPixel (depth);
|
||||||
if (bpp == 32 && depth == 24)
|
if (bpp == 32 && depth == 24)
|
||||||
{
|
{
|
||||||
int format;
|
int format;
|
||||||
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
|
||||||
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
for (format = 0; format < MAXFORMATS && pScrn->formats[format].depth; ++format)
|
||||||
if (pScrn->formats[format].depth == 24)
|
if (pScrn->formats[format].depth == 24)
|
||||||
{
|
{
|
||||||
|
@ -476,6 +490,13 @@ exaFillSpans(DrawablePtr pDrawable, GCPtr pGC, int n,
|
||||||
int partX1, partX2;
|
int partX1, partX2;
|
||||||
int off_x, off_y;
|
int off_x, off_y;
|
||||||
|
|
||||||
|
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaCheckFillSpans(pDrawable, pGC, n, ppt, pwidth, fSorted);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &off_x, &off_y)) ||
|
||||||
|
@ -610,6 +631,12 @@ static RegionPtr
|
||||||
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
exaCopyArea(DrawablePtr pSrcDrawable, DrawablePtr pDstDrawable, GCPtr pGC,
|
||||||
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
int srcx, int srcy, int width, int height, int dstx, int dsty)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDstDrawable->pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
return ExaCheckCopyArea(pSrcDrawable, pDstDrawable, pGC,
|
||||||
|
srcx, srcy, width, height, dstx, dsty);
|
||||||
|
}
|
||||||
|
|
||||||
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
return fbDoCopy (pSrcDrawable, pDstDrawable, pGC,
|
||||||
srcx, srcy, width, height,
|
srcx, srcy, width, height,
|
||||||
dstx, dsty, exaCopyNtoN, 0, 0);
|
dstx, dsty, exaCopyNtoN, 0, 0);
|
||||||
|
@ -623,6 +650,7 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
RegionPtr pClip = fbGetCompositeClip(pGC);
|
RegionPtr pClip = fbGetCompositeClip(pGC);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
register BoxPtr pbox;
|
register BoxPtr pbox;
|
||||||
BoxPtr pextent;
|
BoxPtr pextent;
|
||||||
|
@ -634,7 +662,8 @@ exaPolyFillRect(DrawablePtr pDrawable,
|
||||||
int n;
|
int n;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (pGC->fillStyle != FillSolid ||
|
if (!pScrn->vtSema ||
|
||||||
|
pGC->fillStyle != FillSolid ||
|
||||||
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap,
|
||||||
pGC->alu,
|
pGC->alu,
|
||||||
|
@ -729,6 +758,7 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int y2)
|
int y2)
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDrawable->pScreen);
|
ExaScreenPriv (pDrawable->pScreen);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDrawable->pScreen);
|
||||||
PixmapPtr pPixmap;
|
PixmapPtr pPixmap;
|
||||||
BoxPtr pbox;
|
BoxPtr pbox;
|
||||||
int nbox;
|
int nbox;
|
||||||
|
@ -736,7 +766,8 @@ exaSolidBoxClipped (DrawablePtr pDrawable,
|
||||||
int partX1, partX2, partY1, partY2;
|
int partX1, partX2, partY1, partY2;
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
if (!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
if (!pScrn->vtSema ||
|
||||||
|
!(pPixmap = exaGetOffscreenPixmap (pDrawable, &xoff, &yoff)) ||
|
||||||
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
!(*pExaScr->info->accel.PrepareSolid) (pPixmap, GXcopy, pm, fg))
|
||||||
{
|
{
|
||||||
exaWaitSync (pDrawable->pScreen);
|
exaWaitSync (pDrawable->pScreen);
|
||||||
|
@ -981,6 +1012,13 @@ exaCopyWindow(WindowPtr pWin, DDXPointRec ptOldOrg, RegionPtr prgnSrc)
|
||||||
RegionRec rgnDst;
|
RegionRec rgnDst;
|
||||||
int dx, dy;
|
int dx, dy;
|
||||||
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
PixmapPtr pPixmap = (*pWin->drawable.pScreen->GetWindowPixmap) (pWin);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
pExaScr->SavedCopyWindow (pWin, ptOldOrg, prgnSrc);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
dx = ptOldOrg.x - pWin->drawable.x;
|
dx = ptOldOrg.x - pWin->drawable.x;
|
||||||
|
@ -1041,7 +1079,20 @@ exaFillRegionSolid (DrawablePtr pDrawable,
|
||||||
static void
|
static void
|
||||||
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
exaPaintWindow(WindowPtr pWin, RegionPtr pRegion, int what)
|
||||||
{
|
{
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pWin->drawable.pScreen);
|
||||||
|
ExaScreenPriv(pWin->drawable.pScreen);
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
switch (what) {
|
||||||
|
case PW_BACKGROUND:
|
||||||
|
pExaScr->SavedPaintWindowBackground(pWin, pRegion, what);
|
||||||
|
case PW_BORDER:
|
||||||
|
pExaScr->SavedPaintWindowBorder(pWin, pRegion, what);
|
||||||
|
}
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
STRACE;
|
STRACE;
|
||||||
|
|
||||||
if (!REGION_NUM_RECTS(pRegion))
|
if (!REGION_NUM_RECTS(pRegion))
|
||||||
return;
|
return;
|
||||||
switch (what) {
|
switch (what) {
|
||||||
|
@ -1224,8 +1275,9 @@ void exaWaitSync(ScreenPtr pScreen)
|
||||||
{
|
{
|
||||||
ExaScreenPriv(pScreen);
|
ExaScreenPriv(pScreen);
|
||||||
ExaCardInfoPtr card = &(pExaScr->info->card);
|
ExaCardInfoPtr card = &(pExaScr->info->card);
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pScreen);
|
||||||
|
|
||||||
if (card->needsSync) {
|
if (card->needsSync && pScrn->vtSema) {
|
||||||
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
(*pExaScr->info->accel.WaitMarker)(pScreen, card->lastMarker);
|
||||||
card->needsSync = FALSE;
|
card->needsSync = FALSE;
|
||||||
}
|
}
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
#include "mipict.h"
|
#include "mipict.h"
|
||||||
|
|
||||||
|
#include "xf86str.h"
|
||||||
|
#include "xf86.h"
|
||||||
|
|
||||||
#define EXA_DEBUG_FALLBACKS 0
|
#define EXA_DEBUG_FALLBACKS 0
|
||||||
|
|
||||||
#if EXA_DEBUG_FALLBACKS
|
#if EXA_DEBUG_FALLBACKS
|
||||||
|
@ -502,6 +505,15 @@ exaComposite(CARD8 op,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDst->pDrawable->pScreen);
|
ExaScreenPriv (pDst->pDrawable->pScreen);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
exaDrawableDirty(pDst->pDrawable);
|
||||||
|
pExaScr->SavedComposite(op, pSrc, pMask, pDst, xSrc, ySrc,
|
||||||
|
xMask, yMask, xDst, yDst, width, height);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!pMask && pSrc->pDrawable)
|
if (!pMask && pSrc->pDrawable)
|
||||||
{
|
{
|
||||||
|
|
|
@ -30,6 +30,9 @@
|
||||||
#ifdef RENDER
|
#ifdef RENDER
|
||||||
#include "mipict.h"
|
#include "mipict.h"
|
||||||
|
|
||||||
|
#include "xf86str.h"
|
||||||
|
#include "xf86.h"
|
||||||
|
|
||||||
#define EXA_DEBUG_FALLBACKS 0
|
#define EXA_DEBUG_FALLBACKS 0
|
||||||
|
|
||||||
#if EXA_DEBUG_FALLBACKS
|
#if EXA_DEBUG_FALLBACKS
|
||||||
|
@ -502,6 +505,15 @@ exaComposite(CARD8 op,
|
||||||
{
|
{
|
||||||
ExaScreenPriv (pDst->pDrawable->pScreen);
|
ExaScreenPriv (pDst->pDrawable->pScreen);
|
||||||
int ret = -1;
|
int ret = -1;
|
||||||
|
ScrnInfoPtr pScrn = XF86SCRNINFO(pDst->pDrawable->pScreen);
|
||||||
|
|
||||||
|
if (!pScrn->vtSema) {
|
||||||
|
exaDrawableDirty(pDst->pDrawable);
|
||||||
|
pExaScr->SavedComposite(op, pSrc, pMask, pDst, xSrc, ySrc,
|
||||||
|
xMask, yMask, xDst, yDst, width, height);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if (!pMask && pSrc->pDrawable)
|
if (!pMask && pSrc->pDrawable)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue