diff options
author | Michel Dänzer <michel.daenzer@amd.com> | 2015-08-07 12:39:24 +0900 |
---|---|---|
committer | Michel Dänzer <michel@daenzer.net> | 2015-08-11 12:33:09 +0900 |
commit | 4c425e9c5c038504a0f0498dd800ab1fb40bf0c5 (patch) | |
tree | 7e124e7787540454f212758ae973e3a72ab00f9b | |
parent | bb989e173dc364a7d68e50d7e819d0e0ee133d2f (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>
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | src/amdgpu_glamor.c | 12 | ||||
-rw-r--r-- | src/amdgpu_glamor.h | 1 |
3 files changed, 15 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 85892fa..e350ef6 100644 --- a/configure.ac +++ b/configure.ac @@ -135,6 +135,8 @@ if test "x$GLAMOR" != "xno"; then #include "glamor.h"]) fi + PKG_CHECK_MODULES(LIBGL, [gl]) + if test "x$GLAMOR_XSERVER" != xyes; then PKG_CHECK_MODULES(LIBGLAMOR, [glamor >= 0.6.0]) PKG_CHECK_MODULES(LIBGLAMOR_EGL, [glamor-egl]) 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); diff --git a/src/amdgpu_glamor.h b/src/amdgpu_glamor.h index a781695..de63005 100644 --- a/src/amdgpu_glamor.h +++ b/src/amdgpu_glamor.h @@ -65,6 +65,7 @@ Bool amdgpu_glamor_create_screen_resources(ScreenPtr screen); void amdgpu_glamor_free_screen(int scrnIndex, int flags); void amdgpu_glamor_flush(ScrnInfoPtr pScrn); +void amdgpu_glamor_finish(ScrnInfoPtr pScrn); Bool amdgpu_glamor_create_textured_pixmap(PixmapPtr pixmap, struct amdgpu_pixmap *priv); |