diff options
author | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-13 21:38:54 +0200 |
---|---|---|
committer | ameerj <52414509+ameerj@users.noreply.github.com> | 2021-06-16 02:19:00 +0200 |
commit | b2955479e5188d8149354f0b8fec813690f9ba86 (patch) | |
tree | d12bd6047e08fdd685a804df8a408587e93daa1f /src/video_core/renderer_opengl | |
parent | textures: Reintroduce CPU ASTC decoder (diff) | |
download | yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.tar yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.tar.gz yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.tar.bz2 yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.tar.lz yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.tar.xz yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.tar.zst yuzu-b2955479e5188d8149354f0b8fec813690f9ba86.zip |
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index ffe9edc1b..9b4038615 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -9,6 +9,8 @@ #include <glad/glad.h> +#include "common/settings.h" + #include "video_core/renderer_opengl/gl_device.h" #include "video_core/renderer_opengl/gl_shader_manager.h" #include "video_core/renderer_opengl/gl_state_tracker.h" @@ -307,7 +309,9 @@ void ApplySwizzle(GLuint handle, PixelFormat format, std::array<SwizzleSource, 4 [[nodiscard]] bool CanBeAccelerated(const TextureCacheRuntime& runtime, const VideoCommon::ImageInfo& info) { - return !runtime.HasNativeASTC() && IsPixelFormatASTC(info.format); + if (IsPixelFormatASTC(info.format)) { + return !runtime.HasNativeASTC() && Settings::values.accelerate_astc.GetValue(); + } // Disable other accelerated uploads for now as they don't implement swizzled uploads return false; switch (info.type) { |