[Mesa-dev] [PATCH] gallium/u_threaded: increase batch size to increase performance
Kenneth Graunke
kenneth at whitecape.org
Sat Sep 1 19:14:25 UTC 2018
On Saturday, September 1, 2018 12:14:38 AM PDT Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> This reduces mutex overhead.
>
> +4.4% performance with piglit/drawoverhead, DrawElements, Ryzen X1700
+14% with piglit/drawoverhead and iris_dri.so, DrawArrays, i7 7700HQ.
Acked-by: Kenneth Graunke <kenneth at whitecape.org>
> ---
> src/gallium/auxiliary/util/u_threaded_context.h | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/src/gallium/auxiliary/util/u_threaded_context.h b/src/gallium/auxiliary/util/u_threaded_context.h
> index 53c5a7e8c4c..be6933d05a4 100644
> --- a/src/gallium/auxiliary/util/u_threaded_context.h
> +++ b/src/gallium/auxiliary/util/u_threaded_context.h
> @@ -213,21 +213,21 @@ struct tc_unflushed_batch_token;
> * slots.
> */
> #define TC_MAX_BATCHES 10
>
> /* The size of one batch. Non-trivial calls (i.e. not setting a CSO pointer)
> * can occupy multiple call slots.
> *
> * The idea is to have batches as small as possible but large enough so that
> * the queuing and mutex overhead is negligible.
> */
> -#define TC_CALLS_PER_BATCH 192
> +#define TC_CALLS_PER_BATCH 768
>
> /* Threshold for when to use the queue or sync. */
> #define TC_MAX_STRING_MARKER_BYTES 512
>
> /* Threshold for when to enqueue buffer/texture_subdata as-is.
> * If the upload size is greater than this, it will do instead:
> * - for buffers: DISCARD_RANGE is done by the threaded context
> * - for textures: sync and call the driver directly
> */
> #define TC_MAX_SUBDATA_BYTES 320
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: This is a digitally signed message part.
URL: <https://lists.freedesktop.org/archives/mesa-dev/attachments/20180901/3ecd203f/attachment.sig>
More information about the mesa-dev
mailing list