mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-20 03:00:11 +01:00
ir3/bisect: fix off-by-one issues while bisecting
Fixes two separate issues: - Getting stuck when ending up with a list of 2 ids; - Removing a potential bad id. Signed-off-by: Job Noorman <jnoorman@igalia.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/38993>
This commit is contained in:
parent
3c5c96fedb
commit
f601aa5ce7
1 changed files with 2 additions and 2 deletions
|
|
@ -32,7 +32,7 @@ def bisect(args):
|
||||||
|
|
||||||
while len(ids) > 1:
|
while len(ids) > 1:
|
||||||
lo_id = 0
|
lo_id = 0
|
||||||
hi_id = len(ids) // 2
|
hi_id = len(ids) // 2 - 1
|
||||||
lo = ids[lo_id]
|
lo = ids[lo_id]
|
||||||
hi = ids[hi_id]
|
hi = ids[hi_id]
|
||||||
extra_env = {
|
extra_env = {
|
||||||
|
|
@ -44,7 +44,7 @@ def bisect(args):
|
||||||
if was_good():
|
if was_good():
|
||||||
del ids[lo_id:hi_id + 1]
|
del ids[lo_id:hi_id + 1]
|
||||||
else:
|
else:
|
||||||
del ids[hi_id:]
|
del ids[hi_id + 1:]
|
||||||
|
|
||||||
print(ids)
|
print(ids)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue