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 <laszlo.agocs@qt.io>
This commit is contained in:
Hernan Martinez 2019-10-12 02:40:29 -04:00
parent a9dcd772c0
commit b61c6164c1
11 changed files with 111 additions and 0 deletions

View File

@ -57,6 +57,12 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_2_Compatibility : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_2_Compatibility : public QAbstractOpenGLFunctions
@ -5632,6 +5638,10 @@ inline void QOpenGLFunctions_4_2_Compatibility::glVertexAttribI1i(GLuint index,
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -57,6 +57,12 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_2_Core : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_2_Core : public QAbstractOpenGLFunctions
@ -3027,6 +3033,10 @@ inline void QOpenGLFunctions_4_2_Core::glDrawArraysInstancedBaseInstance(GLenum
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -57,6 +57,12 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_3_Compatibility : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_3_Compatibility : public QAbstractOpenGLFunctions
@ -5839,6 +5845,10 @@ inline void QOpenGLFunctions_4_3_Compatibility::glVertexAttribI1i(GLuint index,
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -57,6 +57,13 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_3_Core : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_3_Core : public QAbstractOpenGLFunctions
@ -3230,6 +3237,10 @@ inline void QOpenGLFunctions_4_3_Core::glClearBufferData(GLenum target, GLenum i
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -59,6 +59,12 @@
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
class Q_GUI_EXPORT QOpenGLFunctions_4_4_Compatibility : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_4_Compatibility : public QAbstractOpenGLFunctions
{ {
public: public:
@ -5961,6 +5967,10 @@ inline void QOpenGLFunctions_4_4_Compatibility::glVertexP2ui(GLenum type, GLuint
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -57,6 +57,12 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_4_Core : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_4_Core : public QAbstractOpenGLFunctions
@ -3415,6 +3421,10 @@ inline void QOpenGLFunctions_4_4_Core::glBufferStorage(GLenum target, GLsizeiptr
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -57,6 +57,12 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_5_Compatibility : public QAbstractOpenGLFunctions class Q_GUI_EXPORT QOpenGLFunctions_4_5_Compatibility : public QAbstractOpenGLFunctions
@ -6679,6 +6685,10 @@ inline void QOpenGLFunctions_4_5_Compatibility::glGetnMapdv(GLenum target, GLenu
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -57,6 +57,12 @@
#include <QtGui/QOpenGLVersionFunctions> #include <QtGui/QOpenGLVersionFunctions>
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class Q_GUI_EXPORT QOpenGLFunctions_4_5_Core : public QAbstractOpenGLFunctions 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 QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL && !QT_OPENGL_ES_2 #endif // QT_NO_OPENGL && !QT_OPENGL_ES_2
#endif #endif

View File

@ -61,6 +61,12 @@
#include <QtCore/qpair.h> #include <QtCore/qpair.h>
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QOpenGLContext; class QOpenGLContext;
@ -1897,6 +1903,10 @@ public:
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL #endif // QT_NO_OPENGL
#endif #endif

View File

@ -60,6 +60,12 @@
#include "qopenglextensions.h" #include "qopenglextensions.h"
#include <QtGui/qopenglcontext.h> #include <QtGui/qopenglcontext.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
QAbstractOpenGLExtension::~QAbstractOpenGLExtension() QAbstractOpenGLExtension::~QAbstractOpenGLExtension()
@ -7720,3 +7726,6 @@ bool QOpenGLExtension_QCOM_tiled_rendering::initializeOpenGLFunctions()
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif

View File

@ -66,6 +66,12 @@
#include <QtGui/qopengl.h> #include <QtGui/qopengl.h>
// MemoryBarrier is a macro on some architectures on Windows
#ifdef Q_OS_WIN
#pragma push_macro("MemoryBarrier")
#undef MemoryBarrier
#endif
QT_BEGIN_NAMESPACE QT_BEGIN_NAMESPACE
class QOpenGLContext; class QOpenGLContext;
@ -19473,6 +19479,10 @@ inline void QOpenGLExtension_QCOM_tiled_rendering::glEndTilingQCOM(GLbitfield pr
QT_END_NAMESPACE QT_END_NAMESPACE
#ifdef Q_OS_WIN
#pragma pop_macro("MemoryBarrier")
#endif
#endif // QT_NO_OPENGL #endif // QT_NO_OPENGL
#endif #endif