@@ -301,6 +301,7 @@ class GPURenderPass(GPUWorkload):
301301 width: The workload width, in pixels.
302302 height: The workload height, in pixels.
303303 draw_call_count: The number of draw calls in the render pass.
304+ subpass_count: The number of subpasses in the render pass.
304305 attachments: The list of framebuffer attachments.
305306 '''
306307
@@ -319,6 +320,7 @@ def __init__(self, event: RenderstageEvent, metadata: MetadataRenderPass):
319320 self .width = metadata .width
320321 self .height = metadata .height
321322 self .draw_call_count = metadata .draw_call_count
323+ self .subpass_count = metadata .subpass_count
322324 self .attachments = list (metadata .attachments .attachments )
323325
324326 def get_workload_type_name (self ) -> str :
@@ -334,13 +336,15 @@ def get_key_value_properties(self) -> dict[str, str]:
334336 Returns:
335337 Returns the label for use in the UI.
336338 '''
337- return {
338- 'resolution' : self .get_resolution_str (),
339- 'draw count' : self .get_draw_count_str (),
340- 'attachments' : self .get_attachment_present_str (),
341- 'attachments loaded' : self .get_attachment_loadop_str (),
342- 'attachments stored' : self .get_attachment_storeop_str ()
343- }
339+ properties = {}
340+ properties ['resolution' ] = self .get_resolution_str ()
341+ properties ['draw count' ] = self .get_draw_count_str ()
342+ if self .subpass_count > 1 :
343+ properties ['subpass count' ] = self .get_subpass_count_str ()
344+ properties ['attachments' ] = self .get_attachment_present_str ()
345+ properties ['attachments loaded' ] = self .get_attachment_loadop_str ()
346+ properties ['attachments stored' ] = self .get_attachment_storeop_str ()
347+ return properties
344348
345349 def get_resolution_str (self ) -> str :
346350 '''
@@ -366,6 +370,16 @@ def get_draw_count_str(self) -> str:
366370
367371 return f'{ self .draw_call_count } draws'
368372
373+ def get_subpass_count_str (self ) -> str :
374+ '''
375+ Get the subpass count string.
376+
377+ Returns:
378+ Returns the label for use in the UI.
379+ '''
380+ es = '' if self .subpass_count == 1 else 'es'
381+ return f'{ self .subpass_count } subpass{ es } '
382+
369383 def get_attachment_present_str (self ) -> str :
370384 '''
371385 Get the attachment present string.
0 commit comments