Fix copy surface
This commit is contained in:
parent
ccd0c76472
commit
621fa337fb
|
@ -504,6 +504,7 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
|
||||||
struct exa_entity *exa = ms->exa;
|
struct exa_entity *exa = ms->exa;
|
||||||
struct pipe_surface *src_surf;
|
struct pipe_surface *src_surf;
|
||||||
struct PixmapPriv *priv = exaGetPixmapDriverPrivate(pDstPixmap);
|
struct PixmapPriv *priv = exaGetPixmapDriverPrivate(pDstPixmap);
|
||||||
|
struct PixmapPriv *src_priv = exaGetPixmapDriverPrivate(pSrcPixmap);
|
||||||
|
|
||||||
if (alu != GXcopy)
|
if (alu != GXcopy)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
@ -514,14 +515,14 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
|
||||||
if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planeMask))
|
if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planeMask))
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!priv->tex)
|
if (!priv->tex || !src_priv->tex)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
if (!exa->ctx || !exa->ctx->surface_copy)
|
if (!exa->ctx || !exa->ctx->surface_copy)
|
||||||
return FALSE;
|
return FALSE;
|
||||||
|
|
||||||
priv->src_surf =
|
priv->src_surf =
|
||||||
exa->scrn->get_tex_surface(exa->scrn, priv->tex, 0, 0, 0,
|
exa->scrn->get_tex_surface(exa->scrn, src_priv->tex, 0, 0, 0,
|
||||||
PIPE_BUFFER_USAGE_GPU_READ |
|
PIPE_BUFFER_USAGE_GPU_READ |
|
||||||
PIPE_BUFFER_USAGE_GPU_WRITE);
|
PIPE_BUFFER_USAGE_GPU_WRITE);
|
||||||
|
|
||||||
|
@ -691,7 +692,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
|
||||||
PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
|
PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
|
||||||
struct exa_entity *exa = ms->exa;
|
struct exa_entity *exa = ms->exa;
|
||||||
|
|
||||||
/*if (rootPixmap == pPixmap) */ {
|
if (rootPixmap == pPixmap) {
|
||||||
miModifyPixmapHeader(pPixmap, width, height, depth,
|
miModifyPixmapHeader(pPixmap, width, height, depth,
|
||||||
bitsPerPixel, devKind, NULL);
|
bitsPerPixel, devKind, NULL);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue