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

Function unpackMap

gapis/api/vulkan/command_buffer_rebuilder.go:51–55  ·  view source on GitHub ↗

unpackMap takes a dense map of u32 -> structure, flattens the map into a slice, allocates the appropriate data and returns it as well as the length of the map.

(ctx context.Context, s *api.GlobalState, m interface{})

Source from the content-addressed store, hash-verified

49// a slice, allocates the appropriate data and returns it as well as the
50// length of the map.
51func unpackMap(ctx context.Context, s *api.GlobalState, m interface{}) (api.AllocResult, uint32) {
52 return unpackMapWithAllocator(func(v ...interface{}) api.AllocResult {
53 return s.AllocDataOrPanic(ctx, v...)
54 }, m)
55}
56
57// allocateNewCmdBufFromExistingOneAndBegin takes an existing VkCommandBuffer
58// and allocate then begin a new one with the same allocation/inheritance and

Calls 2

unpackMapWithAllocatorFunction · 0.85
AllocDataOrPanicMethod · 0.80

Tested by

no test coverage detected