xf86-video-intel: src/sna/sna_video.c src/sna/sna_video.h

Chris Wilson ickle at kemper.freedesktop.org
Sun Sep 29 05:34:18 PDT 2013


 src/sna/sna_video.c |    4 +++-
 src/sna/sna_video.h |    2 +-
 2 files changed, 4 insertions(+), 2 deletions(-)

New commits:
commit a0bb41d16f75901bc18b7024679e2b3a35fc14f6
Author: Chris Wilson <chris at chris-wilson.co.uk>
Date:   Sun Sep 29 13:33:26 2013 +0100

    sna/video: The sprite framebuffer also encodes its format
    
    So we need to check whether the cached framebuffer matches the requested
    format, or else recreate.
    
    Signed-off-by: Chris Wilson <chris at chris-wilson.co.uk>

diff --git a/src/sna/sna_video.c b/src/sna/sna_video.c
index 61f6615..132ca28 100644
--- a/src/sna/sna_video.c
+++ b/src/sna/sna_video.c
@@ -98,7 +98,8 @@ sna_video_buffer(struct sna_video *video,
 
 	if (video->buf && video->buf->scanout) {
 		if (frame->width != video->width ||
-		    frame->height != video->height)
+		    frame->height != video->height ||
+		    frame->id != video->format)
 			sna_video_free_buffers(video);
 	}
 
@@ -115,6 +116,7 @@ sna_video_buffer(struct sna_video *video,
 
 	video->width  = frame->width;
 	video->height = frame->height;
+	video->format = frame->id;
 
 	return video->buf;
 }
diff --git a/src/sna/sna_video.h b/src/sna/sna_video.h
index 996377b..f906e95 100644
--- a/src/sna/sna_video.h
+++ b/src/sna/sna_video.h
@@ -92,7 +92,7 @@ struct sna_video {
 	/** YUV data buffers */
 	struct kgem_bo *old_buf[2];
 	struct kgem_bo *buf;
-	int width, height;
+	int width, height, format;
 
 	int alignment;
 	bool tiled;


More information about the xorg-commit mailing list