mirror of
https://github.com/brl/mutter.git
synced 2024-12-27 13:22:15 +00:00
kms: Check for EGL_KHR_surfaceless_opengl extension
This adds a check for the EGL_KHR_surfaceless_opengl extension which we depend on for being able to MakeCurrent (NO_SURFACE) as well as create a context without and EGLConfig. Reviewed-by: Rob Bradford <rob@linux.intel.com>
This commit is contained in:
parent
7a91c91994
commit
aa6433d8c5
@ -88,3 +88,8 @@ COGL_WINSYS_FEATURE_FUNCTION (EGLBoolean, eglUnbindWaylandDisplay,
|
||||
struct wl_display *wayland_display))
|
||||
COGL_WINSYS_FEATURE_END ()
|
||||
#endif
|
||||
COGL_WINSYS_FEATURE_BEGIN (surfaceless_opengl,
|
||||
"KHR\0",
|
||||
"surfaceless_opengl\0",
|
||||
COGL_EGL_WINSYS_FEATURE_SURFACELESS_OPENGL)
|
||||
COGL_WINSYS_FEATURE_END ()
|
||||
|
@ -33,7 +33,8 @@ typedef enum _CoglEGLWinsysFeature
|
||||
{
|
||||
COGL_EGL_WINSYS_FEATURE_SWAP_REGION =1L<<0,
|
||||
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_X11_PIXMAP =1L<<1,
|
||||
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_WAYLAND_BUFFER =1L<<2
|
||||
COGL_EGL_WINSYS_FEATURE_EGL_IMAGE_FROM_WAYLAND_BUFFER =1L<<2,
|
||||
COGL_EGL_WINSYS_FEATURE_SURFACELESS_OPENGL =1L<<3
|
||||
} CoglEGLWinsysFeature;
|
||||
|
||||
typedef struct _CoglRendererEGL
|
||||
|
@ -120,6 +120,15 @@ _cogl_winsys_kms_display_setup (CoglDisplay *display, GError **error)
|
||||
drmModeEncoder *encoder;
|
||||
int i;
|
||||
|
||||
if (!(egl_renderer->private_features &
|
||||
COGL_EGL_WINSYS_FEATURE_SURFACELESS_OPENGL))
|
||||
{
|
||||
g_set_error (error, COGL_WINSYS_ERROR,
|
||||
COGL_WINSYS_ERROR_INIT,
|
||||
"EGL_KHR_surfaceless_opengl extension not available");
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
resources = drmModeGetResources (kms_renderer->fd);
|
||||
if (!resources)
|
||||
{
|
||||
|
Loading…
Reference in New Issue
Block a user