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

Chia-I Wu olvaffe at gmail.com
Thu Jun 3 20:34:27 PDT 2010


2010/6/4 Jakob Bornecrantz <wallbraker at gmail.com>:
>> And also because the use case for it was solved in another way. But in
>> defence of my create_image extension, its quite small and limited in
>> scope. But in Chia-I fav the fact that we lack configs to say which
>> formats we support is a bit sad. But I can also see how this thing can
>> feature creep.
> "But in Chia-I favor for his argument for using EGLSurfaces is the
> fact that we lack configs to say which formats we support, which is a
> bit sad."
> At least thats better, sorry :(
I also said

"I am not convinced that EGLImageKHR to be queryable, which is stemmed from
using EGLImageKHR to represent pipe_resource."

In eglCreateImage, an existing resource is used to create an EGLImage.  The
existing resource is called the EGLImage source.  This is different from DRM
buffer based EGLImage which may be source-less.  How to we present a
source-less EGLImage, I think this is the core of the argument.

In EGL's way, there should be no source-less EGLImage.  A library (libkms?)
should be used to create/manipulate DRM buffers.  It is those buffers that are
used to create EGLImages.  The attributes of those buffers are queryed using
the library instead of EGL.

While this avoids introducing the new source-less EGLImage concept, I am not
sure about the status of libkms.  But it is probably too low level to care
about SHARABLE or SCANOUT flags?  An alternative is to introduce EGLDRMBuffer,
and use it to create an EGLImage.  But I would rather use pbuffer as the
source, which does not force the use of FBO.

So for now, suppose we do need a source-less EGLImage.  We need to create an
EGLImage from nowhere, _while_ be able to describe the "nowhere".  I do not
like eglGetImageAttrib because it is a special purpose function that has a
generic name.  It also defeats the fact that an EGLImage is completely opaque.

Using eglCreateDRMImage is more explicit to me.  It gives a special function a
special name.  It also allows us to define arbitrary attributes without
worrying about others that use eglCreateImage.

-- 
olv at LunarG.com


More information about the mesa-dev mailing list