Call ValidateGC after ChangeClip in amdgpu_sync_scanout_pixmaps

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

(Ported from radeon commit 14c3f59f5157885ad8f941f0bad6c0c5e3db12f8)
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
Michel Dänzer
2016-11-30 16:27:10 +09:00
committed by Michel Dänzer
parent 0f79c30619
commit aea70298ef

View File

@@ -403,8 +403,8 @@ amdgpu_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);