Skip to content

Commit

Permalink
Handle acceleration structure build pipeline stages (#75)
Browse files Browse the repository at this point in the history
When using ray tracing, it is possible for AS-build stages to
appear in the Perfetto data. Correctly handle and rename
these.
  • Loading branch information
bengaineyarm authored Feb 5, 2025
1 parent 8c2bf08 commit ffe7a4f
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion lglpy/timeline/data/raw_trace.py
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,7 @@ class GPUStageID(enum.IntEnum):
MAIN: Main phase vertex and fragment shaders from a render pass.
IMAGE_TRANSFER: Transfers writing an image output.
BUFFER_TRANSFER: Transfer writing a buffer output.
ASBUILD: Acceleration structure build.
'''
COMPUTE = 0
ADVANCED_GEOMETRY = 1
Expand All @@ -102,6 +103,7 @@ class GPUStageID(enum.IntEnum):
MAIN = 5
IMAGE_TRANSFER = 6
BUFFER_TRANSFER = 7
ASBUILD = 8

@classmethod
def get_ui_name(cls, stage_id) -> str:
Expand All @@ -122,7 +124,8 @@ def get_ui_name(cls, stage_id) -> str:
cls.BINNING: 'Binning',
cls.MAIN: 'Main',
cls.IMAGE_TRANSFER: 'Image transfer',
cls.BUFFER_TRANSFER: 'Buffer transfer'
cls.BUFFER_TRANSFER: 'Buffer transfer',
cls.ASBUILD: 'Acceleration structure build',
}

return human_names[stage_id]
Expand Down Expand Up @@ -559,6 +562,8 @@ class PerfettoConfig:
"fragment": GPUStageID.FRAGMENT,
"binning": GPUStageID.BINNING,
"main": GPUStageID.MAIN,
"acceleration structure 'fast build' build": GPUStageID.ASBUILD,
"acceleration structure 'fast trace' build": GPUStageID.ASBUILD,
}

def __init__(self):
Expand Down

0 comments on commit ffe7a4f

Please sign in to comment.