summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2017-03-07 18:02:29 +0900
committerMichel Dänzer <michel@daenzer.net>2017-03-07 18:02:29 +0900
commitfa85331f0ce27e16a9338516518433955133840e (patch)
tree08028d0967e2fdf9be28344154427175e38f878b /src
parent7884e38e94c2cbd6c205f556f2b31ad59b4089b4 (diff)
glamor: Use glamor_finish when available
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src')
-rw-r--r--src/amdgpu_glamor.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index d29b096..1c5dfc2 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -36,7 +36,9 @@
#include <gbm.h>
+#ifndef HAVE_GLAMOR_FINISH
#include <GL/gl.h>
+#endif
DevPrivateKeyRec amdgpu_pixmap_index;
@@ -470,8 +472,13 @@ void amdgpu_glamor_finish(ScrnInfoPtr pScrn)
AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
if (info->use_glamor) {
+#if HAVE_GLAMOR_FINISH
+ glamor_finish(pScrn->pScreen);
+ info->gpu_flushed++;
+#else
amdgpu_glamor_flush(pScrn);
glFinish();
+#endif
}
}