summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDave Airlie <airlied@redhat.com>2016-03-11 09:20:56 +1000
committerDave Airlie <airlied@redhat.com>2016-04-29 13:55:42 +1000
commitd2f017020eaf8d6212123c79e776a9e892fa7e66 (patch)
treecfc4707020935abcbf75380e22d8815fc03fba7a
parentf48b0534f110397246809d279225afedb28aa233 (diff)
glamor: add glamor_finish APIglamor-finish-api
Some drivers are calling glFinish, they really should be doing this. This also is needed for some reverse prime scenarios. Reviewed-by: Eric Anholt <eric@anholt.net> Reviewed-by: Michel Dänzer <michel.daenzer@amd.com> Signed-off-by: Dave Airlie <airlied@redhat.com>
-rw-r--r--glamor/glamor.c9
-rw-r--r--glamor/glamor.h1
2 files changed, 10 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c
index efe5953d7..477bc0e60 100644
--- a/glamor/glamor.c
+++ b/glamor/glamor.c
@@ -813,3 +813,12 @@ glamor_name_from_pixmap(PixmapPtr pixmap, CARD16 *stride, CARD32 *size)
}
return -1;
}
+
+void
+glamor_finish(ScreenPtr screen)
+{
+ glamor_screen_private *glamor_priv = glamor_get_screen_private(screen);
+
+ glamor_make_current(glamor_priv);
+ glFinish();
+}
diff --git a/glamor/glamor.h b/glamor/glamor.h
index a73e9eff0..e27033a84 100644
--- a/glamor/glamor.h
+++ b/glamor/glamor.h
@@ -336,6 +336,7 @@ extern _X_EXPORT void glamor_destroy_gc(GCPtr gc);
extern Bool _X_EXPORT glamor_change_window_attributes(WindowPtr pWin, unsigned long mask);
extern void _X_EXPORT glamor_copy_window(WindowPtr window, DDXPointRec old_origin, RegionPtr src_region);
+extern _X_EXPORT void glamor_finish(ScreenPtr screen);
#define HAS_GLAMOR_TEXT 1
#ifdef GLAMOR_FOR_XORG