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

Method RecordCopyBuffer

layers/sync/sync_command_buffer.cpp:1600–1615  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1598}
1599
1600void CommandBufferSubState::RecordCopyBuffer(vvl::Buffer& src_buffer_state, vvl::Buffer& dst_buffer_state, uint32_t region_count,
1601 const VkBufferCopy* regions, const Location& loc) {
1602 const auto tag = access_context.NextCommandTag(loc.function);
1603 AccessContext& context = access_context.GetCurrentAccessContext();
1604
1605 auto src_tag_ex = access_context.AddCommandHandle(tag, src_buffer_state.Handle());
1606 auto dst_tag_ex = access_context.AddCommandHandle(tag, dst_buffer_state.Handle());
1607
1608 for (const auto& copy_region : vvl::make_span(regions, region_count)) {
1609 const AccessRange src_range = MakeRange(src_buffer_state, copy_region.srcOffset, copy_region.size);
1610 context.UpdateAccessState(src_buffer_state, SYNC_COPY_TRANSFER_READ, src_range, src_tag_ex);
1611
1612 const AccessRange dst_range = MakeRange(dst_buffer_state, copy_region.dstOffset, copy_region.size);
1613 context.UpdateAccessState(dst_buffer_state, SYNC_COPY_TRANSFER_WRITE, dst_range, dst_tag_ex);
1614 }
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) {

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