| 2111 | } |
| 2112 | |
| 2113 | void RenderingDeviceGraph::add_texture_copy(RDD::TextureID p_src, ResourceTracker *p_src_tracker, RDD::TextureID p_dst, ResourceTracker *p_dst_tracker, VectorView<RDD::TextureCopyRegion> p_texture_copy_regions) { |
| 2114 | DEV_ASSERT(p_src_tracker != nullptr); |
| 2115 | DEV_ASSERT(p_dst_tracker != nullptr); |
| 2116 | |
| 2117 | int32_t command_index; |
| 2118 | uint64_t command_size = sizeof(RecordedTextureCopyCommand) + p_texture_copy_regions.size() * sizeof(RDD::TextureCopyRegion); |
| 2119 | RecordedTextureCopyCommand *command = static_cast<RecordedTextureCopyCommand *>(_allocate_command(command_size, command_index)); |
| 2120 | command->type = RecordedCommand::TYPE_TEXTURE_COPY; |
| 2121 | command->self_stages = RDD::PIPELINE_STAGE_COPY_BIT; |
| 2122 | command->from_texture = p_src; |
| 2123 | command->to_texture = p_dst; |
| 2124 | command->texture_copy_regions_count = p_texture_copy_regions.size(); |
| 2125 | |
| 2126 | RDD::TextureCopyRegion *texture_copy_regions = command->texture_copy_regions(); |
| 2127 | for (uint32_t i = 0; i < command->texture_copy_regions_count; i++) { |
| 2128 | texture_copy_regions[i] = p_texture_copy_regions[i]; |
| 2129 | } |
| 2130 | |
| 2131 | ResourceTracker *trackers[2] = { p_dst_tracker, p_src_tracker }; |
| 2132 | ResourceUsage usages[2] = { RESOURCE_USAGE_COPY_TO, RESOURCE_USAGE_COPY_FROM }; |
| 2133 | _add_command_to_graph(trackers, usages, 2, command_index, command); |
| 2134 | } |
| 2135 | |
| 2136 | void RenderingDeviceGraph::add_texture_get_data(RDD::TextureID p_src, ResourceTracker *p_src_tracker, RDD::BufferID p_dst, VectorView<RDD::BufferTextureCopyRegion> p_buffer_texture_copy_regions, ResourceTracker *p_dst_tracker) { |
| 2137 | DEV_ASSERT(p_src_tracker != nullptr); |
no test coverage detected