[Glamor] Trapezoid performance regression with the shader enabled.

He Junyan junyan.he at linux.intel.com
Mon Aug 6 22:21:58 PDT 2012


于 2012/8/6 23:36, Michel Dänzer 写道:
> On Mon, 2012-08-06 at 14:10 +0800, He Junyan wrote:
>>
>> The trapezoid generating speed of the shader is relatively slow when the
>> trapezoid area is big. We need to fallback to pixman
>> when the trapezoid's width and height is bigger than 300 pixels to avoid
>> the regression of the benchmark you referred.
>
> How did you determine the threshold of 300 pixels? It'll probably vary
> depending on the relative performance of the CPU and GPU, right?
>
Yeah, by now, we just tune it on Intel's IVBridge and SandyBridge platform.
I have updated the caculate manner and sent a new patch. You can give a
feedback on other platform.

>
>> I think the shader’s advantage is that it can calculate multi-pixels
>> concurrently and avoid uploading.
>> Pixman’s manner is based on scan line, the edge of the trapezoid need to
>> consider anti-alias and pixman’s rasterization need to do
>> some jobs here, but inside the trapezoid, it use memset to assign value
>> very effectively.
>
> Might it be possible to optimize the shader based rendering similarly
> for pixels inside the trapezoid?
>
Yes, it may be, and we are thinking about the manners. One way is to 
seperate the
big trapezoid into several areas, and the areas that do not contain a 
edge should
be big enough and we can write a very simple shader to render these 
areas and improve
the speed. We need to estimate the benefit and the effect of these manner.
We really want to use GPU to do more jobs and decrease the CPU's 
overload. But at
this stage, we need to balance the performance and the CPU overload.



More information about the Glamor mailing list