diff options
author | Konstantin Seurer <konstantin.seurer@gmail.com> | 2023-09-17 16:41:58 +0200 |
---|---|---|
committer | Konstantin Seurer <konstantin.seurer@gmail.com> | 2024-02-15 16:17:21 +0100 |
commit | 694f77c5c1aa5b3bb08443b5038f55feb17ec7ab (patch) | |
tree | f32f4d8ef524f4889864de637183a6823e22a8b1 | |
parent | dd333440b333cccdc8a645b4614a6a7331325e6a (diff) |
report-fossil: Handle multiple shaders with the same stage
Ray tracing pipelines can have multiple shaders of the same stage type.
This means that changes to ray tracing shaders may not show up. This
patch solves the issue by adding an index that makes those shaders
unique.
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
-rwxr-xr-x | report-fossil.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/report-fossil.py b/report-fossil.py index 48165e7..52199a3 100755 --- a/report-fossil.py +++ b/report-fossil.py @@ -386,6 +386,7 @@ def read_csv(csv_file: pathlib.Path, inc_statistics: typing.Optional[typing.Set[ with csv_file.open('rt') as f: reader = csv.reader(f) + stage_indices = {} for row in reader: if 'Database' in row: factory = ResultFactory.from_column_names(row, inc_statistics) @@ -397,7 +398,10 @@ def read_csv(csv_file: pathlib.Path, inc_statistics: typing.Optional[typing.Set[ app = row[db_index] all_apps.add(app) name = '{}/{}'.format(row[hash_index], executables[row[exec_index]]) - data[(app, name)] = factory(row) + stage_index = stage_indices.setdefault(name, 0) + full_name = '{}/{}'.format(name, stage_index) + data[(app, full_name)] = factory(row) + stage_indices[name] += 1 return data @@ -591,7 +595,7 @@ def report_ignored(names: typing.List[str], what: str): apps: typing.Set[str] = set() for name in names: - apps.add(name.rsplit('/', 2)[0]) + apps.add(name.rsplit('/', 3)[0]) app_list: typing.List[str] = sorted(apps) msg = 'from {} apps: {}'.format(len(app_list), ', '.join(app_list[:7])) if len(app_list) > 7: @@ -688,7 +692,7 @@ def main(): for name in names: d0 = before.get(name) d1 = after.get(name) - app = apps.setdefault(name.rsplit('/', 2)[0], Report()) + app = apps.setdefault(name.rsplit('/', 3)[0], Report()) app.include(name, d0, d1) total.include(name, d0, d1) |