mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-06 14:58:28 +02:00
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: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/41665>
This commit is contained in:
parent
09a71809e0
commit
2af9c035fd
1 changed files with 9 additions and 12 deletions
|
|
@ -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)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue