summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2014-04-25 09:17:51 +0900
committerMichel Dänzer <michel@daenzer.net>2014-04-25 09:17:51 +0900
commitc84230d686c078aac1dc98d82153f8b02521b2e1 (patch)
tree9a20f2d4834d8dc57a123c7283074c72805a633c
parent48d3dbc8a0d3bfde88f46e402e530438f9317715 (diff)
dri2: Handle PRIME for source buffer as well in radeon_dri2_copy_region2
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=77810 Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
-rw-r--r--src/radeon_dri2.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/radeon_dri2.c b/src/radeon_dri2.c
index d47b0350..9a9918b0 100644
--- a/src/radeon_dri2.c
+++ b/src/radeon_dri2.c
@@ -409,7 +409,14 @@ radeon_dri2_copy_region2(ScreenPtr pScreen,
dst_drawable = &dst_private->pixmap->drawable;
if (src_private->attachment == DRI2BufferFrontLeft) {
- src_drawable = drawable;
+#ifdef USE_DRI2_PRIME
+ if (drawable->pScreen != pScreen) {
+ src_drawable = DRI2UpdatePrime(drawable, src_buffer);
+ if (!src_drawable)
+ return;
+ } else
+#endif
+ src_drawable = drawable;
}
if (dst_private->attachment == DRI2BufferFrontLeft) {
#ifdef USE_DRI2_PRIME