summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorReinUsesLisp <reinuseslisp@airmail.cc>2021-05-22 01:36:30 +0200
committerameerj <52414509+ameerj@users.noreply.github.com>2021-07-23 03:51:33 +0200
commitdf406246d9117ba1c428d81ba7466ba0291ece3c (patch)
treee57fae5b7283c890f1934b635a20a6335eb0dcea
parentglasm: Implement forced early Z (diff)
downloadyuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.tar
yuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.tar.gz
yuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.tar.bz2
yuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.tar.lz
yuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.tar.xz
yuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.tar.zst
yuzu-df406246d9117ba1c428d81ba7466ba0291ece3c.zip
-rw-r--r--src/video_core/renderer_opengl/gl_shader_cache.cpp17
1 files changed, 10 insertions, 7 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_cache.cpp b/src/video_core/renderer_opengl/gl_shader_cache.cpp
index e678b4bb2..747a133fb 100644
--- a/src/video_core/renderer_opengl/gl_shader_cache.cpp
+++ b/src/video_core/renderer_opengl/gl_shader_cache.cpp
@@ -140,13 +140,16 @@ OGLAssemblyProgram CompileProgram(std::string_view code, GLenum target) {
glGenProgramsARB(1, &program.handle);
glNamedProgramStringEXT(program.handle, target, GL_PROGRAM_FORMAT_ASCII_ARB,
static_cast<GLsizei>(code.size()), code.data());
- if (!Settings::values.renderer_debug) {
- return program;
- }
- const auto err = reinterpret_cast<const char*>(glGetString(GL_PROGRAM_ERROR_STRING_NV));
- if (err && *err) {
- LOG_CRITICAL(Render_OpenGL, "{}", err);
- LOG_INFO(Render_OpenGL, "{}", code);
+ if (Settings::values.renderer_debug) {
+ const auto err = reinterpret_cast<const char*>(glGetString(GL_PROGRAM_ERROR_STRING_NV));
+ if (err && *err) {
+ if (std::strstr(err, "error")) {
+ LOG_CRITICAL(Render_OpenGL, "\n{}", err);
+ LOG_INFO(Render_OpenGL, "\n{}", code);
+ } else {
+ LOG_WARNING(Render_OpenGL, "\n{}", err);
+ }
+ }
}
return program;
}