diff options
| author | Léo Lam <leo@leolam.fr> | 2020-04-28 13:35:15 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-04-28 13:35:15 +0200 |
| commit | d11a83e205ea187bc6dbc7c5c9162b3e5c087c26 (patch) | |
| tree | 150b5b1ebbe5d6866ca084dce119f971842b005b /Source/Core/VideoCommon/FramebufferShaderGen.cpp | |
| parent | 586af0a55e858340af4310cbd24706d0bba19836 (diff) | |
| parent | f3d7b82f839680e20e52ebbfa5d2a14bb23a558f (diff) | |
Merge pull request #8694 from howard0su/cleanup_switch
Cleanup warnings of -Wswitch
Diffstat (limited to 'Source/Core/VideoCommon/FramebufferShaderGen.cpp')
| -rw-r--r-- | Source/Core/VideoCommon/FramebufferShaderGen.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/Source/Core/VideoCommon/FramebufferShaderGen.cpp b/Source/Core/VideoCommon/FramebufferShaderGen.cpp index a4a5219126..58d37dc8c9 100644 --- a/Source/Core/VideoCommon/FramebufferShaderGen.cpp +++ b/Source/Core/VideoCommon/FramebufferShaderGen.cpp @@ -7,6 +7,8 @@ #include <sstream> #include <string_view> +#include "Common/Logging/Log.h" + #include "VideoCommon/FramebufferManager.h" #include "VideoCommon/TextureDecoder.h" #include "VideoCommon/VertexShaderGen.h" @@ -570,6 +572,15 @@ std::string GenerateTextureReinterpretShader(TextureFormat from_format, TextureF } break; + case TextureFormat::I4: + { + ss << " float4 temp_value = "; + EmitTextureLoad(ss, 0, "coords"); + ss << ";\n" + " raw_value = uint(temp_value.r * 15.0);\n"; + } + break; + case TextureFormat::IA4: { ss << " float4 temp_value = "; @@ -605,6 +616,10 @@ std::string GenerateTextureReinterpretShader(TextureFormat from_format, TextureF " }\n"; } break; + + default: + WARN_LOG(VIDEO, "From format %u is not supported", static_cast<u32>(from_format)); + return "{}\n"; } // Now convert it to its new representation. @@ -654,6 +669,9 @@ std::string GenerateTextureReinterpretShader(TextureFormat from_format, TextureF " }\n"; } break; + default: + WARN_LOG(VIDEO, "To format %u is not supported", static_cast<u32>(to_format)); + return "{}\n"; } ss << "}\n"; |
