diff options
author | Liam <byteslice@airmail.cc> | 2022-10-20 00:45:49 +0200 |
---|---|---|
committer | Liam <byteslice@airmail.cc> | 2022-10-20 00:52:42 +0200 |
commit | 9524e28d206f32898df9e3a02ed67ba1b5c5b20b (patch) | |
tree | daaa94c5d67f97c7cb6350d7184575641d4bd180 /src/video_core/renderer_vulkan/vk_texture_cache.cpp | |
parent | Merge pull request #9082 from Morph1984/future (diff) | |
download | yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.tar yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.tar.gz yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.tar.bz2 yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.tar.lz yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.tar.xz yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.tar.zst yuzu-9524e28d206f32898df9e3a02ed67ba1b5c5b20b.zip |
Diffstat (limited to 'src/video_core/renderer_vulkan/vk_texture_cache.cpp')
-rw-r--r-- | src/video_core/renderer_vulkan/vk_texture_cache.cpp | 15 |
1 files changed, 10 insertions, 5 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp index 305ad8aee..20e56b0d1 100644 --- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp +++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp @@ -791,12 +791,17 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched MemoryAllocator& memory_allocator_, StagingBufferPool& staging_buffer_pool_, BlitImageHelper& blit_image_helper_, - ASTCDecoderPass& astc_decoder_pass_, - RenderPassCache& render_pass_cache_) + RenderPassCache& render_pass_cache_, + DescriptorPool& descriptor_pool, + UpdateDescriptorQueue& update_descriptor_queue) : device{device_}, scheduler{scheduler_}, memory_allocator{memory_allocator_}, staging_buffer_pool{staging_buffer_pool_}, blit_image_helper{blit_image_helper_}, - astc_decoder_pass{astc_decoder_pass_}, render_pass_cache{render_pass_cache_}, - resolution{Settings::values.resolution_info} {} + render_pass_cache{render_pass_cache_}, resolution{Settings::values.resolution_info} { + if (Settings::values.accelerate_astc) { + astc_decoder_pass.emplace(device, scheduler, descriptor_pool, staging_buffer_pool, + update_descriptor_queue, memory_allocator); + } +} void TextureCacheRuntime::Finish() { scheduler.Finish(); @@ -1845,7 +1850,7 @@ void TextureCacheRuntime::AccelerateImageUpload( Image& image, const StagingBufferRef& map, std::span<const VideoCommon::SwizzleParameters> swizzles) { if (IsPixelFormatASTC(image.info.format)) { - return astc_decoder_pass.Assemble(image, map, swizzles); + return astc_decoder_pass->Assemble(image, map, swizzles); } ASSERT(false); } |