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

Method add_buffer_get_data

servers/rendering/rendering_device_graph.cpp:1668–1684  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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.
1670 int32_t command_index;
1671 RecordedBufferGetDataCommand *command = static_cast<RecordedBufferGetDataCommand *>(_allocate_command(sizeof(RecordedBufferGetDataCommand), command_index));
1672 command->type = RecordedCommand::TYPE_BUFFER_GET_DATA;
1673 command->self_stages = RDD::PIPELINE_STAGE_COPY_BIT;
1674 command->source = p_src;
1675 command->destination = p_dst;
1676 command->region = p_region;
1677
1678 if (p_src_tracker != nullptr) {
1679 ResourceUsage usage = RESOURCE_USAGE_COPY_FROM;
1680 _add_command_to_graph(&p_src_tracker, &usage, 1, command_index, command);
1681 } else {
1682 _add_command_to_graph(nullptr, nullptr, 0, command_index, command);
1683 }
1684}
1685
1686void RenderingDeviceGraph::add_buffer_update(RDD::BufferID p_dst, ResourceTracker *p_dst_tracker, VectorView<RecordedBufferCopy> p_buffer_copies) {
1687 DEV_ASSERT(p_dst_tracker != nullptr);

Callers 2

buffer_get_dataMethod · 0.80
buffer_get_data_asyncMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected