38 VKCopyImageCreateInfo,
40 VK_PIPELINE_STAGE_TRANSFER_BIT,
41 VKResourceType::IMAGE> {
50 template<
typename Node,
typename Storage>
67 links.
images.append({{src_resource, VK_ACCESS_TRANSFER_READ_BIT},
68 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
70 links.
images.append({{dst_resource, VK_ACCESS_TRANSFER_WRITE_BIT},
71 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
86 const VkImageCopy &src_region = regions[0];
88 regions[
index].extent.width = std::max(src_region.extent.width >>
index, 1u);
89 regions[
index].extent.height = std::max(src_region.extent.height >>
index, 1u);
90 regions[
index].extent.depth = std::max(src_region.extent.depth >>
index, 1u);
91 regions[
index].srcSubresource.mipLevel = src_region.srcSubresource.mipLevel +
index;
92 regions[
index].dstSubresource.mipLevel = src_region.dstSubresource.mipLevel +
index;
96 VK_IMAGE_LAYOUT_TRANSFER_SRC_OPTIMAL,
98 VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL,
IndexRange index_range() const
void fill(const T &value) const
constexpr IndexRange drop_front(int64_t n) const
virtual void copy_image(VkImage src_image, VkImageLayout src_image_layout, VkImage dst_image, VkImageLayout dst_image_layout, uint32_t region_count, const VkImageCopy *p_regions)=0
static void set_node_data(Node &node, Storage &storage, const CreateInfo &create_info)
void build_commands(VKCommandBufferInterface &command_buffer, Data &data, Span< uint8_t >, VKBoundPipelines &) override
void build_links(VKResourceStateTracker &resources, VKRenderGraphLinks &links, const CreateInfo &create_info) override
VKCopyImageCreateInfo CreateInfo
ResourceWithStamp get_image_and_increase_stamp(VkImage vk_image)
ResourceWithStamp get_image(VkImage vk_image) const
#define storage(slot, qualifiers)
BLI_assert(slot->slot_subtype.map==BMO_OP_SLOT_SUBTYPE_MAP_FLT)
BMesh const char void * data
VKCopyImageData node_data
VkImageAspectFlags vk_image_aspect
int32_t mip_levels
The number of mip-levels to copy.
Vector< VKRenderGraphImage > images