summaryrefslogtreecommitdiff
path: root/src/video_core/surface.cpp
diff options
context:
space:
mode:
authorGravatar bunnei2018-12-28 20:23:57 -0500
committerGravatar GitHub2018-12-28 20:23:57 -0500
commit8495f1df2a59b9200bd68e7ebd6730fead2f590c (patch)
tree8ff5c75b22e2ff41af35434c1825955572ed42b1 /src/video_core/surface.cpp
parentMerge pull request #1958 from lioncash/audio (diff)
parentgpu: Remove PixelFormat G8R8U and G8R8S, as they do not seem to exist. (diff)
downloadyuzu-8495f1df2a59b9200bd68e7ebd6730fead2f590c.tar.gz
yuzu-8495f1df2a59b9200bd68e7ebd6730fead2f590c.tar.xz
yuzu-8495f1df2a59b9200bd68e7ebd6730fead2f590c.zip
Merge pull request #1955 from bunnei/g8r8-fix
gpu: Remove PixelFormat G8R8U and G8R8S, as they do not seem to exist.
Diffstat (limited to 'src/video_core/surface.cpp')
-rw-r--r--src/video_core/surface.cpp7
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,
196 LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", static_cast<u32>(component_type)); 196 LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", static_cast<u32>(component_type));
197 UNREACHABLE(); 197 UNREACHABLE();
198 case Tegra::Texture::TextureFormat::G8R8: 198 case Tegra::Texture::TextureFormat::G8R8:
199 // TextureFormat::G8R8 is actually ordered red then green, as such we can use
200 // PixelFormat::RG8U and PixelFormat::RG8S. This was tested with The Legend of Zelda: Breath
201 // of the Wild, which uses this format to render the hearts on the UI.
199 switch (component_type) { 202 switch (component_type) {
200 case Tegra::Texture::ComponentType::UNORM: 203 case Tegra::Texture::ComponentType::UNORM:
201 return PixelFormat::G8R8U; 204 return PixelFormat::RG8U;
202 case Tegra::Texture::ComponentType::SNORM: 205 case Tegra::Texture::ComponentType::SNORM:
203 return PixelFormat::G8R8S; 206 return PixelFormat::RG8S;
204 } 207 }
205 LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", static_cast<u32>(component_type)); 208 LOG_CRITICAL(HW_GPU, "Unimplemented component_type={}", static_cast<u32>(component_type));
206 UNREACHABLE(); 209 UNREACHABLE();