[Glamor] [PATCH 2/3] Use shader to generate the temp trapezoid mask

Chris Wilson chris at chris-wilson.co.uk
Mon Jun 4 00:58:59 PDT 2012


On Mon,  4 Jun 2012 05:08:34 +0800, junyan.he at linux.intel.com wrote:
> From: RobinHe <robinhe at robinhe-desktop.lan>
> 
>  The old manner of trapezoid render uses pixman to
>  generate a mask pixmap and upload it to the GPU.
>  This effect the performance. We now use shader to
>  generate the temp trapezoid mask to avoid the
>  uploading of this pixmap.
>  We implement a anti-alias manner in the shader
>  according to pixman, which will caculate the area
>  inside the trapezoid dividing total area for every
>  pixel and assign it to the alpha value of that pixel.
>  The pixman use a int-to-fix manner to approximate but
>  the shader use float, so the result may have some
>  difference.
>  Because the array in the shader has optimization problem,
>  we need to emit the vertex of every trapezoid every
>  time, which will effect the performance a lot. Need to
>  improve it.

Note that this algorithm doesn't conform to the Precise specification of
trapezoidal rasterisation for render and so should only be used when
PolyMode == Imprecise.
-Chris

-- 
Chris Wilson, Intel Open Source Technology Centre


More information about the Glamor mailing list