From 2af9c035fd985e08e8580989d8695716597ed491 Mon Sep 17 00:00:00 2001 From: Emma Anholt Date: Mon, 11 May 2026 16:10:50 -0700 Subject: [PATCH] ir3/shader_bisect: Allow a 'r' response to retry a run mid-bisect. Sometimes it takes a minute to get to the failing scene and I get distracted and miss it, but don't want to lose the whole run. Part-of: --- src/freedreno/ir3/ir3_shader_bisect.py | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/src/freedreno/ir3/ir3_shader_bisect.py b/src/freedreno/ir3/ir3_shader_bisect.py index bdec2239f22..4710c2d0153 100644 --- a/src/freedreno/ir3/ir3_shader_bisect.py +++ b/src/freedreno/ir3/ir3_shader_bisect.py @@ -16,14 +16,6 @@ def dump(args): run(args.cmd, extra_env) -def was_good(): - while True: - response = input('Was the previous run [g]ood or [b]ad? ') - - if response in ('g', 'b'): - return response == 'g' - - def bisect(args): with open(args.input, 'r') as f: ids = [l.strip() for l in f.readlines()] @@ -42,10 +34,15 @@ def bisect(args): print(f'Bisecting between {lo} and {hi} ({len(ids)} shaders remaining)') run(args.cmd, extra_env) - if was_good(): - del ids[lo_id:hi_id + 1] - else: - del ids[hi_id + 1:] + while True: + response = input('Was the previous run [g]ood or [b]ad, or [r]etry? ') + + if response in ('g', 'b', 'r'): + if response == 'g': + del ids[lo_id:hi_id + 1] + elif response == 'b': + del ids[hi_id + 1:] + break print(ids)