diff options
-rw-r--r-- | src/sna/kgem.c | 6 | ||||
-rw-r--r-- | src/sna/sna_render.c | 2 |
2 files changed, 7 insertions, 1 deletions
diff --git a/src/sna/kgem.c b/src/sna/kgem.c index 1d7b8e92..fff2d19b 100644 --- a/src/sna/kgem.c +++ b/src/sna/kgem.c @@ -3490,6 +3490,12 @@ struct kgem_bo *kgem_upload_source_image(struct kgem *kgem, DBG(("%s : (%d, %d), (%d, %d), stride=%d, bpp=%d\n", __FUNCTION__, box->x1, box->y1, box->x2, box->y2, stride, bpp)); + assert(data); + assert(width > 0); + assert(height > 0); + assert(stride); + assert(bpp); + bo = kgem_create_buffer_2d(kgem, width, height, bpp, KGEM_BUFFER_WRITE_INPLACE, &dst); diff --git a/src/sna/sna_render.c b/src/sna/sna_render.c index cbaaafd5..9a98990a 100644 --- a/src/sna/sna_render.c +++ b/src/sna/sna_render.c @@ -1044,7 +1044,7 @@ sna_render_picture_extract(struct sna *sna, return 0; } else { bool upload = true; - if (!texture_is_cpu(pixmap, &box) && + if (!texture_is_cpu(pixmap, &box) || move_to_gpu(pixmap, &box)) { struct sna_pixmap *priv; |