From 73842582fe1d1268fb9561a59885e1714948d737 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Thu, 10 Jul 2014 16:24:14 -0700 Subject: Abort on shader link/compile failure b/16207378 Change-Id: I12debb0846214a08459ad25454653a003f034402 --- libs/hwui/Program.cpp | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) (limited to 'libs/hwui/Program.cpp') diff --git a/libs/hwui/Program.cpp b/libs/hwui/Program.cpp index ee7789755609..cc72ae098b0f 100644 --- a/libs/hwui/Program.cpp +++ b/libs/hwui/Program.cpp @@ -60,7 +60,6 @@ Program::Program(const ProgramDescription& description, const char* vertex, cons GLint status; glGetProgramiv(mProgramId, GL_LINK_STATUS, &status); if (status != GL_TRUE) { - ALOGE("Error while linking shaders:"); GLint infoLen = 0; glGetProgramiv(mProgramId, GL_INFO_LOG_LENGTH, &infoLen); if (infoLen > 1) { @@ -68,14 +67,7 @@ Program::Program(const ProgramDescription& description, const char* vertex, cons glGetProgramInfoLog(mProgramId, infoLen, 0, &log[0]); ALOGE("%s", log); } - - glDetachShader(mProgramId, mVertexShader); - glDetachShader(mProgramId, mFragmentShader); - - glDeleteShader(mVertexShader); - glDeleteShader(mFragmentShader); - - glDeleteProgram(mProgramId); + LOG_ALWAYS_FATAL("Error while linking shaders"); } else { mInitialized = true; } @@ -153,8 +145,7 @@ GLuint Program::buildShader(const char* source, GLenum type) { // use a fixed size instead GLchar log[512]; glGetShaderInfoLog(shader, sizeof(log), 0, &log[0]); - ALOGE("Error while compiling shader: %s", log); - glDeleteShader(shader); + LOG_ALWAYS_FATAL("Error while compiling shader: %s", log); return 0; } -- cgit v1.2.3-59-g8ed1b