Fix compilation of dEQP on OSX after a roll of EGL headers
dEQP assumes EGLNativeDisplayType is a pointer, but EGL recently defined
it to be an integer.
BUG=angleproject:1707
Change-Id: Ief68c763ce159db44f4008cced47e87d92342861
Reviewed-on: https://chromium-review.googlesource.com/434761
Reviewed-by: Jamie Madill <jmadill@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
diff --git a/src/tests/deqp_support/tcuANGLENativeDisplayFactory.cpp b/src/tests/deqp_support/tcuANGLENativeDisplayFactory.cpp
index a7432b4..46a77a6 100644
--- a/src/tests/deqp_support/tcuANGLENativeDisplayFactory.cpp
+++ b/src/tests/deqp_support/tcuANGLENativeDisplayFactory.cpp
@@ -72,7 +72,14 @@
ANGLENativeDisplay(const std::vector<eglw::EGLAttrib> &attribs);
virtual ~ANGLENativeDisplay() {}
- void *getPlatformNative() override { return mDeviceContext; }
+ void *getPlatformNative() override
+ {
+ // On OSX 64bits mDeviceContext is a 32 bit integer, so we can't simply
+ // use reinterpret_cast<void*>.
+ void *result = nullptr;
+ memcpy(&result, &mDeviceContext, sizeof(mDeviceContext));
+ return result;
+ }
const eglw::EGLAttrib *getPlatformAttributes() const override { return &mPlatformAttributes[0]; }
const eglw::Library &getLibrary() const override { return mLibrary; }