MCPcopy Create free account
hub / github.com/KhronosGroup/Vulkan-ValidationLayers / RecordCopyBuffer2

Method RecordCopyBuffer2

layers/sync/sync_command_buffer.cpp:1617–1632  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1615}
1616
1617void CommandBufferSubState::RecordCopyBuffer2(vvl::Buffer& src_buffer_state, vvl::Buffer& dst_buffer_state, uint32_t region_count,
1618 const VkBufferCopy2* regions, const Location& loc) {
1619 const auto tag = access_context.NextCommandTag(loc.function);
1620 AccessContext& context = access_context.GetCurrentAccessContext();
1621
1622 auto src_tag_ex = access_context.AddCommandHandle(tag, src_buffer_state.Handle());
1623 auto dst_tag_ex = access_context.AddCommandHandle(tag, dst_buffer_state.Handle());
1624
1625 for (const auto& copy_region : vvl::make_span(regions, region_count)) {
1626 const AccessRange src_range = MakeRange(src_buffer_state, copy_region.srcOffset, copy_region.size);
1627 context.UpdateAccessState(src_buffer_state, SYNC_COPY_TRANSFER_READ, src_range, src_tag_ex);
1628
1629 const AccessRange dst_range = MakeRange(dst_buffer_state, copy_region.dstOffset, copy_region.size);
1630 context.UpdateAccessState(dst_buffer_state, SYNC_COPY_TRANSFER_WRITE, dst_range, dst_tag_ex);
1631 }
1632}
1633
1634void CommandBufferSubState::RecordCopyImage(vvl::Image& src_image_state, vvl::Image& dst_image_state,
1635 VkImageLayout src_image_layout, VkImageLayout dst_image_layout, uint32_t region_count,

Callers

nothing calls this directly

Calls 6

make_spanFunction · 0.85
NextCommandTagMethod · 0.80
AddCommandHandleMethod · 0.80
UpdateAccessStateMethod · 0.80
MakeRangeFunction · 0.70
HandleMethod · 0.45

Tested by

no test coverage detected