[Mesa-dev] [PATCH] r600g: rework check_and_set_bank_swizzle

Vadim Girlin vadimgirlin at gmail.com
Mon Dec 31 13:55:30 PST 2012


On 12/31/2012 05:34 AM, Vadim Girlin wrote:
> Optimize it for better performance.
>
> Signed-off-by: Vadim Girlin <vadimgirlin at gmail.com>
> ---
>
> I did some benchmarking for this patch together with the patch that introduces
> ISA tables, using the texCombine test (IIRC it builds hundreds of shaders) and
> making the driver build each shader 5000 times, total time of the test was
> reduced from 45 to 25 seconds, the time spent in check_and_set_bank_swizzle
> is about 8 times less according to the oprofile, the time of
> r600_shader_from_tgsi is reduced by half.
>
> You can also find the patch in this branch:
>
> http://cgit.freedesktop.org/~vadimg/mesa/log/?h=r600-disasm

After some other benchmarks I think that texCombine benchmark that I 
used is close to the worst possible case (when most of the inst groups 
do not use default swizzles, so we have to perform a lot of iterations 
to find the correct swizzles). Now with other tests I see that in some 
cases (where most of the alu groups just use default swizzles) this 
patch might even have slightly worse performance due to additional 
overhead. I'm going to improve the handling of the default case and 
gather some stats over the popular apps, and then update the patch to 
make it more efficient in every case.

Vadim



More information about the mesa-dev mailing list