diff options
author | bunnei <bunneidev@gmail.com> | 2018-12-28 02:43:06 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2018-12-28 21:36:45 +0100 |
commit | 2020ba06e10d46eafa8ddd28460ebbdc87df3db5 (patch) | |
tree | 8ff5c75b22e2ff41af35434c1825955572ed42b1 /src/video_core/surface.cpp | |
parent | Merge pull request #1958 from lioncash/audio (diff) | |
download | yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.tar yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.tar.gz yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.tar.bz2 yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.tar.lz yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.tar.xz yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.tar.zst yuzu-2020ba06e10d46eafa8ddd28460ebbdc87df3db5.zip |
Diffstat (limited to 'src/video_core/surface.cpp')
-rw-r--r-- | src/video_core/surface.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/video_core/surface.cpp b/src/video_core/surface.cpp index a97b1562b..1a344229f 100644 --- a/src/video_core/surface.cpp +++ b/src/video_core/surface.cpp @@ -196,11 +196,14 @@ PixelFormat PixelFormatFromTextureFormat(Tegra::Texture::TextureFormat format, LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", static_cast<u32>(component_type)); UNREACHABLE(); case Tegra::Texture::TextureFormat::G8R8: + // TextureFormat::G8R8 is actually ordered red then green, as such we can use + // PixelFormat::RG8U and PixelFormat::RG8S. This was tested with The Legend of Zelda: Breath + // of the Wild, which uses this format to render the hearts on the UI. switch (component_type) { case Tegra::Texture::ComponentType::UNORM: - return PixelFormat::G8R8U; + return PixelFormat::RG8U; case Tegra::Texture::ComponentType::SNORM: - return PixelFormat::G8R8S; + return PixelFormat::RG8S; } LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", static_cast<u32>(component_type)); UNREACHABLE(); |