diff options
Diffstat (limited to 'src/video_core/renderer_opengl/gl_texture_cache.cpp')
-rw-r--r-- | src/video_core/renderer_opengl/gl_texture_cache.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/video_core/renderer_opengl/gl_texture_cache.cpp b/src/video_core/renderer_opengl/gl_texture_cache.cpp index 29105ecad..623b43d8a 100644 --- a/src/video_core/renderer_opengl/gl_texture_cache.cpp +++ b/src/video_core/renderer_opengl/gl_texture_cache.cpp @@ -307,7 +307,7 @@ 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)); + return !runtime.HasNativeASTC() && IsPixelFormatASTC(info.format); // Disable other accelerated uploads for now as they don't implement swizzled uploads return false; switch (info.type) { @@ -568,12 +568,13 @@ void TextureCacheRuntime::BlitFramebuffer(Framebuffer* dst, Framebuffer* src, void TextureCacheRuntime::AccelerateImageUpload(Image& image, const ImageBufferMap& map, std::span<const SwizzleParameters> swizzles) { - if (IsPixelFormatASTC(image.info.format)) { - return util_shaders.ASTCDecode(image, map, swizzles); - } switch (image.info.type) { case ImageType::e2D: - return util_shaders.BlockLinearUpload2D(image, map, swizzles); + if (IsPixelFormatASTC(image.info.format)) { + return util_shaders.ASTCDecode(image, map, swizzles); + } else { + return util_shaders.BlockLinearUpload2D(image, map, swizzles); + } case ImageType::e3D: return util_shaders.BlockLinearUpload3D(image, map, swizzles); case ImageType::Linear: |