Fix partial NP2 support and restrict mipmaps and clamp
modes on HW that does not support proper NP2
bug 2965170
Change-Id: If9a3ac45264861fc75b9616e98957e12a5464411
diff --git a/libs/rs/rsContext.cpp b/libs/rs/rsContext.cpp
index f67a9d5..5327aac 100644
--- a/libs/rs/rsContext.cpp
+++ b/libs/rs/rsContext.cpp
@@ -88,7 +88,7 @@
configAttribsPtr[0] = EGL_NONE;
rsAssert(configAttribsPtr < (configAttribs + (sizeof(configAttribs) / sizeof(EGLint))));
- LOGV("initEGL start");
+ LOGV("%p initEGL start", this);
mEGL.mDisplay = eglGetDisplay(EGL_DEFAULT_DISPLAY);
checkEglError("eglGetDisplay");
@@ -97,7 +97,7 @@
status_t err = EGLUtils::selectConfigForNativeWindow(mEGL.mDisplay, configAttribs, mWndSurface, &mEGL.mConfig);
if (err) {
- LOGE("couldn't find an EGLConfig matching the screen format\n");
+ LOGE("%p, couldn't find an EGLConfig matching the screen format\n", this);
}
//eglChooseConfig(mEGL.mDisplay, configAttribs, &mEGL.mConfig, 1, &mEGL.mNumConfigs);
@@ -109,14 +109,14 @@
}
checkEglError("eglCreateContext");
if (mEGL.mContext == EGL_NO_CONTEXT) {
- LOGE("eglCreateContext returned EGL_NO_CONTEXT");
+ LOGE("%p, eglCreateContext returned EGL_NO_CONTEXT", this);
}
gGLContextCount++;
}
void Context::deinitEGL()
{
- LOGV("deinitEGL");
+ LOGV("%p, deinitEGL", this);
setSurface(0, 0, NULL);
eglDestroyContext(mEGL.mDisplay, mEGL.mContext);
checkEglError("eglDestroyContext");
@@ -150,7 +150,7 @@
{
GLenum err = glGetError();
if (err != GL_NO_ERROR) {
- LOGE("GL Error, 0x%x, from %s", err, msg);
+ LOGE("%p, GL Error, 0x%x, from %s", this, err, msg);
}
}
@@ -348,7 +348,7 @@
}
}
- LOGV("RS Thread exiting");
+ LOGV("%p, RS Thread exiting", rsc);
if (rsc->mIsGraphicsContext) {
rsc->mRaster.clear();
rsc->mFragment.clear();
@@ -370,7 +370,7 @@
pthread_mutex_unlock(&gInitMutex);
}
- LOGV("RS Thread exited");
+ LOGV("%p, RS Thread exited", rsc);
return NULL;
}