Skip to content

Commit

Permalink
Fix crashes when tracing vkCmdExecuteCommands (#1187)
Browse files Browse the repository at this point in the history
  • Loading branch information
Qining authored Oct 11, 2017
1 parent 961fcad commit 8e52d95
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions gapis/api/vulkan/footprint_builder.go
Original file line number Diff line number Diff line change
Expand Up @@ -2341,6 +2341,9 @@ func (vb *FootprintBuilder) BuildFootprint(ctx context.Context,
read(ctx, bh, vkHandle(vkCb))
read(ctx, bh, vb.commandBuffers[vkCb].end)
for k, cbc := range vb.commands[vkCb] {
fci := api.SubCmdIdx{uint64(id), uint64(i), uint64(j), uint64(k)}
submittedCmd := newSubmittedCommand(fci, cbc, nil)
vb.submitInfos[id].pendingCommands = append(vb.submitInfos[id].pendingCommands, submittedCmd)
if cbc.isCmdExecuteCommands {
for scbi, scb := range cbc.secondaryCommandBuffers {
read(ctx, bh, vb.commandBuffers[scb].end)
Expand All @@ -2351,9 +2354,6 @@ func (vb *FootprintBuilder) BuildFootprint(ctx context.Context,
}
}
}
fci := api.SubCmdIdx{uint64(id), uint64(i), uint64(j), uint64(k)}
submittedCmd := newSubmittedCommand(fci, cbc, nil)
vb.submitInfos[id].pendingCommands = append(vb.submitInfos[id].pendingCommands, submittedCmd)
}
}
waitSemaphoreCount := uint64(submit.WaitSemaphoreCount)
Expand Down
2 changes: 1 addition & 1 deletion gapis/api/vulkan/vulkan.api
Original file line number Diff line number Diff line change
Expand Up @@ -2814,7 +2814,7 @@ cmd VkResult vkQueueSubmit(
ref := cb.CommandReferences[as!u32(k)]
if ref.Type == cmd_vkCmdExecuteCommands {
enterSubcontext()
ec := cb.BufferCommands.vkCmdExecuteCommands[ref.CommandIndex]
ec := cb.BufferCommands.vkCmdExecuteCommands[ref.MapIndex]
for l in (0 .. len(ec.CommandBuffers)) {
scb := CommandBuffers[ec.CommandBuffers[as!u32(l)]]
enterSubcontext()
Expand Down

0 comments on commit 8e52d95

Please sign in to comment.