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@chris-wilson.co.uk>
This commit is contained in:
parent
0dd2038136
commit
a0bb41d16f
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue