summaryrefslogtreecommitdiffstats
path: root/libs/rs
diff options
context:
space:
mode:
authorAlex Sakhartchouk <alexst@google.com>2012-02-10 15:30:48 -0800
committerAndroid Git Automerger <android-git-automerger@android.com>2012-02-10 15:30:48 -0800
commitff3de0e5d99ad35f79b0bc638ecd1e298ec6d55a (patch)
treef2d777398c10a3e82bca109b085cdfbb0485eac1 /libs/rs
parentaa21b7c1bc7fa9c17963aad0c836c969c8da17d3 (diff)
parent87a36a3b291e78a612d2d08c14b245ff970080e0 (diff)
downloadframeworks_base-ff3de0e5d99ad35f79b0bc638ecd1e298ec6d55a.zip
frameworks_base-ff3de0e5d99ad35f79b0bc638ecd1e298ec6d55a.tar.gz
frameworks_base-ff3de0e5d99ad35f79b0bc638ecd1e298ec6d55a.tar.bz2
am 87a36a3b: Merge "Making shader compilation errors throw a Java exception."
* commit '87a36a3b291e78a612d2d08c14b245ff970080e0': Making shader compilation errors throw a Java exception.
Diffstat (limited to 'libs/rs')
-rw-r--r--libs/rs/driver/rsdShader.cpp3
-rw-r--r--libs/rs/driver/rsdShaderCache.cpp3
2 files changed, 2 insertions, 4 deletions
diff --git a/libs/rs/driver/rsdShader.cpp b/libs/rs/driver/rsdShader.cpp
index ef8516f..3bca794 100644
--- a/libs/rs/driver/rsdShader.cpp
+++ b/libs/rs/driver/rsdShader.cpp
@@ -191,12 +191,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;
}