diff options
author | Dave Airlie <airlied@redhat.com> | 2016-03-11 09:22:00 +1000 |
---|---|---|
committer | Adam Jackson <ajax@redhat.com> | 2016-07-06 13:21:27 -0400 |
commit | 0f947779c7afcdaf246849b627c13a11987a4bbf (patch) | |
tree | 4d4b5d8de867cef0b723de12d045127c6b91a4ce | |
parent | d25bb3ae9de1661ed0988a44119abeb52d52d4b7 (diff) |
glamor: add glamor_finish API
Some drivers are calling glFinish, they really should be doing this.
This also is needed for some reverse prime scenarios.
Signed-off-by: Dave Airlie <airlied@redhat.com>
Reviewed-by: Michel Dänzer <michel.daenzer@amd.com>
Reviewed-by: Eric Anholt <eric@anholt.net>
(cherry picked from commit aa4e757130010dd3202f10ec6cb0c306c1dbcfbc)
-rw-r--r-- | glamor/glamor.c | 9 | ||||
-rw-r--r-- | glamor/glamor.h | 1 |
2 files changed, 10 insertions, 0 deletions
diff --git a/glamor/glamor.c b/glamor/glamor.c index 9c6a0d1cc..65818990e 100644 --- a/glamor/glamor.c +++ b/glamor/glamor.c @@ -816,3 +816,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 0aa6d5604..250dc83e4 100644 --- a/glamor/glamor.h +++ b/glamor/glamor.h @@ -342,6 +342,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 |