diff options
Diffstat (limited to '')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.h | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 51705eccb..628785d5e 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -121,12 +121,17 @@ public: return *buffer; } - [[nodiscard]] VkImageCreateFlags AspectMask() const noexcept { + [[nodiscard]] VkImageAspectFlags AspectMask() const noexcept { return aspect_mask; } - [[nodiscard]] VkImageView StorageImageView() const noexcept { - return *storage_image_view; + [[nodiscard]] VkImageView StorageImageView(s32 level) const noexcept { + return *storage_image_views[level]; + } + + /// Returns true when the image is already initialized and mark it as initialized + [[nodiscard]] bool ExchangeInitialization() noexcept { + return std::exchange(initialized, true); } private: @@ -135,7 +140,7 @@ private: vk::Buffer buffer; MemoryCommit commit; vk::ImageView image_view; - vk::ImageView storage_image_view; + std::vector<vk::ImageView> storage_image_views; VkImageAspectFlags aspect_mask = 0; bool initialized = false; }; |