Element restructuring. Add support for new basic Element types including the RS objects and vectors(2-4). In theory this paves the way for maintaining type info for RS objects, passing elements for GLSL uiforms/attribs/varyings, and supporting nested structures.
This will break some apps, checkings for other projects will follow to unbreak them.
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index 8f56efa..11f26b9 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -142,6 +142,13 @@
return ret;
}
+void Context::checkError(const char *msg) const
+{
+ GLenum err = glGetError();
+ if (err != GL_NO_ERROR) {
+ LOGE("GL Error, 0x%x, from %s", err, msg);
+ }
+}
uint32_t Context::runRootScript()
{
@@ -169,11 +176,7 @@
mStateFragmentStore.mLast.clear();
uint32_t ret = runScript(mRootScript.get(), 0);
- GLenum err = glGetError();
- if (err != GL_NO_ERROR) {
- LOGE("Pending GL Error, 0x%x", err);
- }
-
+ checkError("runRootScript");
return ret;
}
@@ -340,10 +343,6 @@
rsc->mObjDestroy.mNeedToEmpty = true;
rsc->objDestroyOOBRun();
- glClearColor(0,0,0,0);
- glClear(GL_COLOR_BUFFER_BIT);
- eglSwapBuffers(rsc->mEGL.mDisplay, rsc->mEGL.mSurface);
-
pthread_mutex_lock(&gInitMutex);
rsc->deinitEGL();
pthread_mutex_unlock(&gInitMutex);