diff options
author | Benjamin Franzke <[email protected]> | 2011-05-13 13:03:13 +0200 |
---|---|---|
committer | Benjamin Franzke <[email protected]> | 2011-05-20 19:10:22 +0200 |
commit | 733fa000ce6792cb4f4d50537040441bdd8c6341 (patch) | |
tree | 4a7f2af5f46365ec56f355de0a494a837ce5e5f6 /src/gallium/state_trackers/egl | |
parent | ea90eca44b790119f0d1fbe45cac120a374cb0ca (diff) |
st/egl: Add support for EGL_DRM_BUFFER_USE_CURSOR_MESA
Diffstat (limited to 'src/gallium/state_trackers/egl')
-rw-r--r-- | src/gallium/state_trackers/egl/common/egl_g3d_image.c | 8 |
1 files changed, 7 insertions, 1 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 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); } |