Commit ecbaf666 by Jamie Madill Committed by Commit Bot

dEQP: Fix non-GTest error logging.

Using the non-GTest dEQP targets led to crashes when deferencing a nullptr error logging method. Fix this by skipping platform init if there is a nullptr logError function. Bug: angleproject:2552 Change-Id: I161e35b49f7e9a7592cec968e3540a2e8b625f94 Reviewed-on: https://chromium-review.googlesource.com/1136663 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarLuc Ferron <lucferron@chromium.org>
parent e835609c
...@@ -151,10 +151,13 @@ std::vector<eglw::EGLAttrib> ANGLEPlatform::initAttribs(eglw::EGLAttrib type, ...@@ -151,10 +151,13 @@ std::vector<eglw::EGLAttrib> ANGLEPlatform::initAttribs(eglw::EGLAttrib type,
attribs.push_back(minorVersion); attribs.push_back(minorVersion);
} }
static_assert(sizeof(eglw::EGLAttrib) == sizeof(angle::PlatformMethods *), if (mPlatformMethods.logError)
"Unexpected pointer size"); {
attribs.push_back(EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX); static_assert(sizeof(eglw::EGLAttrib) == sizeof(angle::PlatformMethods *),
attribs.push_back(reinterpret_cast<eglw::EGLAttrib>(&mPlatformMethods)); "Unexpected pointer size");
attribs.push_back(EGL_PLATFORM_ANGLE_PLATFORM_METHODS_ANGLEX);
attribs.push_back(reinterpret_cast<eglw::EGLAttrib>(&mPlatformMethods));
}
attribs.push_back(EGL_NONE); attribs.push_back(EGL_NONE);
return attribs; return attribs;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment