X-Git-Url: http://git.tdb.fi/?a=blobdiff_plain;f=source%2Fbackends%2Fvulkan%2Ftexture_backend.h;h=f7ea99b0ecd4c13b605c0bc0bfc54a5b75fe1edf;hb=c89c1fb972fae2cb2f720cb3ec6cf8238ae8d2e1;hp=4784ae9a9b5104d8f69f121fc204f2ed8db23869;hpb=a16145549dc87c3b12671f797bd77b14bcc7786b;p=libs%2Fgl.git diff --git a/source/backends/vulkan/texture_backend.h b/source/backends/vulkan/texture_backend.h index 4784ae9a..f7ea99b0 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,11 +29,18 @@ 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); + void generate_mipmap(); + virtual void fill_mipmap_blit(unsigned, void *) = 0; + + void change_layout(int, unsigned, bool) const; - void synchronize(int, unsigned, bool = false) 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;