MCPcopy Create free account
hub / github.com/google/gapid / checkDebugMarkers

Method checkDebugMarkers

gapis/api/vulkan/graph_visualization.go:107–123  ·  view source on GitHub ↗
(label *api.Label)

Source from the content-addressed store, hash-verified

105}
106
107func (dm *debugMarkerStack) checkDebugMarkers(label *api.Label) {
108 // It preserves Labels with no-decreasing sizes in the stack of debug_markers_begin avoiding
109 // insert debug markers in Labels with smaller sizes that would break the levels of hierarchy.
110 for dm.getSize() > 0 && label.GetSize() < dm.top().GetSize() {
111 dm.pop()
112 }
113 dm.push(label)
114
115 if label.GetCommandName() == VK_CMD_DEBUG_MARKER_END {
116 if dm.getSize() > 0 {
117 if label.GetSize() == dm.top().GetSize() && getMaxCommonPrefix(label, dm.top()) == label.GetSize()-1 {
118 dm.addDebugMarker()
119 }
120 dm.pop()
121 }
122 }
123}
124
125func getCommandHierarchyNames() *api.HierarchyNames {
126 commandHierarchyNames := &api.HierarchyNames{BeginNameToLevel: map[string]int{}, EndNameToLevel: map[string]int{},

Callers 4

TestDebugMarkers1Function · 0.95
TestDebugMarkers2Function · 0.95
GetCommandLabelMethod · 0.80
GetSubCommandLabelMethod · 0.80

Calls 8

getSizeMethod · 0.95
topMethod · 0.95
popMethod · 0.95
pushMethod · 0.95
addDebugMarkerMethod · 0.95
getMaxCommonPrefixFunction · 0.85
GetCommandNameMethod · 0.80
GetSizeMethod · 0.45

Tested by 2

TestDebugMarkers1Function · 0.76
TestDebugMarkers2Function · 0.76