xf86-video-intel: src/sna/sna_dri2.c

Chris Wilson ickle at kemper.freedesktop.org
Tue Jul 1 05:16:41 PDT 2014


 src/sna/sna_dri2.c |    4 ++++
 1 file changed, 4 insertions(+)

New commits:
commit 02715490db13dcd47c5e4bef713f400838d94b99
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Tue Jul 1 13:10:32 2014 +0100

    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 at gmail.com>
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_dri2.c b/src/sna/sna_dri2.c
index d0b5da5..b03bf6a 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",


More information about the xorg-commit mailing list