From: Erik Faye-Lund Date: Mon, 25 Mar 2019 08:47:58 +0000 (+0100) Subject: loader/dri3: do not blit outside old/new buffers X-Git-Tag: upstream/19.3.0~1444 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=0103d4747a39ddc46f51cc3e97f85414765913fb;p=platform%2Fupstream%2Fmesa.git loader/dri3: do not blit outside old/new buffers Reviewed-by: Michel Dänzer Reviewed-by: Eric Anholt --- diff --git a/src/loader/loader_dri3_helper.c b/src/loader/loader_dri3_helper.c index e49b39e..3ce47cd 100644 --- a/src/loader/loader_dri3_helper.c +++ b/src/loader/loader_dri3_helper.c @@ -1841,7 +1841,9 @@ dri3_get_buffer(__DRIdrawable *driDrawable, if (!loader_dri3_blit_image(draw, new_buffer->image, buffer->image, - 0, 0, draw->width, draw->height, + 0, 0, + MIN2(buffer->width, new_buffer->width), + MIN2(buffer->height, new_buffer->height), 0, 0, 0) && !buffer->linear_buffer) { dri3_fence_reset(draw->conn, new_buffer);