Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion gapis/api/cmd_id_group.go
Original file line number Diff line number Diff line change
Expand Up @@ -457,10 +457,16 @@ func (c *SubCmdRoot) AddSubCmdMarkerGroups(r []uint64, groups []*CmdIDGroup) err
// FindSubCommandRoot returns the SubCmdRoot that represents the given CmdID.
func (g CmdIDGroup) FindSubCommandRoot(id CmdID) *SubCmdRoot {
for _, x := range g.Spans {
if k, ok := x.(*SubCmdRoot); ok {
switch k := x.(type) {
case *SubCmdRoot:
if CmdID(k.Id[len(k.Id)-1]) == id {
return k
}
case *CmdIDGroup:
y := k.FindSubCommandRoot(id)
if y != nil {
return y
}
}
}
return nil
Expand Down
8 changes: 4 additions & 4 deletions gapis/api/vulkan/vulkan.go
Original file line number Diff line number Diff line change
Expand Up @@ -313,10 +313,10 @@ func (API) ResolveSynchronization(ctx context.Context, d *sync.Data, c *path.Cap
for _, ms := range markerStack[vkQu] {
// If the last subcommand is in a secondary command buffer and current
// recording debug marker groups are opened in a primary command buffer,
// this will assign a wrong End value to the open marker groups.
// However, those End values will be overwritten when the secondary
// command buffer ends and vkCmdExecuteCommands get executed.
ms.end = s.SubCmdIdx[len(s.SubCmdIdx)-1] + 1
// this prevents assigning a wrong End value to the open marker groups.
if len(s.SubCmdIdx) == len(ms.parent) {
ms.end = s.SubCmdIdx[len(s.SubCmdIdx)-1] + 1
}
}
}

Expand Down