diff options
author | Doug Horn <doughorn@google.com> | 2021-04-29 03:20:28 +0000 |
---|---|---|
committer | Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com> | 2021-04-29 03:20:28 +0000 |
commit | 4ee3966a6daacc1b76c1783f42e9f81df0870700 (patch) | |
tree | 314e6254ccaa6ae08dece4d14a136e23f05e1732 | |
parent | 2ea6d47927183e0a02115ffc56106c977a8323ba (diff) | |
parent | 14f4842ffef73adaf1e80a06f8ff7d0a1bfd3ad1 (diff) | |
download | vulkan-cereal-4ee3966a6daacc1b76c1783f42e9f81df0870700.tar.gz |
Allow enabling driver validation. am: 14f4842ffe
Original change: https://android-review.googlesource.com/c/device/generic/vulkan-cereal/+/1688584
Change-Id: I8b30ecb7689b6099619dff2c45ea56cacba10a51
-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); } |