iris/gen11+: Calculate pixel hashing tables instead of hardcoding.
authorFrancisco Jerez <currojerez@riseup.net>
Thu, 14 Jan 2021 07:06:55 +0000 (23:06 -0800)
committerFrancisco Jerez <currojerez@riseup.net>
Wed, 24 Feb 2021 05:15:16 +0000 (21:15 -0800)
commitf9bcdc5bc70acba64d598b203968545d9e40d62f
treefa9b4b23eb9f28cbf834f920d8742a0877a631d4
parente2ef1c46760ba6996fd49f5fc56d56e1af8d2220
iris/gen11+: Calculate pixel hashing tables instead of hardcoding.

Pixel hashing tables are a pain to type in, review and maintain IMHO.
In order to obtain satisfactory load balancing on all Gen12 parts
currently in production this series would need to add 5 different
additional tables.  Instead this introduces a simple algorithm able to
calculate a table on the fly based on a handful of parameters.

Note that the Gen11 tables generated with this algorithm are not
identical to the hardcoded ones, however the only difference should be
a phase shift that isn't expected to have any effect on performance,
since it shouldn't change the fraction of work submitted to each pixel
pipe.

The CPU overhead from this change is negligible since the tables only
need to be programmed once at context init time.

Reviewed-by: Jason Ekstrand <jason@jlekstrand.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8749>
src/gallium/drivers/iris/iris_state.c