broadcom/compiler: allow compilation strategies to limit minimum thread count

This adds a minimum thread count parameter to each compilation strategy with
the intention to limit the minimum allowed thread count that can be used to
register allocate with that strategy.

For now all strategies allow the minimum thread count supported by the
hardware, but we will be using this infrastructure to impose a more
strict limit in an upcoming optimization.

Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/10100>
This commit is contained in:
Iago Toral Quiroga
2021-04-06 13:39:23 +02:00
committed by Marge Bot
parent 4b244dc64f
commit fb2214a441
3 changed files with 42 additions and 9 deletions

View File

@@ -654,6 +654,14 @@ struct v3d_compile {
*/
bool disable_ldunif_opt;
/* Minimum number of threads we are willing to use to register allocate
* a shader with the current compilation strategy. This only prevents
* us from lowering the thread count to register allocate successfully,
* which can be useful when we prefer doing other changes to the
* compilation strategy before dropping thread count.
*/
uint32_t min_threads_for_reg_alloc;
/* Last UBO index and offset used with a unifa/ldunifa sequence and the
* block where it was emitted. This is used to skip unifa writes (and
* their 3 delay slot) when the next UBO load reads right after the