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

Method RecoverMidExecutionCommand

gapis/api/vulkan/vulkan.go:661–680  ·  view source on GitHub ↗

RecoverMidExecutionCommand returns a virtual command, used to describe the a subcommand that was created before the start of the trace

(ctx context.Context, c *path.Capture, dat interface{})

Source from the content-addressed store, hash-verified

659// RecoverMidExecutionCommand returns a virtual command, used to describe the
660// a subcommand that was created before the start of the trace
661func (API) RecoverMidExecutionCommand(ctx context.Context, c *path.Capture, dat interface{}) (api.Cmd, error) {
662 cr, ok := dat.(CommandReferenceʳ)
663 if !ok {
664 return nil, fmt.Errorf("Not a command reference")
665 }
666
667 ctx = capture.Put(ctx, c)
668 st, err := capture.NewState(ctx)
669 if err != nil {
670 return nil, err
671 }
672 s := GetState(st)
673
674 cb := CommandBuilder{Thread: 0, Arena: st.Arena}
675 _, a, err := AddCommand(ctx, cb, cr.Buffer(), st, st, GetCommandArgs(ctx, cr, s))
676 if err != nil {
677 return nil, log.Errf(ctx, err, "Invalid Command")
678 }
679 return a, nil
680}
681
682// Interface check
683var _ sync.SynchronizedAPI = &API{}

Callers

nothing calls this directly

Calls 6

AddCommandFunction · 0.85
GetCommandArgsFunction · 0.85
NewStateMethod · 0.80
BufferMethod · 0.80
ErrfMethod · 0.80
PutMethod · 0.45

Tested by

no test coverage detected