blit.dstOffsets[1] = { static_cast<int>(dst_size.x), static_cast<int>(dst_size.y), 1 };
}
-Resource::AsyncLoader *VulkanTexture2D::load(IO::Seekable &, const Resources *)
-{
- throw logic_error("Texture2D::load is unimplemented");
-}
-
uint64_t VulkanTexture2D::get_data_size() const
{
return 0;
[&tex, level, discard](){
tex.change_layout(level, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, discard);
},
- [&tex, level, x, y, wd, ht](VkCommandBuffer cmd_buf, VkBuffer staging_buf, size_t src_off){
- const VulkanFunctions &vk = tex.device.get_functions();
-
+ [&tex, level, x, y, wd, ht](const VulkanCommandRecorder &vkCmd, VkBuffer staging_buf, size_t src_off){
VkBufferImageCopy region = { };
region.bufferOffset = src_off;
region.imageSubresource.aspectMask = get_vulkan_aspect(get_components(tex.storage_fmt));
region.imageSubresource.layerCount = 1;
region.imageOffset = { x, y, 0 };
region.imageExtent = { wd, ht, 1 };
- vk.CmdCopyBufferToImage(cmd_buf, staging_buf, tex.handle, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion);
+ vkCmd.CopyBufferToImage(staging_buf, tex.handle, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, 1, ®ion);
});
}