Re: [PATCH 3/3] glamor: Route fillspans and polyfillrects to glamor.

Zhigang Gong
2011-11-11T10:49:02Z

> -----Original Message-----
> From: Chris Wilson [mailto:chris@chris-wilson.co.uk]
> Sent: Friday, November 11, 2011 5:08 PM
> To: Zhigang Gong; intel-gfx@lists.freedesktop.org
> Subject: Re: [Intel-gfx] [PATCH 3/3] glamor: Route fillspans and
polyfillrects
> to glamor.
>
> On Fri, 11 Nov 2011 16:31:21 +0800, Zhigang Gong
> <zhigang.gong@linux.intel.com> wrote:
> > If GLAMOR is enabled, we route UXA's fillspans and polyfillrects to
> > glamor by default. And if glamor fail to accelerate it, UXA continue
> > to handle it.
>
> How is serialisation handled between the UXA and glamor acceleration
> routines? Don't you need to flush the UXA batch (if the pixmap is active)
> before handing over to glamor and similarly flush the glamor pixmap after
> failure?
Thanks for pointing this issue out. This is something I want to be discussed
here.

There are three types of access to the pixmap:
1. UXA batch command buffer.
2. Glamor through OpenGL
3. CPU access mapped BO buffer.

My understanding is that the leading two types has the queue mechanism and
need
to be handled carefully. In general, we can treat glamor 's access as
another batch
buffer. Then in the place where current intel driver need to flush UXA batch
buffer,
we also need to flush the GL operations there. Right?

And besides above places we need to flush glamor, we also need to flush UXA
batch
buffer before call into glamor and also need to flush glamor after the
glamor rendering
function really touch the pixmap.

Any comments?

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