[Intel-gfx] [PATCH 4/4] uxa/glamor: Create glamor pixmap by default.

Zhigang Gong zhigang.gong at linux.intel.com
Thu Dec 29 09:44:08 CET 2011


> -----Original Message-----
> From: Chris Wilson [mailto:chris at chris-wilson.co.uk]
> Sent: Wednesday, December 28, 2011 10:27 PM
> To: zhigang.gong at linux.intel.com
> Cc: intel-gfx at lists.freedesktop.org; zhigang.gong at gmail.com;
> zhigang.gong at linux.intel.com
> Subject: Re: [PATCH 4/4] uxa/glamor: Create glamor pixmap by default.
> 
> On Tue, 27 Dec 2011 17:09:18 +0800, zhigang.gong at linux.intel.com
> wrote:
> > From: Zhigang Gong <zhigang.gong at linux.intel.com>
> >
> > As a pure glamor pixmap has a local texture rather than bind a pixmap
> > to a external BO. This can avoid some unecessary flush, and can
> > achieve better performance.
> > The testing on my machine shows that aa10text/rgb10text get about
> > 20-30% performance improvement.
> 
> How do we get the name back for a pixmap created by glamor and then
> attached to a DRI2Drawable? And then once that name is exposed, how do
> you prevent GL from recreating the bo attached to the pixmap?

You are right, this patch will break the DRI2 usage.
And currently, one solution come to my mind:

At I830DRI2Create buffer, After we get a non-null pixmap at get_front_buffer

we check whether The pixmap has a valid bo, if it doesn't, we will think
this is
a pure glamor pixmap (maybe we can check more fields, such as zero
devPrivate.ptr)
Then we will create new a valid DRI2 pixmap, then we call fixup_glamor to
unbind
the bo from the new DRI2 pixmap and then bind it to the old pure glamor
pixmap
and call intel_create_textured_pixmap to create a coherent glamor-drm 
pixmap, the old pixmap's pointer will not change, only the type will be
changed
to a glamor-drm and has a valid bo attached to it.

Does this way work? And will it bring too much overhead.

Base on my current testing, change to use pure glamor pixmap for non-dri2 
pixmap really get much better performance then use coherent glamor-drm 
pixmap.

Any comments?

> -Chris
> 
> --
> Chris Wilson, Intel Open Source Technology Centre




More information about the Intel-gfx mailing list