Android: Log OpenGL shader source code in case of compile error
Logging the OpenGL shader source code makes it easier to debug problems. Bug: None Change-Id: Ie4724b1353511eae3806e98270b04e5daa4c11fc Reviewed-on: https://webrtc-review.googlesource.com/69322 Reviewed-by: Sami Kalliomäki <sakal@webrtc.org> Commit-Queue: Magnus Jedvert <magjed@webrtc.org> Cr-Commit-Position: refs/heads/master@{#22900}
This commit is contained in:
committed by
Commit Bot
parent
a153c00bce
commit
080e7b27f5
@ -29,7 +29,7 @@ public class GlShader {
|
||||
GLES20.glGetShaderiv(shader, GLES20.GL_COMPILE_STATUS, compileStatus, 0);
|
||||
if (compileStatus[0] != GLES20.GL_TRUE) {
|
||||
Logging.e(
|
||||
TAG, "Could not compile shader " + shaderType + ":" + GLES20.glGetShaderInfoLog(shader));
|
||||
TAG, "Compile error " + GLES20.glGetShaderInfoLog(shader) + " in shader:\n" + source);
|
||||
throw new RuntimeException(GLES20.glGetShaderInfoLog(shader));
|
||||
}
|
||||
GlUtil.checkNoGLES2Error("compileShader");
|
||||
|
||||
Reference in New Issue
Block a user