mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-09 02:28:10 +02:00
agx: add another RA torture mode
Signed-off-by: Alyssa Rosenzweig <alyssa@rosenzweig.io> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/31532>
This commit is contained in:
parent
819bd2ea62
commit
71448e391a
1 changed files with 5 additions and 2 deletions
|
|
@ -371,8 +371,11 @@ find_best_region_to_evict(struct ra_ctx *rctx, enum ra_class cls, unsigned size,
|
|||
"register file size must be aligned to the maximum vector size");
|
||||
assert(cls == RA_GPR);
|
||||
|
||||
/* Useful for testing RA */
|
||||
bool invert = false;
|
||||
|
||||
unsigned best_base = ~0;
|
||||
unsigned best_moves = ~0;
|
||||
unsigned best_moves = invert ? 0 : ~0;
|
||||
|
||||
for (unsigned base = 0; base + size <= rctx->bound[cls]; base += size) {
|
||||
/* The first k registers are preallocated and unevictable, so must be
|
||||
|
|
@ -424,7 +427,7 @@ find_best_region_to_evict(struct ra_ctx *rctx, enum ra_class cls, unsigned size,
|
|||
* (due to killed sources), since the recursive splitting algorithm
|
||||
* requires at least one free register.
|
||||
*/
|
||||
if (any_free && moves < best_moves) {
|
||||
if (any_free && ((moves < best_moves) ^ invert)) {
|
||||
best_moves = moves;
|
||||
best_base = base;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue