[Mesa-dev] [PATCH 2/3] st/egl: Add support for EGL_DRM_BUFFER_USE_CURSOR_MESA

Benjamin Franzke benjaminfranzke at googlemail.com
Fri May 13 04:13:28 PDT 2011


---
 .../state_trackers/egl/common/egl_g3d_image.c      |    5 +++++
 1 files changed, 5 insertions(+), 0 deletions(-)

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 e1c8316..34bb92c 100644
--- a/src/gallium/state_trackers/egl/common/egl_g3d_image.c
+++ b/src/gallium/state_trackers/egl/common/egl_g3d_image.c
@@ -122,6 +122,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);
 }
-- 
1.7.3.4



More information about the mesa-dev mailing list