[PATCH xf86-video-ati 3/4] Call ValidateGC after ChangeClip in radeon_sync_scanout_pixmaps

Michel Dänzer michel at daenzer.net
Tue Nov 29 09:36:07 UTC 2016


From: Michel Dänzer <michel.daenzer at amd.com>

The wrong order meant that the clipping region wasn't actually applied,
so it always copied the full contents from the other scanout pixmap.

Signed-off-by: Michel Dänzer <michel.daenzer at amd.com>
---
 src/radeon_kms.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/radeon_kms.c b/src/radeon_kms.c
index 8bb261e..5764c20 100644
--- a/src/radeon_kms.c
+++ b/src/radeon_kms.c
@@ -495,8 +495,8 @@ radeon_sync_scanout_pixmaps(xf86CrtcPtr xf86_crtc, RegionPtr new_region,
 
     gc = GetScratchGC(dst->depth, pScreen);
     if (gc) {
-	ValidateGC(dst, gc);
 	gc->funcs->ChangeClip(gc, CT_REGION, sync_region, 0);
+	ValidateGC(dst, gc);
 	sync_region = NULL;
 	gc->ops->CopyArea(src, dst, gc, 0, 0, dst->width, dst->height, 0, 0);
 	FreeScratchGC(gc);
-- 
2.10.2



More information about the amd-gfx mailing list