[Mesa-dev] [PATCH] r600g: rework check_and_set_bank_swizzle
Christian König
deathsimple at vodafone.de
Fri Jan 4 09:09:46 PST 2013
On 31.12.2012 22:55, Vadim Girlin wrote:
> 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.
Hi Vadim,
I spend quite some time trying to understand the different restrictions
and implementing them in an usable algorithm before I gave up and just
hacked the code how it is currently looks like. So please be aware that
you're dealing with a quite complicated topic and improving it probably
won't be done with a first shot.
Additional to that it would be great if you could remove the forced bank
swizzle and just have a single algorithm that handles the whole problem
at just one point in the code generation path.
Christian.
>
> Vadim
>
> _______________________________________________
> mesa-dev mailing list
> mesa-dev at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/mesa-dev
>
More information about the mesa-dev
mailing list