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

Eric Anholt eric at anholt.net
Thu Jun 3 16:56:30 PDT 2010


On Thu, 3 Jun 2010 13:24:08 -0400, Kristian Høgsberg <krh at bitplanet.net> wrote:
> On Thu, Jun 3, 2010 at 1:16 PM, Brian Paul <brianp at vmware.com> wrote:
> > Jakob Bornecrantz wrote:
> >>
> >> Currently these extensions try to address two use cases. Creating
> >> Images to be shared between processes. Creating resources to be used
> >> as a scanout target. Leaving the sharing aside until later. Lets look
> >> at some of the problems associated with that.
> >>
> >> Resources suitable for scanout can be used as a render target and as a
> >> sampling source. So renderbuffer and/or texture is a good
> >> representation of it, it is also how we want to operate on it, but
> >> they are both GL objects. A EGL image however can be both of these
> >> objects and more and is far more flexible then a EGL surface. So lets
> >> use EGL image as the sharing object.
> >>
> >> The problem is that we just can't go from a any texture that happens
> >> to be large enough to a scanout buffer. Most hardware have stricter
> >> limitations on stride, tiling, placement, etc on scanout buffers then
> >> textures/rendertargets or those limitation make certain uses slower or
> >> use more memory compared to normal textures/renderbuffers. So we can't
> >> just go around creating all texture and renderbuffer as suitable for
> >> scanout just because sometime we might use it as a scanout, because it
> >> would be slower and use more memory. Now we don't have a way to say a
> >> texture/renderbuffer should be scanoutable in GL. And creating a EGL
> >> image from a texture/rendertarget and then mutating it into a
> >> scanoutable format is bad, it would effectively orphan the original
> >> resource unless we do major hacking in the driver which I don't want
> >> to do. Enter MESA_create_image and MESA_image_syste_use to solve this
> >> problem. Ok now we have a EGL image that can be used as a scanout and
> >> be shared to all the API's we want to use to render to it.
> >
> >
> > What's the use-case for a scanout buffer that's used as a texture? That
> > seems like an unusual case.
> 
> You could be pageflipping between two scanout EGLImages.  If you're
> only rendering partial updates (using EGL_NOK_swap_region, for
> example) you want to copy the updated region back from the scanout
> buffer to the new backbuffer before rendering the next frame.

Also, implementing an X Server on GL without the scanout buffer being a
texture means either I can't accelerate a lot of operations that should
be fast, like background none composited window initialization, or I
have to keep a shadow texture and periodically update front.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.freedesktop.org/archives/mesa-dev/attachments/20100603/307d912d/attachment.pgp>


More information about the mesa-dev mailing list