diff options
author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-04 05:56:44 +0100 |
---|---|---|
committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2021-01-04 06:06:40 +0100 |
commit | 7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5 (patch) | |
tree | 5bdc2bdcf8b5aeb594a3a2b16c183b13d6fe2771 /src/video_core/compatible_formats.cpp | |
parent | gl_texture_cache: Create base images with sRGB (diff) | |
download | yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.gz yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.bz2 yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.lz yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.xz yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.tar.zst yuzu-7d904fef2e6ac9ce8a3df71e758a36d39b8f69e5.zip |
Diffstat (limited to '')
-rw-r--r-- | src/video_core/compatible_formats.cpp | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/video_core/compatible_formats.cpp b/src/video_core/compatible_formats.cpp index 1619d8664..acf2668dc 100644 --- a/src/video_core/compatible_formats.cpp +++ b/src/video_core/compatible_formats.cpp @@ -10,9 +10,7 @@ #include "video_core/surface.h" namespace VideoCore::Surface { - namespace { - using Table = std::array<std::array<u64, 2>, MaxPixelFormat>; // Compatibility table taken from Table 3.X.2 in: @@ -233,10 +231,13 @@ constexpr Table MakeCopyTable() { EnableRange(copy, COPY_CLASS_64_BITS); return copy; } - } // Anonymous namespace -bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b) { +bool IsViewCompatible(PixelFormat format_a, PixelFormat format_b, bool broken_views) { + if (broken_views) { + // If format views are broken, only accept formats that are identical. + return format_a == format_b; + } static constexpr Table TABLE = MakeViewTable(); return IsSupported(TABLE, format_a, format_b); } |