Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit db6a1358 authored by Rob Tsuk's avatar Rob Tsuk Committed by Android Git Automerger
Browse files

am 6c96cbf5: Merge "Log shader source when it fails to compile" into lmp-mr1-dev

* commit '6c96cbf5':
  Log shader source when it fails to compile
parents 29218f24 6c96cbf5
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -141,11 +141,12 @@ GLuint Program::buildShader(const char* source, GLenum type) {
    GLint status;
    glGetShaderiv(shader, GL_COMPILE_STATUS, &status);
    if (status != GL_TRUE) {
        ALOGE("Error while compiling this shader:\n===\n%s\n===", source);
        // Some drivers return wrong values for GL_INFO_LOG_LENGTH
        // use a fixed size instead
        GLchar log[512];
        glGetShaderInfoLog(shader, sizeof(log), 0, &log[0]);
        LOG_ALWAYS_FATAL("Error while compiling shader: %s", log);
        LOG_ALWAYS_FATAL("Shader info log: %s", log);
        return 0;
    }