]> git.tdb.fi Git - libs/gl.git/blobdiff - source/backends/vulkan/texture2d_backend.cpp
Refactor Synchronizer to deal with individual mipmap levels
[libs/gl.git] / source / backends / vulkan / texture2d_backend.cpp
index 2d6ee131056b8975512b8a0b82c1e1e66cbb4145..d3db86d3ae27efe214ec2acd6586e96350ad4599 100644 (file)
@@ -28,7 +28,7 @@ void VulkanTexture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsig
        const Texture2D &self = *static_cast<const Texture2D *>(this);
 
        auto level_size = self.get_level_size(level);
-       synchronize(-1, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, (x==0 && y==0 && wd==level_size.x && ht==level_size.y));
+       change_layout(self.levels, level, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, (x==0 && y==0 && wd==level_size.x && ht==level_size.y));
 
        size_t data_size = wd*ht*get_pixel_size(storage_fmt);
        void *staging = device.get_transfer_queue().prepare_transfer(data_size,