From b61c6164c100defc519b178d73858df59cffc48d Mon Sep 17 00:00:00 2001 From: Hernan Martinez Date: Sat, 12 Oct 2019 02:40:29 -0400 Subject: QtGui: Disable Windows on ARM64 preprocessor conflict in QtOpenGL The Windows API MemoryBarrier function is actually a macro when _M_ARM64 is defined and it conflicts with the MemoryBarrier method when it's declared and used. Task-number: QTBUG-77388 Change-Id: I762edfc4ca1a44cbe095724de708c7cdad34ae65 Reviewed-by: Laszlo Agocs --- src/gui/opengl/qopenglfunctions_4_5_core.h | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'src/gui/opengl/qopenglfunctions_4_5_core.h') diff --git a/src/gui/opengl/qopenglfunctions_4_5_core.h b/src/gui/opengl/qopenglfunctions_4_5_core.h index bb1b17f7b1..bf872c628b 100644 --- a/src/gui/opengl/qopenglfunctions_4_5_core.h +++ b/src/gui/opengl/qopenglfunctions_4_5_core.h @@ -57,6 +57,12 @@ #include #include +// MemoryBarrier is a macro on some architectures on Windows +#ifdef Q_OS_WIN +#pragma push_macro("MemoryBarrier") +#undef MemoryBarrier +#endif + QT_BEGIN_NAMESPACE class Q_GUI_EXPORT QOpenGLFunctions_4_5_Core : public QAbstractOpenGLFunctions @@ -4056,6 +4062,11 @@ inline void QOpenGLFunctions_4_5_Core::glClipControl(GLenum origin, GLenum depth QT_END_NAMESPACE +#ifdef Q_OS_WIN +#pragma pop_macro("MemoryBarrier") +#endif + + #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif -- cgit v1.2.3