Commit 4c425e9c authored by Michel Dänzer's avatar Michel Dänzer Committed by Michel Dänzer
Browse files

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: default avatarAlex Deucher <alexander.deucher@amd.com>
parent bb989e17
......@@ -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])
......
......@@ -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);
......
......@@ -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);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment