diff options
author | Tony Wasserka <neobrainx@gmail.com> | 2014-10-21 20:24:53 +0200 |
---|---|---|
committer | Tony Wasserka <neobrainx@gmail.com> | 2014-10-21 20:24:53 +0200 |
commit | efacd65b261049dae6785b22764bde4e65f80ddd (patch) | |
tree | a20c04ceddfab92b00d416fb09f0f8a3339b5329 | |
parent | Merge pull request #144 from archshift/graceful-quit (diff) | |
parent | Only check OpenGL shader log if size is >1. (diff) | |
download | yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.tar yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.tar.gz yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.tar.bz2 yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.tar.lz yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.tar.xz yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.tar.zst yuzu-efacd65b261049dae6785b22764bde4e65f80ddd.zip |
-rw-r--r-- | src/video_core/renderer_opengl/gl_shader_util.cpp | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/video_core/renderer_opengl/gl_shader_util.cpp b/src/video_core/renderer_opengl/gl_shader_util.cpp index 10239c8a7..a0eb0418c 100644 --- a/src/video_core/renderer_opengl/gl_shader_util.cpp +++ b/src/video_core/renderer_opengl/gl_shader_util.cpp @@ -29,10 +29,9 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { glGetShaderiv(vertex_shader_id, GL_COMPILE_STATUS, &result); glGetShaderiv(vertex_shader_id, GL_INFO_LOG_LENGTH, &info_log_length); - std::vector<char> vertex_shader_error(info_log_length); - glGetShaderInfoLog(vertex_shader_id, info_log_length, NULL, &vertex_shader_error[0]); - if (info_log_length > 1) { + std::vector<char> vertex_shader_error(info_log_length); + glGetShaderInfoLog(vertex_shader_id, info_log_length, NULL, &vertex_shader_error[0]); DEBUG_LOG(GPU, "%s", &vertex_shader_error[0]); } @@ -46,10 +45,9 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { glGetShaderiv(fragment_shader_id, GL_COMPILE_STATUS, &result); glGetShaderiv(fragment_shader_id, GL_INFO_LOG_LENGTH, &info_log_length); - std::vector<char> fragment_shader_error(info_log_length); - glGetShaderInfoLog(fragment_shader_id, info_log_length, NULL, &fragment_shader_error[0]); - if (info_log_length > 1) { + std::vector<char> fragment_shader_error(info_log_length); + glGetShaderInfoLog(fragment_shader_id, info_log_length, NULL, &fragment_shader_error[0]); DEBUG_LOG(GPU, "%s", &fragment_shader_error[0]); } @@ -65,10 +63,9 @@ GLuint LoadShaders(const char* vertex_shader, const char* fragment_shader) { glGetProgramiv(program_id, GL_LINK_STATUS, &result); glGetProgramiv(program_id, GL_INFO_LOG_LENGTH, &info_log_length); - std::vector<char> program_error(std::max(info_log_length, int(1))); - glGetProgramInfoLog(program_id, info_log_length, NULL, &program_error[0]); - if (info_log_length > 1) { + std::vector<char> program_error(info_log_length); + glGetProgramInfoLog(program_id, info_log_length, NULL, &program_error[0]); DEBUG_LOG(GPU, "%s", &program_error[0]); } |