+ const Texture &self = *static_cast<const Texture *>(this);
+
+ if(!mip_view_handles.empty())
+ return;
+
+ mip_view_handles.resize(self.n_levels);
+ if(self.n_levels==1)
+ mip_view_handles[0] = view_handle;
+ else
+ {
+ for(unsigned i=0; i<self.n_levels; ++i)
+ mip_view_handles[i] = create_view(i);
+ }
+}
+
+void VulkanTexture::generate_mipmap()
+{
+ unsigned n_levels = static_cast<const Texture *>(this)->n_levels;
+