[Mesa-dev] __DRIimage sub-image v2 series

Kristian Høgsberg krh at bitplanet.net
Wed Jul 11 10:03:02 PDT 2012


On Wed, Jul 11, 2012 at 10:44 AM, Ander Conselvan de Oliveira
<conselvan2 at 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
-------------- next part --------------
A non-text attachment was scrubbed...
Name: gbm-import.patch
Type: application/octet-stream
Size: 4899 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20120711/d848fcf7/attachment.obj>


More information about the mesa-dev mailing list