MCPcopy Create free account
hub / github.com/Redot-Engine/redot-engine / add_buffer_copy

Method add_buffer_copy

servers/rendering/rendering_device_graph.cpp:1651–1666  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1649}
1650
1651void RenderingDeviceGraph::add_buffer_copy(RDD::BufferID p_src, ResourceTracker *p_src_tracker, RDD::BufferID p_dst, ResourceTracker *p_dst_tracker, RDD::BufferCopyRegion p_region) {
1652 // Source tracker is allowed to be null as it could be a read-only buffer.
1653 DEV_ASSERT(p_dst_tracker != nullptr);
1654
1655 int32_t command_index;
1656 RecordedBufferCopyCommand *command = static_cast<RecordedBufferCopyCommand *>(_allocate_command(sizeof(RecordedBufferCopyCommand), command_index));
1657 command->type = RecordedCommand::TYPE_BUFFER_COPY;
1658 command->self_stages = RDD::PIPELINE_STAGE_COPY_BIT;
1659 command->source = p_src;
1660 command->destination = p_dst;
1661 command->region = p_region;
1662
1663 ResourceTracker *trackers[2] = { p_dst_tracker, p_src_tracker };
1664 ResourceUsage usages[2] = { RESOURCE_USAGE_COPY_TO, RESOURCE_USAGE_COPY_FROM };
1665 _add_command_to_graph(trackers, usages, p_src_tracker != nullptr ? 2 : 1, command_index, command);
1666}
1667
1668void RenderingDeviceGraph::add_buffer_get_data(RDD::BufferID p_src, ResourceTracker *p_src_tracker, RDD::BufferID p_dst, RDD::BufferCopyRegion p_region) {
1669 // Source tracker is allowed to be null as it could be a read-only buffer.

Callers 1

buffer_copyMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected