diff options
-rw-r--r-- | stream-servers/glestranslator/EGL/EglOsApi_egl.cpp | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/stream-servers/glestranslator/EGL/EglOsApi_egl.cpp b/stream-servers/glestranslator/EGL/EglOsApi_egl.cpp index 3d3037df..61be1793 100644 --- a/stream-servers/glestranslator/EGL/EglOsApi_egl.cpp +++ b/stream-servers/glestranslator/EGL/EglOsApi_egl.cpp @@ -471,7 +471,9 @@ EglOsEglDisplay::createContext(EGLint profileMask, // Always GLES3 std::vector<EGLint> attributes = { EGL_CONTEXT_CLIENT_VERSION, 3 }; auto exts = mDispatcher.eglQueryString(mDisplay, EGL_EXTENSIONS); - if (exts != nullptr && emugl::hasExtension(exts, "EGL_KHR_create_context_no_error")) { + + bool useValidation = android::base::getEnvironmentVariable("ANDROID_EMUGL_EGL_VALIDATION") == "1"; + if (exts != nullptr && emugl::hasExtension(exts, "EGL_KHR_create_context_no_error") && !useValidation) { attributes.push_back(EGL_CONTEXT_OPENGL_NO_ERROR_KHR); attributes.push_back(EGL_TRUE); } |