919aedbfec
Until now we would only allow spilling as a last resort in the last 2 strategies, however, it is possible that in some cases earlier strategies may produce less spills if we allowed spilling on them. Likewise, the fallback scheduler can sometimes produce less spills than 2 threads with optimizations disabled. With this change, we start allowing all our 2-thread strategies to spill, and instead of choosing the first strategy that is successful, we choose the one that doesn't spill or the one with the least amount of spilling. It should be noted that this may incur in a significant increase of compile times. We will address this in a follow-up patch. Reviewed-by: Alejandro Piñeiro <apinheiro@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/15041>