diff options
author | bunnei <bunneidev@gmail.com> | 2020-09-17 05:43:23 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-17 05:43:23 +0200 |
commit | 1eae35621e74dc85cfbbab38b56f228bf7e38bf0 (patch) | |
tree | 7d9025464cca40265141fb3f39ef7b2ef76c5234 /src/video_core/shader/decode/image.cpp | |
parent | Merge pull request #4662 from lioncash/factory (diff) | |
parent | video_core: Enforce -Werror=switch (diff) | |
download | yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.tar yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.tar.gz yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.tar.bz2 yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.tar.lz yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.tar.xz yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.tar.zst yuzu-1eae35621e74dc85cfbbab38b56f228bf7e38bf0.zip |
Diffstat (limited to 'src/video_core/shader/decode/image.cpp')
-rw-r--r-- | src/video_core/shader/decode/image.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/src/video_core/shader/decode/image.cpp b/src/video_core/shader/decode/image.cpp index e75ca4fdb..cd424aa91 100644 --- a/src/video_core/shader/decode/image.cpp +++ b/src/video_core/shader/decode/image.cpp @@ -119,6 +119,8 @@ ComponentType GetComponentType(Tegra::Engines::SamplerDescriptor descriptor, return descriptor.r_type; } break; + default: + break; } UNIMPLEMENTED_MSG("Texture format not implemented={}", format); return ComponentType::FLOAT; @@ -220,9 +222,10 @@ u32 GetComponentSize(TextureFormat format, std::size_t component) { return (component == 0 || component == 1) ? 8 : 0; case TextureFormat::G4R4: return (component == 0 || component == 1) ? 4 : 0; + default: + UNIMPLEMENTED_MSG("Texture format not implemented={}", format); + return 0; } - UNIMPLEMENTED_MSG("Texture format not implemented={}", format); - return 0; } std::size_t GetImageComponentMask(TextureFormat format) { @@ -257,9 +260,10 @@ std::size_t GetImageComponentMask(TextureFormat format) { case TextureFormat::R8: case TextureFormat::R1: return std::size_t{R}; + default: + UNIMPLEMENTED_MSG("Texture format not implemented={}", format); + return std::size_t{R | G | B | A}; } - UNIMPLEMENTED_MSG("Texture format not implemented={}", format); - return std::size_t{R | G | B | A}; } std::size_t GetImageTypeNumCoordinates(Tegra::Shader::ImageType image_type) { @@ -463,6 +467,8 @@ u32 ShaderIR::DecodeImage(NodeBlock& bb, u32 pc) { return OperationCode::AtomicImageXor; case Tegra::Shader::ImageAtomicOperation::Exch: return OperationCode::AtomicImageExchange; + default: + break; } default: break; |