mirror of
https://github.com/yuzu-mirror/yuzu
synced 2024-12-20 05:53:06 +00:00
gl_shader_cache: Improve GLASM error print logic
This commit is contained in:
parent
84feabac88
commit
df406246d9
1 changed files with 10 additions and 7 deletions
|
@ -140,13 +140,16 @@ OGLAssemblyProgram CompileProgram(std::string_view code, GLenum target) {
|
||||||
glGenProgramsARB(1, &program.handle);
|
glGenProgramsARB(1, &program.handle);
|
||||||
glNamedProgramStringEXT(program.handle, target, GL_PROGRAM_FORMAT_ASCII_ARB,
|
glNamedProgramStringEXT(program.handle, target, GL_PROGRAM_FORMAT_ASCII_ARB,
|
||||||
static_cast<GLsizei>(code.size()), code.data());
|
static_cast<GLsizei>(code.size()), code.data());
|
||||||
if (!Settings::values.renderer_debug) {
|
if (Settings::values.renderer_debug) {
|
||||||
return program;
|
|
||||||
}
|
|
||||||
const auto err = reinterpret_cast<const char*>(glGetString(GL_PROGRAM_ERROR_STRING_NV));
|
const auto err = reinterpret_cast<const char*>(glGetString(GL_PROGRAM_ERROR_STRING_NV));
|
||||||
if (err && *err) {
|
if (err && *err) {
|
||||||
LOG_CRITICAL(Render_OpenGL, "{}", err);
|
if (std::strstr(err, "error")) {
|
||||||
LOG_INFO(Render_OpenGL, "{}", code);
|
LOG_CRITICAL(Render_OpenGL, "\n{}", err);
|
||||||
|
LOG_INFO(Render_OpenGL, "\n{}", code);
|
||||||
|
} else {
|
||||||
|
LOG_WARNING(Render_OpenGL, "\n{}", err);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return program;
|
return program;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue