From 733fa000ce6792cb4f4d50537040441bdd8c6341 Mon Sep 17 00:00:00 2001 From: Benjamin Franzke Date: Fri, 13 May 2011 13:03:13 +0200 Subject: [PATCH] st/egl: Add support for EGL_DRM_BUFFER_USE_CURSOR_MESA --- src/gallium/state_trackers/egl/common/egl_g3d_image.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/gallium/state_trackers/egl/common/egl_g3d_image.c b/src/gallium/state_trackers/egl/common/egl_g3d_image.c index 210b8c2ee82..ce72e27c3d5 100644 --- a/src/gallium/state_trackers/egl/common/egl_g3d_image.c +++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c @@ -97,7 +97,8 @@ egl_g3d_create_drm_buffer(_EGLDisplay *dpy, _EGLImage *img, } valid_use = EGL_DRM_BUFFER_USE_SCANOUT_MESA | - EGL_DRM_BUFFER_USE_SHARE_MESA; + EGL_DRM_BUFFER_USE_SHARE_MESA | + EGL_DRM_BUFFER_USE_CURSOR_MESA; if (attrs.DRMBufferUseMESA & ~valid_use) { _eglLog(_EGL_DEBUG, "bad image use bit 0x%04x", attrs.DRMBufferUseMESA); @@ -122,6 +123,11 @@ egl_g3d_create_drm_buffer(_EGLDisplay *dpy, _EGLImage *img, templ.bind |= PIPE_BIND_SCANOUT; if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_SHARE_MESA) templ.bind |= PIPE_BIND_SHARED; + if (attrs.DRMBufferUseMESA & EGL_DRM_BUFFER_USE_CURSOR_MESA) { + if (attrs.Width != 64 || attrs.Height != 64) + return NULL; + templ.bind |= PIPE_BIND_CURSOR; + } return screen->resource_create(screen, &templ); } -- 2.30.2