diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-08-15 05:19:01 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-08-21 08:37:15 +0200 |
commit | e0397f00d0461f9fc927733fe462a41be2de6009 (patch) | |
tree | f28f273326dd3add8df44c4f969b97cec7e9f71e /src/video_core/renderer_vulkan/vk_texture_cache.h | |
parent | Merge pull request #6888 from v1993/patch-3 (diff) | |
download | yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.tar yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.tar.gz yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.tar.bz2 yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.tar.lz yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.tar.xz yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.tar.zst yuzu-e0397f00d0461f9fc927733fe462a41be2de6009.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_texture_cache.h')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index 5fe6b7ba3..6d5a68bfe 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -232,6 +232,18 @@ public: return image_ranges; } + [[nodiscard]] bool HasAspectColorBit(size_t index) const noexcept { + return (image_ranges.at(index).aspectMask & VK_IMAGE_ASPECT_COLOR_BIT) != 0; + } + + [[nodiscard]] bool HasAspectDepthBit() const noexcept { + return has_depth; + } + + [[nodiscard]] bool HasAspectStencilBit() const noexcept { + return has_stencil; + } + private: vk::Framebuffer framebuffer; VkRenderPass renderpass{}; @@ -241,6 +253,8 @@ private: u32 num_images = 0; std::array<VkImage, 9> images{}; std::array<VkImageSubresourceRange, 9> image_ranges{}; + bool has_depth{}; + bool has_stencil{}; }; struct TextureCacheParams { |