MCPcopy Create free account
hub / github.com/Ipotrick/Daxa / copy_buffer_to_buffer

Method copy_buffer_to_buffer

src/utils/impl_task_graph.cpp:1149–1175  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1147 }
1148
1149 void TaskGraph::copy_buffer_to_buffer(TaskBufferCopyInfo const & info)
1150 {
1151 ImplTaskGraph & impl = *reinterpret_cast<ImplTaskGraph *>(this->object);
1152 auto src = validate_and_translate_view(impl, info.src_buffer);
1153 auto dst = validate_and_translate_view(impl, info.dst_buffer);
1154
1155 auto src_i = TaskBufferAttachmentIndex{0};
1156 auto dst_i = TaskBufferAttachmentIndex{1};
1157
1158 auto name = info.name.size() > 0 ? std::string(info.name) : std::string("copy ") + std::string(impl.resources[src.index].name) + " to " + std::string(impl.resources[dst.index].name);
1159
1160 add_task(
1161 InlineTask::Transfer(name)
1162 .reads(src)
1163 .writes(dst)
1164 .uses_queue(info.queue)
1165 .executes(
1166 [=](TaskInterface ti)
1167 {
1168 DAXA_DBG_ASSERT_TRUE_M(ti.info(src_i).value().size == ti.info(dst_i).value().size, "given src and dst must have the same size");
1169 ti.recorder.copy_buffer_to_buffer(BufferCopyInfo{
1170 .src_buffer = ti.get(src_i).id,
1171 .dst_buffer = ti.get(src_i).id,
1172 .size = ti.info(src_i).value().size,
1173 });
1174 }));
1175 }
1176
1177 void TaskGraph::copy_image_to_image(TaskImageCopyInfo const & info)
1178 {

Callers 15

record_commandsMethod · 0.80
simple_submit_chainFunction · 0.80
submit_index_chainFunction · 0.80
mainFunction · 0.80
copyFunction · 0.80
multiple_eclFunction · 0.80
drawMethod · 0.80
update_gpu_inputMethod · 0.80
set_initial_buffer_dataFunction · 0.80
particle_set_positionFunction · 0.80
record_input_task_graphFunction · 0.80

Calls 8

executesMethod · 0.80
sizeMethod · 0.45
writesMethod · 0.45
readsMethod · 0.45
valueMethod · 0.45
infoMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected