llvmpipe/cs: rework thread pool for avoid mtx locking
authorDave Airlie <airlied@redhat.com>
Mon, 16 Aug 2021 01:18:15 +0000 (11:18 +1000)
committerDave Airlie <airlied@redhat.com>
Thu, 16 Sep 2021 03:21:06 +0000 (13:21 +1000)
commit69109e0b1935ec6d05709de4f3fcdef9d8ef5f99
tree15aa9436f444da336e8f77bbd09764b7a11670da
parent53aade0ef0def4ea7f8468cdec04acd2384e2d2c
llvmpipe/cs: rework thread pool for avoid mtx locking

This helps reduced the mtx lock/unlock overheads for the threadpool
if the work evenly distributes across the number of threads.

The CL CTS conversions tests really hit this, and this takes maybe 10-20s
off a 5min test run.

Reviewed-by: Roland Scheidegger <sroland@vmware.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/12432>
src/gallium/drivers/llvmpipe/lp_cs_tpool.c
src/gallium/drivers/llvmpipe/lp_cs_tpool.h