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

Function rebuildVkCmdClearColorImage

gapis/api/vulkan/command_buffer_rebuilder.go:464–490  ·  view source on GitHub ↗
(
	ctx context.Context,
	cb CommandBuilder,
	commandBuffer VkCommandBuffer,
	r *api.GlobalState,
	s *api.GlobalState,
	d VkCmdClearColorImageArgsʳ)

Source from the content-addressed store, hash-verified

462}
463
464func rebuildVkCmdClearColorImage(
465 ctx context.Context,
466 cb CommandBuilder,
467 commandBuffer VkCommandBuffer,
468 r *api.GlobalState,
469 s *api.GlobalState,
470 d VkCmdClearColorImageArgsʳ) (func(), api.Cmd, error) {
471
472 if !GetState(s).Images().Contains(d.Image()) {
473 return nil, nil, fmt.Errorf("Cannot find Image %v", d.Image())
474 }
475
476 colorData := s.AllocDataOrPanic(ctx, d.Color())
477
478 rangeData, rangeCount := unpackMap(ctx, s, d.Ranges())
479
480 return func() {
481 colorData.Free()
482 rangeData.Free()
483 }, cb.VkCmdClearColorImage(commandBuffer,
484 d.Image(),
485 d.ImageLayout(),
486 colorData.Ptr(),
487 rangeCount,
488 rangeData.Ptr(),
489 ).AddRead(colorData.Data()).AddRead(rangeData.Data()), nil
490}
491
492func rebuildVkCmdClearDepthStencilImage(
493 ctx context.Context,

Callers 1

AddCommandFunction · 0.85

Calls 10

unpackMapFunction · 0.85
ImagesMethod · 0.80
AllocDataOrPanicMethod · 0.80
ColorMethod · 0.80
RangesMethod · 0.80
PtrMethod · 0.80
ContainsMethod · 0.65
FreeMethod · 0.65
DataMethod · 0.65
AddReadMethod · 0.45

Tested by

no test coverage detected