diff options
author | Konstantin Seurer <konstantin.seurer@gmail.com> | 2023-08-24 15:03:23 +0200 |
---|---|---|
committer | Rhys Perry <pendingchaos02@gmail.com> | 2024-02-15 14:59:53 +0000 |
commit | dd333440b333cccdc8a645b4614a6a7331325e6a (patch) | |
tree | 98d2cd25810e0614bf1ae651e881881c268e9dc0 | |
parent | 97b6e3ae754ebb7f31bf9e14de7bb43a1f071d05 (diff) |
report-fossil: Be more robust when guessing the driver
When running ./fossil_replay.sh with --graphics-pipeline-range 0 0
--compute-pipeline-range 0 0, the script will append lines which don't
contain any driver specific columns. Read rows until we are able to guess
the driver instead of aborting after the first row.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
-rwxr-xr-x | report-fossil.py | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/report-fossil.py b/report-fossil.py index fef5665..48165e7 100755 --- a/report-fossil.py +++ b/report-fossil.py @@ -629,21 +629,22 @@ def main(): for filename in args.csv: with open(filename, 'rt') as f: reader = csv.reader(f) - row = next(reader) - if 'VGPRs' in row: - drivers.add('radv') - elif 'SEND Count' in row: - drivers.add('anv') - elif 'STP Count' in row: - drivers.add('turnip') - elif 'TMU Fills' in row: - drivers.add('v3dv') - else: - print('Cannot guess driver for %s' % filename) - sys.exit(1) + for row in reader: + if 'VGPRs' in row: + drivers.add('radv') + elif 'SEND Count' in row: + drivers.add('anv') + elif 'STP Count' in row: + drivers.add('turnip') + elif 'TMU Fills' in row: + drivers.add('v3dv') + else: + continue + + break if len(drivers) == 0: - print('No CSV files specified. Can\'t guess driver') + print('Can\'t guess driver') sys.exit(1) if len(drivers) > 1: print('Results created from different drivers?') |