diff options
| author | ReinUsesLisp <reinuseslisp@airmail.cc> | 2018-12-21 18:47:22 -0300 |
|---|---|---|
| committer | ReinUsesLisp <reinuseslisp@airmail.cc> | 2019-01-15 17:54:52 -0300 |
| commit | fc46ecddb3bca4861babbf610cd64ab9fdc1bb08 (patch) | |
| tree | 6dbb61cb71db90909e801b6bfd52e4fbdadcf360 /src/video_core/shader/glsl_decompiler.cpp | |
| parent | 148a6418ede720681f464eca928c7c445f37db79 (diff) | |
video_core: Return safe values after an assert hits
Diffstat (limited to 'src/video_core/shader/glsl_decompiler.cpp')
| -rw-r--r-- | src/video_core/shader/glsl_decompiler.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/video_core/shader/glsl_decompiler.cpp b/src/video_core/shader/glsl_decompiler.cpp index 86a29f812..3ca3fae6d 100644 --- a/src/video_core/shader/glsl_decompiler.cpp +++ b/src/video_core/shader/glsl_decompiler.cpp @@ -353,6 +353,7 @@ private: return "samplerCube"; default: UNREACHABLE(); + return "sampler2D"; } }(); if (sampler.IsArray()) @@ -506,6 +507,7 @@ private: return "// " + comment->GetText(); } UNREACHABLE(); + return {}; } std::string ApplyPrecise(Operation operation, const std::string& value) { @@ -563,6 +565,7 @@ private: } } UNREACHABLE(); + return value; } std::string BitwiseCastResult(std::string value, Type type, bool needs_parenthesis = false) { @@ -581,6 +584,7 @@ private: return "fromHalf2(" + value + ')'; } UNREACHABLE(); + return value; } std::string GenerateUnary(Operation operation, const std::string& func, Type result_type, @@ -697,6 +701,7 @@ private: } UNIMPLEMENTED_MSG("Unhandled output attribute: {}", static_cast<u32>(attribute)); + return "0"; } }(); |
