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

Nicolai Hähnle nhaehnle at gmail.com
Fri Jun 3 17:01:22 UTC 2016


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!

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(-)



More information about the mesa-dev mailing list