[Mesa-dev] [PATCH 0/6] RFC: DRM Image extensions

Chia-I Wu olvaffe at gmail.com
Tue Jun 1 19:14:04 PDT 2010


On Sun, May 30, 2010 at 6:35 AM, Chia-I Wu <olvaffe at gmail.com> wrote:
> But it is less flexible IMHO.  Also, I am not convinced that EGLImageKHR to be
> queryable, which is stemmed from using EGLImageKHR to represent pipe_resource.
> Using an EGLImageKHR also implies that an implementation must implement
> EGLImage in EGL/GLES/VG, where the latter seems to still miss a way to render
> into an EGLImage.  Therefore, my idea is to use pbuffer to represent
> pipe_resource.  This is in line with eglCreatePbufferFromClientBuffer.  To be
> precise,
>
>  * use EGLSurface to represent the pipe_resource
>  * Use attrib_list of eglCreatePbufferSurface to describe the resource
>    template (same tokens as defined by EGL_MESA_image_system_use).  Use
>    EGLConfig to describe the pipe_format.
>  * use eglQuerySuface to query the pipe_resource.  Borrow the tokens from
>    glGetFramebufferAttachmentParameteriv in GL 3.0 to query the exact pixel
>    format
>
> And for EGL_MESA_drm_image substitute,
>
>  * use eglCreatePbufferFromClientBuffer to create a pipe_resource from a
>    winsys_handle.  Describe the winsys_handle using the attrib_list.
>    (Or personally, I prefer to add eglCreatePbufferFromBO)
>  * use eglQuerySurface again to query the pipe_resource.
>
> This allows the DRM BO to be drawn without using FBO (OpenVG!), provides more
> flexibility in describing the pixel format, and remove the dependency on
> EGLImage.  Another extension similar to EGL_KHR_image_pixmap may be added to
> support creation of an EGLImageKHR from a pbuffer.  All color/depth buffer
> issues are resolved as they are in eglCreatePbufferFromClientBuffer or
> EGL_KHR_image_pixmap.
This patch series demonstrates the said functions.  It adds "system pbuffer"
that can be queried for the BO handle.  A system pbuffer can also be created
from a BO handle using eglCreatePbufferFromClientBuffer, and can be used to
create an EGLImageKHR.

The last patch is a modified version of Krisitian's eglkms demo.

 include/EGL/eglext.h                                  |   26 ++++++++++
 src/egl/main/egldisplay.h                             |    3 +
 src/egl/main/eglmisc.c                                |    3 +
 src/egl/main/eglsurface.c                             |   25 ++++++++++
 src/egl/main/eglsurface.h                             |    7 ++
 src/gallium/state_trackers/egl/common/egl_g3d.c       |    7 ++
 src/gallium/state_trackers/egl/common/egl_g3d.h       |    1
 src/gallium/state_trackers/egl/common/egl_g3d_api.c   |   16 ++++++
 src/gallium/state_trackers/egl/common/egl_g3d_image.c |   17 ++++++
 src/gallium/state_trackers/egl/common/egl_g3d_st.c    |   44 ++++++++++++++++--
 10 files changed, 146 insertions(+), 3 deletions(-)

-- 
olv at LunarG.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0001-egl-Add-EGL_MESA_system_pbuffer-and-EGL_MESA_drm_pbu.patch
Type: text/x-diff
Size: 4573 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100602/f925736d/attachment-0003.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-st-egl-Support-EGL_MESA_system_pbuffer-and-EGL_MESA_.patch
Type: text/x-diff
Size: 7576 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100602/f925736d/attachment-0004.patch>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0003-progs-Add-eglkms.patch
Type: text/x-diff
Size: 6013 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100602/f925736d/attachment-0005.patch>


More information about the mesa-dev mailing list