summaryrefslogtreecommitdiff
path: root/src/amdgpu_glamor.c
diff options
context:
space:
mode:
authorMichel Dänzer <michel.daenzer@amd.com>2015-08-07 12:39:24 +0900
committerMichel Dänzer <michel@daenzer.net>2015-08-11 12:33:09 +0900
commit4c425e9c5c038504a0f0498dd800ab1fb40bf0c5 (patch)
tree7e124e7787540454f212758ae973e3a72ab00f9b /src/amdgpu_glamor.c
parentbb989e173dc364a7d68e50d7e819d0e0ee133d2f (diff)
glamor: Add amdgpu_glamor_finish to wait for glamor rendering to finish
This is a bit sneaky, because it calls glFinish directly from the driver, but it seems to work fine. Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'src/amdgpu_glamor.c')
-rw-r--r--src/amdgpu_glamor.c12
1 files changed, 12 insertions, 0 deletions
diff --git a/src/amdgpu_glamor.c b/src/amdgpu_glamor.c
index f74aa28..8f0dc79 100644
--- a/src/amdgpu_glamor.c
+++ b/src/amdgpu_glamor.c
@@ -36,6 +36,8 @@
#include <gbm.h>
+#include <GL/gl.h>
+
#if HAS_DEVPRIVATEKEYREC
DevPrivateKeyRec amdgpu_pixmap_index;
#else
@@ -371,6 +373,16 @@ void amdgpu_glamor_flush(ScrnInfoPtr pScrn)
}
}
+void amdgpu_glamor_finish(ScrnInfoPtr pScrn)
+{
+ AMDGPUInfoPtr info = AMDGPUPTR(pScrn);
+
+ if (info->use_glamor) {
+ amdgpu_glamor_flush(pScrn);
+ glFinish();
+ }
+}
+
XF86VideoAdaptorPtr amdgpu_glamor_xv_init(ScreenPtr pScreen, int num_adapt)
{
return glamor_xv_init(pScreen, num_adapt);