dix: allow pixmap dirty helper to be used for non-shared pixmaps
this allows the pixmap dirty helper to be used for reverse optimus, where the GPU wants to copy from the shared pixmap to its VRAM copy. [airlied: slave_dst is wrong name now but pointless ABI churn at this point] Reviewed-by: Keith Packard <keithp@keithp.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
This commit is contained in:
parent
16077b81c5
commit
8fcb9d91b6
|
@ -243,6 +243,8 @@ Bool PixmapSyncDirtyHelper(PixmapDirtyUpdatePtr dirty, RegionPtr dirty_region)
|
||||||
}
|
}
|
||||||
|
|
||||||
dst = dirty->slave_dst->master_pixmap;
|
dst = dirty->slave_dst->master_pixmap;
|
||||||
|
if (!dst)
|
||||||
|
dst = dirty->slave_dst;
|
||||||
|
|
||||||
RegionTranslate(dirty_region, -dirty->x, -dirty->y);
|
RegionTranslate(dirty_region, -dirty->x, -dirty->y);
|
||||||
n = RegionNumRects(dirty_region);
|
n = RegionNumRects(dirty_region);
|
||||||
|
|
|
@ -67,6 +67,7 @@ fbCreatePixmapBpp(ScreenPtr pScreen, int width, int height, int depth, int bpp,
|
||||||
pPixmap->devKind = paddedWidth;
|
pPixmap->devKind = paddedWidth;
|
||||||
pPixmap->refcnt = 1;
|
pPixmap->refcnt = 1;
|
||||||
pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust);
|
pPixmap->devPrivate.ptr = (pointer) ((char *) pPixmap + base + adjust);
|
||||||
|
pPixmap->master_pixmap = NULL;
|
||||||
|
|
||||||
#ifdef FB_DEBUG
|
#ifdef FB_DEBUG
|
||||||
pPixmap->devPrivate.ptr =
|
pPixmap->devPrivate.ptr =
|
||||||
|
|
Loading…
Reference in New Issue
Block a user