diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-01 13:10:32 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2014-07-01 13:15:44 +0100 |
commit | 02715490db13dcd47c5e4bef713f400838d94b99 (patch) | |
tree | 66b84538e169395ef20e585f1168177bdbb754c8 | |
parent | e6e5330857097eb2caafa89d571d12e4bb15f539 (diff) |
sna/dri2: Set depth/bpp on scratch DrawableRec
We need to initialise both depth and bitsPerPixel on the drawable struct
we pass around as they are used for selecting for the format when
copying.
Reported-by: Vedran Rodic <vrodic@gmail.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
-rw-r--r-- | src/sna/sna_dri2.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c index d0b5da5d..b03bf6a9 100644 --- a/src/sna/sna_dri2.c +++ b/src/sna/sna_dri2.c @@ -962,6 +962,8 @@ __sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region, scratch.x = scratch.y = 0; scratch.width = src_priv->size & 0xffff; scratch.height = src_priv->size >> 16; + scratch.depth = draw->depth; + scratch.bitsPerPixel = draw->bitsPerPixel; src_draw = &scratch; DBG(("%s: source size %dx%d, region size %dx%d\n", @@ -1006,6 +1008,8 @@ __sna_dri2_copy_region(struct sna *sna, DrawablePtr draw, RegionPtr region, scratch.x = scratch.y = 0; scratch.width = dst_priv->size & 0xffff; scratch.height = dst_priv->size >> 16; + scratch.depth = draw->depth; + scratch.bitsPerPixel = draw->bitsPerPixel; dst_draw = &scratch; DBG(("%s: target size %dx%d, region size %dx%d\n", |