Re: [Mesa-dev] __DRIimage sub-image v2 series

2012-07-11 Thread Ander Conselvan de Oliveira

On 07/10/2012 12:03 AM, Kristian Høgsberg wrote:

Here's the patch series with Erics suggestion and comments incorporated,
and I've also added support for the packed YUYV format in this version.

The changes since last series boils down to:

  - Use __DRI_IMAGE_FORMAT_NONE when we create a __DRIimage we don't 
intend
to texture from, and don't expose YUV __DRIimage formats.


That breaks gbm_bo_get_format() that relies on the format returned by 
queryImage(). Since the overlay code in Weston creates an EGLImage from 
a wl_buffer and then creates a gbm_bo from that, I wonder how one would 
be able to overlay an YUV surface.


Cheers,
Ander
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


Re: [Mesa-dev] __DRIimage sub-image v2 series

2012-07-11 Thread Kristian Høgsberg
On Wed, Jul 11, 2012 at 10:44 AM, Ander Conselvan de Oliveira
conselv...@gmail.com wrote:
 On 07/10/2012 12:03 AM, Kristian Høgsberg wrote:

 Here's the patch series with Erics suggestion and comments incorporated,
 and I've also added support for the packed YUYV format in this version.

 The changes since last series boils down to:

   - Use __DRI_IMAGE_FORMAT_NONE when we create a __DRIimage we
 don't intend
 to texture from, and don't expose YUV __DRIimage formats.


 That breaks gbm_bo_get_format() that relies on the format returned by
 queryImage(). Since the overlay code in Weston creates an EGLImage from a
 wl_buffer and then creates a gbm_bo from that, I wonder how one would be
 able to overlay an YUV surface.

It won't work, but I wouldn't say it's breaking anything, since gbm
never supported YUV surfaces.  For planar YUV buffers, creating the
gbm_bo from an EGLImage won't work, since there are now several
EGLImages per wl_buffer.  Instead I've used the attached patch to
create a gbm_bo directly from a wl_buffer.  I've tested it in weston
with YUYV buffers (which is what SNB supports and isn't a planar
format).  For planar formats we'll need to also add API to gbm to get
offsets and stride of the planes in the gbm_bo, so we can feed
drmModeAddFB2 those.

Kristian


gbm-import.patch
Description: Binary data
___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev


[Mesa-dev] __DRIimage sub-image v2 series

2012-07-09 Thread Kristian Høgsberg
Here's the patch series with Erics suggestion and comments incorporated,
and I've also added support for the packed YUYV format in this version.

The changes since last series boils down to:

 - Use  __DRI_IMAGE_FORMAT_NONE when we create a __DRIimage we don't intend
   to texture from, and don't expose YUV __DRIimage formats.

 - The RG88 format is really GR88, since the __DRIimage formats are native
   endian.

 - Document lifetime rules for sub-images.

 - Document that rendering to overlapping sub-images is undefined
   (for both __DRIimages and for EGLImages created this way using the
   wayland EGL extension).

 - Validate that a sub-image is contained in the buffer object.

 - Remember to set image-screen from parent image screen when creating
   sub-image.

Kristian

___
mesa-dev mailing list
mesa-dev@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/mesa-dev