diff --git a/src/compiler/nir/nir_shader_bisect.py b/src/compiler/nir/nir_shader_bisect.py index a2b1cc49abd..d0fc5ea59ae 100755 --- a/src/compiler/nir/nir_shader_bisect.py +++ b/src/compiler/nir/nir_shader_bisect.py @@ -47,10 +47,8 @@ def was_good(): def bisect(args): - lo = 0 - hi = (1 << (8 * 32)) - 1 - lo = f'{lo:064x}' - hi = f'{hi:064x}' + lo = f'{args.lo:064x}' + hi = f'{args.hi:064x}' # Do an initial run to sanity check that the user has actually made # nir_shader_bisect_select() select some broken behavior. @@ -95,6 +93,12 @@ if __name__ == '__main__': parser = argparse.ArgumentParser() parser.add_argument('-d', '--debug', action='store_true') + parser.add_argument('--lo', type=lambda x: int(x, base=16), + default=0, + help="NIR_SHADER_BISECT_LO from a bad range, to continue a cancelled run") + parser.add_argument('--hi', type=lambda x: int(x, base=16), + default=(1 << (8 * 32)) - 1, + help="NIR_SHADER_BISECT_HI from a bad range, to continue a cancelled run") parser.add_argument('cmd') parser.add_argument('cmd_args', nargs=argparse.REMAINDER) args = parser.parse_args()