summaryrefslogtreecommitdiffstats
path: root/src/video_core/renderer_opengl
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2018-12-21 20:12:54 +0100
committerGitHub <noreply@github.com>2018-12-21 20:12:54 +0100
commite75e8b9580581d1258154d51ac03893386a500e5 (patch)
tree625619fea43e1340d39132f660a476c291974860 /src/video_core/renderer_opengl
parentMerge pull request #1920 from heapo/texture_format_selection (diff)
parenthopefully fix clang format issue (diff)
downloadyuzu-e75e8b9580581d1258154d51ac03893386a500e5.tar
yuzu-e75e8b9580581d1258154d51ac03893386a500e5.tar.gz
yuzu-e75e8b9580581d1258154d51ac03893386a500e5.tar.bz2
yuzu-e75e8b9580581d1258154d51ac03893386a500e5.tar.lz
yuzu-e75e8b9580581d1258154d51ac03893386a500e5.tar.xz
yuzu-e75e8b9580581d1258154d51ac03893386a500e5.tar.zst
yuzu-e75e8b9580581d1258154d51ac03893386a500e5.zip
Diffstat (limited to 'src/video_core/renderer_opengl')
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.h1
-rw-r--r--src/video_core/renderer_opengl/gl_shader_decompiler.cpp12
-rw-r--r--src/video_core/renderer_opengl/renderer_opengl.cpp2
3 files changed, 13 insertions, 2 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.h b/src/video_core/renderer_opengl/gl_shader_cache.h
index b4ef6030d..de3671acf 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.h
+++ b/src/video_core/renderer_opengl/gl_shader_cache.h
@@ -67,6 +67,7 @@ public:
6, "ShaderTrianglesAdjacency");
default:
UNREACHABLE_MSG("Unknown primitive mode.");
+ return LazyGeometryProgram(geometry_programs.points, "points", 1, "ShaderPoints");
}
}
diff --git a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
index a7d8c404d..4e685fa2c 100644
--- a/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_decompiler.cpp
@@ -364,6 +364,7 @@ public:
return value;
default:
UNREACHABLE_MSG("Unimplemented conversion size: {}", static_cast<u32>(size));
+ return value;
}
}
@@ -626,6 +627,7 @@ public:
return "floatBitsToInt(" + value + ')';
} else {
UNREACHABLE();
+ return value;
}
}
@@ -2062,6 +2064,8 @@ private:
std::to_string(instr.alu.GetSignedImm20_20())};
default:
UNREACHABLE();
+ return {regs.GetRegisterAsInteger(instr.gpr39, 0, false),
+ std::to_string(instr.alu.GetSignedImm20_20())};
}
}();
const std::string offset = '(' + packed_shift + " & 0xff)";
@@ -3312,6 +3316,7 @@ private:
return std::to_string(instr.r2p.immediate_mask);
default:
UNREACHABLE();
+ return std::to_string(instr.r2p.immediate_mask);
}
}();
const std::string mask = '(' + regs.GetRegisterAsInteger(instr.gpr8, 0, false) +
@@ -3775,7 +3780,10 @@ private:
}
break;
}
- default: { UNIMPLEMENTED_MSG("Unhandled instruction: {}", opcode->get().GetName()); }
+ default: {
+ UNIMPLEMENTED_MSG("Unhandled instruction: {}", opcode->get().GetName());
+ break;
+ }
}
break;
@@ -3930,4 +3938,4 @@ std::optional<ProgramResult> DecompileProgram(const ProgramCode& program_code, u
return {};
}
-} // namespace OpenGL::GLShader::Decompiler \ No newline at end of file
+} // namespace OpenGL::GLShader::Decompiler
diff --git a/src/video_core/renderer_opengl/renderer_opengl.cpp b/src/video_core/renderer_opengl/renderer_opengl.cpp
index 4fd0d66c5..f02415139 100644
--- a/src/video_core/renderer_opengl/renderer_opengl.cpp
+++ b/src/video_core/renderer_opengl/renderer_opengl.cpp
@@ -427,6 +427,7 @@ static const char* GetSource(GLenum source) {
RET(OTHER);
default:
UNREACHABLE();
+ return "Unknown source";
}
#undef RET
}
@@ -445,6 +446,7 @@ static const char* GetType(GLenum type) {
RET(MARKER);
default:
UNREACHABLE();
+ return "Unknown type";
}
#undef RET
}