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) 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():