summaryrefslogtreecommitdiffstats
path: root/rsShaderCache.cpp
diff options
context:
space:
mode:
authorJason Sams <rjsams@android.com>2010-03-03 13:03:18 -0800
committerJason Sams <rjsams@android.com>2010-03-03 14:14:37 -0800
commita2cf755a28a1e7ffff2955df656d714f40e4d715 (patch)
treef95205908caee236ace7f0ecaf3874a261844201 /rsShaderCache.cpp
parent779729718eab8ab5d1a3cd4b755a735acc241e6c (diff)
downloadandroid_frameworks_rs-a2cf755a28a1e7ffff2955df656d714f40e4d715.tar.gz
android_frameworks_rs-a2cf755a28a1e7ffff2955df656d714f40e4d715.tar.bz2
android_frameworks_rs-a2cf755a28a1e7ffff2955df656d714f40e4d715.zip
Improve RS error handling. On errors RS will now store the error and a message that can be read from the app. RS will then not continue rendering frames while an unchecked error is present until new state is received.
Diffstat (limited to 'rsShaderCache.cpp')
-rw-r--r--rsShaderCache.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/rsShaderCache.cpp b/rsShaderCache.cpp
index 3a1f3709..4711d1b1 100644
--- a/rsShaderCache.cpp
+++ b/rsShaderCache.cpp
@@ -123,6 +123,8 @@ bool ShaderCache::lookup(Context *rsc, ProgramVertex *vtx, ProgramFragment *frag
}
}
glDeleteProgram(pgm);
+ rsc->setError(RS_ERROR_BAD_SHADER, "Error linking GL Programs");
+ return false;
}
if (vtx->isUserProgram()) {
for (uint32_t ct=0; ct < vtx->getAttribCount(); ct++) {
@@ -146,6 +148,7 @@ bool ShaderCache::lookup(Context *rsc, ProgramVertex *vtx, ProgramFragment *frag
}
}
+ e->mIsValid = true;
//LOGV("SC made program %i", e->program);
glUseProgram(e->program);
mEntryCount++;