From e48fdcd751c332059c1253fbff65d9b830042ad5 Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Thu, 3 Jul 2025 22:44:05 +0100 Subject: [PATCH 1/2] Re-add time reporting to Info panel --- lglpy/timeline/gui/timeline/info_widget.py | 1 + 1 file changed, 1 insertion(+) diff --git a/lglpy/timeline/gui/timeline/info_widget.py b/lglpy/timeline/gui/timeline/info_widget.py index be4db8f..6d14cb6 100644 --- a/lglpy/timeline/gui/timeline/info_widget.py +++ b/lglpy/timeline/gui/timeline/info_widget.py @@ -320,6 +320,7 @@ def compute_active_event_stats_single(self, event): metrics.append(f' Stream: {stream_name}') metrics.append(f' Stage: {stage_name}') + metrics.append(f' Start: {event.start_time / 1000000.0:0.2f} ms') metrics.append(f' Duration: {event.duration / 1000000.0:0.2f} ms') for key, value in event.get_key_value_properties().items(): From 1bebe8f4be2fcd66f56af01a5f2c46cb9af6018b Mon Sep 17 00:00:00 2001 From: Peter Harris Date: Thu, 3 Jul 2025 22:44:24 +0100 Subject: [PATCH 2/2] Add subpass reporting to Info panel --- lglpy/timeline/data/processed_trace.py | 28 +++++++++++++++++++------- lglpy/timeline/data/raw_trace.py | 1 + 2 files changed, 22 insertions(+), 7 deletions(-) diff --git a/lglpy/timeline/data/processed_trace.py b/lglpy/timeline/data/processed_trace.py index fb62f66..ba3b108 100644 --- a/lglpy/timeline/data/processed_trace.py +++ b/lglpy/timeline/data/processed_trace.py @@ -301,6 +301,7 @@ class GPURenderPass(GPUWorkload): width: The workload width, in pixels. height: The workload height, in pixels. draw_call_count: The number of draw calls in the render pass. + subpass_count: The number of subpasses in the render pass. attachments: The list of framebuffer attachments. ''' @@ -319,6 +320,7 @@ def __init__(self, event: RenderstageEvent, metadata: MetadataRenderPass): self.width = metadata.width self.height = metadata.height self.draw_call_count = metadata.draw_call_count + self.subpass_count = metadata.subpass_count self.attachments = list(metadata.attachments.attachments) def get_workload_type_name(self) -> str: @@ -334,13 +336,15 @@ def get_key_value_properties(self) -> dict[str, str]: Returns: Returns the label for use in the UI. ''' - return { - 'resolution': self.get_resolution_str(), - 'draw count': self.get_draw_count_str(), - 'attachments': self.get_attachment_present_str(), - 'attachments loaded': self.get_attachment_loadop_str(), - 'attachments stored': self.get_attachment_storeop_str() - } + properties = {} + properties['resolution'] = self.get_resolution_str() + properties['draw count'] = self.get_draw_count_str() + if self.subpass_count > 1: + properties['subpass count'] = self.get_subpass_count_str() + properties['attachments'] = self.get_attachment_present_str() + properties['attachments loaded'] = self.get_attachment_loadop_str() + properties['attachments stored'] = self.get_attachment_storeop_str() + return properties def get_resolution_str(self) -> str: ''' @@ -366,6 +370,16 @@ def get_draw_count_str(self) -> str: return f'{self.draw_call_count} draws' + def get_subpass_count_str(self) -> str: + ''' + Get the subpass count string. + + Returns: + Returns the label for use in the UI. + ''' + es = '' if self.subpass_count == 1 else 'es' + return f'{self.subpass_count} subpass{es}' + def get_attachment_present_str(self) -> str: ''' Get the attachment present string. diff --git a/lglpy/timeline/data/raw_trace.py b/lglpy/timeline/data/raw_trace.py index ff82714..3ebd70a 100644 --- a/lglpy/timeline/data/raw_trace.py +++ b/lglpy/timeline/data/raw_trace.py @@ -347,6 +347,7 @@ def __init__(self, submit: MetadataSubmit, metadata: JSONType): self.width = int(metadata['width']) self.height = int(metadata['height']) self.draw_call_count = int(metadata['drawCallCount']) + self.subpass_count = int(metadata['subpassCount']) self.attachments = MetadataAttachments(metadata)