diff options
author | Alex Sakhartchouk <alexst@google.com> | 2012-02-07 18:06:13 -0800 |
---|---|---|
committer | Alex Sakhartchouk <alexst@google.com> | 2012-02-07 18:06:13 -0800 |
commit | 257e8a9a4f28a733c2aec8d895d4b90a2107a1ca (patch) | |
tree | 951aba49124f173bacf8dc633e1420640bfdde69 /libs/rs | |
parent | d36ad9b1ff99675dd0eca6a3fda1f52353f451a4 (diff) | |
download | frameworks_base-257e8a9a4f28a733c2aec8d895d4b90a2107a1ca.zip frameworks_base-257e8a9a4f28a733c2aec8d895d4b90a2107a1ca.tar.gz frameworks_base-257e8a9a4f28a733c2aec8d895d4b90a2107a1ca.tar.bz2 |
Making shader compilation errors throw a Java exception.
Change-Id: I612142b6fe1b75eab62e89950c3bea6f326cb730
Diffstat (limited to 'libs/rs')
-rw-r--r-- | libs/rs/driver/rsdShader.cpp | 3 | ||||
-rw-r--r-- | libs/rs/driver/rsdShaderCache.cpp | 3 |
2 files changed, 2 insertions, 4 deletions
diff --git a/libs/rs/driver/rsdShader.cpp b/libs/rs/driver/rsdShader.cpp index c70193a..62b5b46 100644 --- a/libs/rs/driver/rsdShader.cpp +++ b/libs/rs/driver/rsdShader.cpp @@ -190,12 +190,11 @@ bool RsdShader::loadShader(const Context *rsc) { char* buf = (char*) malloc(infoLen); if (buf) { RSD_CALL_GL(glGetShaderInfoLog, mShaderID, infoLen, NULL, buf); - ALOGE("Could not compile shader \n%s\n", buf); + rsc->setError(RS_ERROR_FATAL_PROGRAM_LINK, buf); free(buf); } RSD_CALL_GL(glDeleteShader, mShaderID); mShaderID = 0; - rsc->setError(RS_ERROR_BAD_SHADER, "Error returned from GL driver loading shader text,"); return false; } } diff --git a/libs/rs/driver/rsdShaderCache.cpp b/libs/rs/driver/rsdShaderCache.cpp index f6236e7..89d3c45 100644 --- a/libs/rs/driver/rsdShaderCache.cpp +++ b/libs/rs/driver/rsdShaderCache.cpp @@ -167,12 +167,11 @@ bool RsdShaderCache::link(const Context *rsc) { char* buf = (char*) malloc(bufLength); if (buf) { glGetProgramInfoLog(pgm, bufLength, NULL, buf); - ALOGE("Could not link program:\n%s\n", buf); + rsc->setError(RS_ERROR_FATAL_PROGRAM_LINK, buf); free(buf); } } glDeleteProgram(pgm); - rsc->setError(RS_ERROR_FATAL_PROGRAM_LINK, "Error linking GL Programs"); return false; } |