diff options
| author | Jason Sams <rjsams@android.com> | 2010-03-03 13:03:18 -0800 |
|---|---|---|
| committer | Jason Sams <rjsams@android.com> | 2010-03-03 14:14:37 -0800 |
| commit | a2cf755a28a1e7ffff2955df656d714f40e4d715 (patch) | |
| tree | f95205908caee236ace7f0ecaf3874a261844201 /rsShaderCache.cpp | |
| parent | 779729718eab8ab5d1a3cd4b755a735acc241e6c (diff) | |
| download | android_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.cpp | 3 |
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++; |
