From 156cce698093023d9e79a4ff4fb96f4e4d3019db Mon Sep 17 00:00:00 2001 From: Jason Sams Date: Wed, 3 Mar 2010 13:03:18 -0800 Subject: 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. --- libs/rs/rsShaderCache.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'libs/rs/rsShaderCache.cpp') diff --git a/libs/rs/rsShaderCache.cpp b/libs/rs/rsShaderCache.cpp index 3a1f37092500..4711d1b1ebf8 100644 --- a/libs/rs/rsShaderCache.cpp +++ b/libs/rs/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++; -- cgit v1.2.3-59-g8ed1b