v3d: Retry with the fallback scheduler when RA fails

v3d_compile is now split out into a helper function that gets called a
second time if compilation fails the first time with the result
reporting the register allocation failed. The second time it is run with
the fallback scheduler to try and increase the chances of successfully
allocating the registers.

v2: Add a performance debug message when using the fallback scheduler.

Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5953>
This commit is contained in:
Neil Roberts
2020-07-17 15:32:19 +02:00
parent 1c8167da61
commit de5130fea0
3 changed files with 79 additions and 27 deletions

View File

@@ -557,6 +557,11 @@ struct v3d_compile {
bool writes_z;
bool uses_implicit_point_line_varyings;
/* Whether we are using the fallback scheduler. This will be set after
* register allocation has failed once.
*/
bool fallback_scheduler;
/* State for whether we're executing on each channel currently. 0 if
* yes, otherwise a block number + 1 that the channel jumped to.
*/