summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_vulkan
diff options
context:
space:
mode:
authorlat9nq <22451773+lat9nq@users.noreply.github.com>2023-05-04 02:42:33 +0200
committerlat9nq <22451773+lat9nq@users.noreply.github.com>2023-07-21 16:56:07 +0200
commit5cffa342884df531d911555f7b3db9d2f6d1d1f0 (patch)
tree7f1d36c9f291a528edf9ccf7e85f34d2d108b332 /src/video_core/renderer_vulkan
parentMerge pull request #11096 from german77/amiibooo (diff)
downloadyuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.tar
yuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.tar.gz
yuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.tar.bz2
yuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.tar.lz
yuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.tar.xz
yuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.tar.zst
yuzu-5cffa342884df531d911555f7b3db9d2f6d1d1f0.zip
Diffstat (limited to 'src/video_core/renderer_vulkan')
-rw-r--r--src/video_core/renderer_vulkan/vk_texture_cache.cpp19
1 files changed, 13 insertions, 6 deletions
diff --git a/src/video_core/renderer_vulkan/vk_texture_cache.cpp b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
index bf6ad6c79..a060c3934 100644
--- a/src/video_core/renderer_vulkan/vk_texture_cache.cpp
+++ b/src/video_core/renderer_vulkan/vk_texture_cache.cpp
@@ -817,7 +817,7 @@ TextureCacheRuntime::TextureCacheRuntime(const Device& device_, Scheduler& sched
: device{device_}, scheduler{scheduler_}, memory_allocator{memory_allocator_},
staging_buffer_pool{staging_buffer_pool_}, blit_image_helper{blit_image_helper_},
render_pass_cache{render_pass_cache_}, resolution{Settings::values.resolution_info} {
- if (Settings::values.accelerate_astc) {
+ if (Settings::values.accelerate_astc.GetValue() == Settings::AstcDecodeMode::GPU) {
astc_decoder_pass.emplace(device, scheduler, descriptor_pool, staging_buffer_pool,
compute_pass_descriptor_queue, memory_allocator);
}
@@ -1301,12 +1301,19 @@ Image::Image(TextureCacheRuntime& runtime_, const ImageInfo& info_, GPUVAddr gpu
runtime->ViewFormats(info.format))),
aspect_mask(ImageAspectMask(info.format)) {
if (IsPixelFormatASTC(info.format) && !runtime->device.IsOptimalAstcSupported()) {
- if (Settings::values.async_astc.GetValue()) {
+ switch (Settings::values.accelerate_astc.GetValue()) {
+ case Settings::AstcDecodeMode::GPU:
+ if (Settings::values.astc_recompression.GetValue() ==
+ Settings::AstcRecompression::Uncompressed &&
+ info.size.depth == 1) {
+ flags |= VideoCommon::ImageFlagBits::AcceleratedUpload;
+ }
+ break;
+ case Settings::AstcDecodeMode::CPUAsynchronous:
flags |= VideoCommon::ImageFlagBits::AsynchronousDecode;
- } else if (Settings::values.astc_recompression.GetValue() ==
- Settings::AstcRecompression::Uncompressed &&
- Settings::values.accelerate_astc.GetValue() && info.size.depth == 1) {
- flags |= VideoCommon::ImageFlagBits::AcceleratedUpload;
+ break;
+ default:
+ break;
}
flags |= VideoCommon::ImageFlagBits::Converted;
flags |= VideoCommon::ImageFlagBits::CostlyLoad;