[Mesa-dev] [v4] EXT_image_dma_buf_import for intel

Topi Pohjolainen topi.pohjolainen at intel.com
Thu May 2 00:08:17 PDT 2013


The set introduces new target for 'eglCreateImageKHR()' allowing one
to create EGL images out of externally allocated buffers. Especially
one can combine up to three separate buffers into one single logical
entity. Low level native buffers may not support planar formats and
hence EGL layer will instead combine native buffers each representing
a single plane into one planar image.

Until now an image in intel dri backend consisted of a single region.
Here this is extended to accomodate YUV formats having each component
in its own plane, but intended only for images that are to be bound
as textures later on.

v2:
   - added support for treating buffers having packed format
     separately from the planar (that require special care)
       intel: allow packed prime buffers to be treated normally

   - tried to address all Eric's comments:  
       intel: refactor planar format lookup
       intel: prepare for dri images having more than plane

   - added missing check for explicit "no context"
       egl: definitions for EXT_image_dma_buf_import

v3-4:
   - close the file descriptors as the ownership is transferred
     to EGL
   - declare the extension as EGL (not GLES)
   - import EGL definitions from khronos
   - no not break DRI image ABI, but introduce new entry and update
     the version of the interface

Topi Pohjolainen (10):
  intel: allow packed prime buffers to be treated normally
  intel: do not create renderbuffers out of planar images
  intel: replace single region with a vector of regions
  intel: refactor planar format lookup
  intel: set dri image dimensions even when creating out of primes
  intel: prepare for dri images having more than one plane
  dri: propagate extra dma_buf import attributes to the drivers
  egl: update eglext.h from khronos
  egl: definitions for EXT_image_dma_buf_import
  egl: dri2: support for creating images out of dma buffers

 include/EGL/eglext.h                         |  45 ++++-
 include/GL/internal/dri_interface.h          |  36 +++-
 src/egl/drivers/dri2/egl_dri2.c              | 280 +++++++++++++++++++++++++++
 src/egl/main/eglapi.c                        |   7 +-
 src/egl/main/egldisplay.h                    |   1 +
 src/egl/main/eglimage.c                      |  76 ++++++++
 src/egl/main/eglimage.h                      |  15 ++
 src/egl/main/eglmisc.c                       |   1 +
 src/mesa/drivers/dri/intel/intel_fbo.c       |  10 +-
 src/mesa/drivers/dri/intel/intel_regions.h   |  14 +-
 src/mesa/drivers/dri/intel/intel_screen.c    | 212 +++++++++++++-------
 src/mesa/drivers/dri/intel/intel_tex_image.c |   2 +-
 12 files changed, 623 insertions(+), 76 deletions(-)

-- 
1.8.1.2



More information about the mesa-dev mailing list