X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Ftexture_backend.h;h=c977e82e287f120fb13727e32c7c956617573804;hb=ae423e6ef278388f92802fbae34b1c7ec339292f;hp=dad8834b2940487d1c2b0bbc3676b5e633b26b5a;hpb=7b0a38db12c3d1aacb59520a3f4baa16d9ec0048;p=libs%2Fgl.git diff --git a/source/backends/vulkan/texture_backend.h b/source/backends/vulkan/texture_backend.h index dad8834b..c977e82e 100644 --- a/source/backends/vulkan/texture_backend.h +++ b/source/backends/vulkan/texture_backend.h @@ -18,6 +18,7 @@ protected: Device &device; VkImage handle = 0; VkImageView view_handle = 0; + mutable std::vector mip_view_handles; unsigned memory_id = 0; unsigned view_type; std::string debug_name; @@ -28,15 +29,16 @@ protected: void allocate(); virtual void fill_image_info(void *) const = 0; + VkImageView create_view(int) const; + void create_mip_views() const; void require_swizzle() { } - void stage_pixels(void *, const void *, size_t); - - virtual void generate_mipmap() = 0; - void generate_mipmap_levels(unsigned); + void generate_mipmap(); virtual void fill_mipmap_blit(unsigned, void *) = 0; - void change_layout(unsigned, int, unsigned, bool) const; + void change_layout(int, unsigned, bool) const; + + void refresh_mip_views() const { if(mip_view_handles.empty()) create_mip_views(); } void set_debug_name(const std::string &); void set_vulkan_object_names() const;