[Mesa-dev] [PATCH 0/9] radeonsi: speed up no-op descriptor uploads

Nicolai Hähnle nhaehnle at gmail.com
Tue Jun 7 13:13:37 UTC 2016


On 04.06.2016 14:38, Bas Nieuwenhuizen wrote:
> On Fri, Jun 3, 2016 at 7:01 PM, Nicolai Hähnle <nhaehnle at gmail.com> wrote:
>> Hi,
>>
>> it is quite common that few or even no descriptors (except for vertex
>> buffers) change between draw calls, but the function call overhead and
>> branchiness of the code that is involved in figuring out that nothing
>> changes takes a surprising amount of time, as measured by perf.
>>
>> The end goal of this series is to introduce a descriptors_dirty bitfield,
>> and use u_bit_scan to call si_upload_descriptors only for those descriptor
>> sets that saw some changes. In one micro-benchmark I've seen more than a 30%
>> speedup. The difference in real-world applications should of course be
>> *much* smaller (1-2% if you're really lucky, if that). Please review!
>
> This series is
>
> Reviewed-by: Bas Nieuwenhuizen <bas at basnieuwenhuizen.nl>
>
> Did you also try/benchmark using a dirty mask for emitting the pointers?

No I didn't. I briefly looked at it, then got reminded of why things are 
ever so slightly more complicated (mostly because the API VS can map to 
different HW shader stages) - not that it's insurmountable, but then I 
just didn't bother anymore because it was a smaller part of the profiles 
for whatever reason (less branchiness because si_emit_shader_pointer has 
no return value would be my guess).

Cheers,
Nicolai

>
> - Bas
>
>>
>> Cheers,
>> Nicolai
>> --
>>   src/gallium/drivers/radeonsi/si_blit.c       |   4 +-
>>   .../drivers/radeonsi/si_descriptors.c        | 427 ++++++++++-------
>>   src/gallium/drivers/radeonsi/si_pipe.h       |   4 +-
>>   src/gallium/drivers/radeonsi/si_state.c      |   9 +-
>>   src/gallium/drivers/radeonsi/si_state.h      |  41 +-
>>   5 files changed, 307 insertions(+), 178 deletions(-)
>>
>> _______________________________________________
>> mesa-dev mailing list
>> mesa-dev at lists.freedesktop.org
>> https://lists.freedesktop.org/mailman/listinfo/mesa-dev


More information about the mesa-dev mailing list