Commit cfef64b0 authored by Dave Airlie's avatar Dave Airlie Committed by Kenneth Graunke

glamor: Add an accessor for the GBM device.

(Originally written by Dave Airlie; split into a separate patch by
Kenneth Graunke.)
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
Signed-off-by: Kenneth Graunke's avatarKenneth Graunke <kenneth@whitecape.org>
Tested-by: Jason Ekstrand's avatarJason Ekstrand <jason.ekstrand@intel.com>
Reviewed-by: Keith Packard's avatarKeith Packard <keithp@keithp.com>
parent 98053575
......@@ -172,6 +172,8 @@ extern _X_EXPORT int glamor_egl_dri3_fd_name_from_tex(ScreenPtr, PixmapPtr,
extern void glamor_egl_destroy_pixmap_image(PixmapPtr pixmap);
extern _X_EXPORT void *glamor_egl_get_gbm_device(ScreenPtr screen);
/* @glamor_supports_pixmap_import_export: Returns whether
* glamor_fd_from_pixmap(), glamor_name_from_pixmap(), and
* glamor_pixmap_from_fd() are supported.
......
......@@ -174,6 +174,18 @@ glamor_create_texture_from_image(ScreenPtr screen,
return TRUE;
}
void *
glamor_egl_get_gbm_device(ScreenPtr screen)
{
#ifdef GLAMOR_HAS_GBM
struct glamor_egl_screen_private *glamor_egl =
glamor_egl_get_screen_private(xf86ScreenToScrn(screen));
return glamor_egl->gbm;
#else
return NULL;
#endif
}
unsigned int
glamor_egl_create_argb8888_based_texture(ScreenPtr screen, int w, int h)
{
......
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