diff options
author | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-20 06:15:29 +0100 |
---|---|---|
committer | Fernando Sahmkow <fsahmkow27@gmail.com> | 2021-11-20 06:15:29 +0100 |
commit | 0857f82913d0bcf2de4721233f74cd40ecddcdae (patch) | |
tree | cda81a8683f155985fa57d48f4ed72f44228061e /src/video_core/renderer_vulkan/vk_texture_cache.h | |
parent | TextureCache: Add R16G16 to D24S8 converter. (diff) | |
download | yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.tar yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.tar.gz yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.tar.bz2 yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.tar.lz yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.tar.xz yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.tar.zst yuzu-0857f82913d0bcf2de4721233f74cd40ecddcdae.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 | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.h b/src/video_core/renderer_vulkan/vk_texture_cache.h index f5f8f9a74..44e9dcee4 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.h +++ b/src/video_core/renderer_vulkan/vk_texture_cache.h @@ -61,6 +61,10 @@ public: void CopyImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies); + bool ShouldReinterpret(Image& dst, Image& src); + + void ReinterpretImage(Image& dst, Image& src, std::span<const VideoCommon::ImageCopy> copies); + void ConvertImage(Framebuffer* dst, ImageView& dst_view, ImageView& src_view, bool rescaled); bool CanAccelerateImageUpload(Image&) const noexcept { @@ -82,6 +86,8 @@ public: return true; } + [[nodiscard]] VkBuffer GetTemporaryBuffer(size_t needed_size); + const Device& device; VKScheduler& scheduler; MemoryAllocator& memory_allocator; @@ -90,6 +96,10 @@ public: ASTCDecoderPass& astc_decoder_pass; RenderPassCache& render_pass_cache; const Settings::ResolutionScalingInfo& resolution; + + constexpr static size_t indexing_slots = 8 * sizeof(size_t); + std::array<vk::Buffer, indexing_slots> buffers{}; + std::array<std::unique_ptr<MemoryCommit>, indexing_slots> buffer_commits{}; }; class Image : public VideoCommon::ImageBase { @@ -316,7 +326,6 @@ struct TextureCacheParams { static constexpr bool FRAMEBUFFER_BLITS = false; static constexpr bool HAS_EMULATED_COPIES = false; static constexpr bool HAS_DEVICE_MEMORY_INFO = true; - static constexpr bool HAS_PIXEL_FORMAT_CONVERSIONS = false; using Runtime = Vulkan::TextureCacheRuntime; using Image = Vulkan::Image; |