summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Hourihane <alanh@tungstengraphics.com>2008-06-26 22:47:20 +0100
committerAlan Hourihane <alanh@tungstengraphics.com>2008-06-26 22:47:20 +0100
commit4c0a438f937bf8e473e8e2c120d9702cdf39ddb8 (patch)
tree0fed2d54df09442472fef2dc2d3a3b3d4be55359
parentacb7da8c7979659bcfdfef7a6ee5b402f6fb366b (diff)
Fix copy surface
-rw-r--r--src/exa.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/src/exa.c b/src/exa.c
index 124dc03..cab6870 100644
--- a/src/exa.c
+++ b/src/exa.c
@@ -504,6 +504,7 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
struct exa_entity *exa = ms->exa;
struct pipe_surface *src_surf;
struct PixmapPriv *priv = exaGetPixmapDriverPrivate(pDstPixmap);
+ struct PixmapPriv *src_priv = exaGetPixmapDriverPrivate(pSrcPixmap);
if (alu != GXcopy)
return FALSE;
@@ -514,14 +515,14 @@ ExaPrepareCopy(PixmapPtr pSrcPixmap, PixmapPtr pDstPixmap, int xdir,
if (!EXA_PM_IS_SOLID(&pSrcPixmap->drawable, planeMask))
return FALSE;
- if (!priv->tex)
+ if (!priv->tex || !src_priv->tex)
return FALSE;
if (!exa->ctx || !exa->ctx->surface_copy)
return FALSE;
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_WRITE);
@@ -691,7 +692,7 @@ ExaModifyPixmapHeader(PixmapPtr pPixmap, int width, int height,
PixmapPtr rootPixmap = pScreen->GetScreenPixmap(pScreen);
struct exa_entity *exa = ms->exa;
- /*if (rootPixmap == pPixmap) */ {
+ if (rootPixmap == pPixmap) {
miModifyPixmapHeader(pPixmap, width, height, depth,
bitsPerPixel, devKind, NULL);
}