From fc46ecddb3bca4861babbf610cd64ab9fdc1bb08 Mon Sep 17 00:00:00 2001 From: ReinUsesLisp Date: Fri, 21 Dec 2018 18:47:22 -0300 Subject: video_core: Return safe values after an assert hits --- src/video_core/shader/glsl_decompiler.cpp | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'src/video_core/shader/glsl_decompiler.cpp') 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(attribute)); + return "0"; } }(); -- cgit v1.2.3