X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Ftexture2d_backend.cpp;fp=source%2Fbackends%2Fvulkan%2Ftexture2d_backend.cpp;h=3e88898b835118c6dfd11b4db0c350d5dc2eef5b;hb=eddb5cfd959eaa202ee6f95cd2049349ec920829;hp=3b94e766dc21ff4be2ec2b88ad4c49d7d5c7c1bf;hpb=d0df3ba82b187705331e2cc55d515c2d44e7f466;p=libs%2Fgl.git diff --git a/source/backends/vulkan/texture2d_backend.cpp b/source/backends/vulkan/texture2d_backend.cpp index 3b94e766..3e88898b 100644 --- a/source/backends/vulkan/texture2d_backend.cpp +++ b/source/backends/vulkan/texture2d_backend.cpp @@ -20,7 +20,6 @@ void VulkanTexture2D::fill_image_info(void *ii) const image_info->imageType = VK_IMAGE_TYPE_2D; image_info->extent.width = self.width; image_info->extent.height = self.height; - image_info->mipLevels = self.levels; } void VulkanTexture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsigned ht, const void *data) @@ -33,8 +32,7 @@ void VulkanTexture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsig size_t data_size = wd*ht*get_pixel_size(storage_fmt); void *staging = device.get_transfer_queue().prepare_transfer(this, false, data_size, [this, level, discard](){ - unsigned n_levels = static_cast(this)->levels; - change_layout(n_levels, level, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, discard); + change_layout(level, VK_IMAGE_LAYOUT_TRANSFER_DST_OPTIMAL, discard); }, [this, level, x, y, wd, ht](VkCommandBuffer cmd_buf, VkBuffer staging_buf, size_t src_off){ const VulkanFunctions &vk = device.get_functions(); @@ -53,11 +51,6 @@ void VulkanTexture2D::sub_image(unsigned level, int x, int y, unsigned wd, unsig stage_pixels(staging, data, wd*ht); } -void VulkanTexture2D::generate_mipmap() -{ - generate_mipmap_levels(static_cast(this)->levels); -} - void VulkanTexture2D::fill_mipmap_blit(unsigned level, void *b) { const Texture2D &self = *static_cast(this);