ANGLE: Fix build for newer MinGW versions
Availability of D3D11_QUERY_DATA_TIMESTAMP_DISJOINT depends on the used MinGW version so that the check for MINGW is not sufficient. The newly added configure test can be used for every toolset. Task-number: QTBUG-57916 Change-Id: Ia9cb48f3e673841101a93cbc8ea23aff9547f639 Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@qt.io> Reviewed-by: Kai Koehne <kai.koehne@qt.io>
This commit is contained in:
parent
71e36a42f2
commit
a96656a8fb
47
config.tests/win/angle_d3d11_qdtd/angle_d3d11_qdtd.cpp
Normal file
47
config.tests/win/angle_d3d11_qdtd/angle_d3d11_qdtd.cpp
Normal file
@ -0,0 +1,47 @@
|
||||
/****************************************************************************
|
||||
**
|
||||
** Copyright (C) 2017 The Qt Company Ltd.
|
||||
** Contact: https://www.qt.io/licensing/
|
||||
**
|
||||
** This file is part of the config.tests of the Qt Toolkit.
|
||||
**
|
||||
** $QT_BEGIN_LICENSE:LGPL$
|
||||
** Commercial License Usage
|
||||
** Licensees holding valid commercial Qt licenses may use this file in
|
||||
** accordance with the commercial license agreement provided with the
|
||||
** Software or, alternatively, in accordance with the terms contained in
|
||||
** a written agreement between you and The Qt Company. For licensing terms
|
||||
** and conditions see https://www.qt.io/terms-conditions. For further
|
||||
** information use the contact form at https://www.qt.io/contact-us.
|
||||
**
|
||||
** GNU Lesser General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU Lesser
|
||||
** General Public License version 3 as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.LGPL3 included in the
|
||||
** packaging of this file. Please review the following information to
|
||||
** ensure the GNU Lesser General Public License version 3 requirements
|
||||
** will be met: https://www.gnu.org/licenses/lgpl-3.0.html.
|
||||
**
|
||||
** GNU General Public License Usage
|
||||
** Alternatively, this file may be used under the terms of the GNU
|
||||
** General Public License version 2.0 or (at your option) the GNU General
|
||||
** Public license version 3 or any later version approved by the KDE Free
|
||||
** Qt Foundation. The licenses are as published by the Free Software
|
||||
** Foundation and appearing in the file LICENSE.GPL2 and LICENSE.GPL3
|
||||
** included in the packaging of this file. Please review the following
|
||||
** information to ensure the GNU General Public License requirements will
|
||||
** be met: https://www.gnu.org/licenses/gpl-2.0.html and
|
||||
** https://www.gnu.org/licenses/gpl-3.0.html.
|
||||
**
|
||||
** $QT_END_LICENSE$
|
||||
**
|
||||
****************************************************************************/
|
||||
|
||||
#include <D3D11.h>
|
||||
|
||||
int main(int, char**)
|
||||
{
|
||||
D3D11_QUERY_DATA_TIMESTAMP_DISJOINT qdtd;
|
||||
(void)qdtd;
|
||||
return 0;
|
||||
}
|
3
config.tests/win/angle_d3d11_qdtd/angle_d3d11_qdtd.pro
Normal file
3
config.tests/win/angle_d3d11_qdtd/angle_d3d11_qdtd.pro
Normal file
@ -0,0 +1,3 @@
|
||||
SOURCES = angle_d3d11_qdtd.cpp
|
||||
CONFIG -= qt
|
||||
CONFIG += console
|
@ -20,7 +20,7 @@ typedef struct D3D11_QUERY_DATA_SO_STATISTICS {
|
||||
} D3D11_QUERY_DATA_SO_STATISTICS;
|
||||
#endif // ANGLE_MINGW32_COMPAT
|
||||
|
||||
#ifdef __MINGW32__
|
||||
#ifndef ANGLE_D3D11_QDTD_AVAILABLE
|
||||
typedef struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT {
|
||||
UINT64 Frequency;
|
||||
BOOL Disjoint;
|
||||
|
@ -0,0 +1,32 @@
|
||||
From 640361e72369d612270c6e59126019c917e33c9a Mon Sep 17 00:00:00 2001
|
||||
From: Oliver Wolff <oliver.wolff@qt.io>
|
||||
Date: Fri, 28 Jul 2017 09:02:50 +0200
|
||||
Subject: [PATCH] ANGLE: Use ANGLE_D3D11_QDTD_AVAILABLE to check struct's
|
||||
availability
|
||||
|
||||
Checking mingw when defining the structure is not enough, as it is
|
||||
available in recent versions of MinGW. The define that is used is set
|
||||
depending on a configure test which works independently of the used
|
||||
toolchain.
|
||||
|
||||
Change-Id: Ia9cb48f3e673841101a93cbc8ea23aff9547f639
|
||||
---
|
||||
src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp
|
||||
index 972c289..97c65e1 100644
|
||||
--- a/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp
|
||||
+++ b/src/3rdparty/angle/src/libANGLE/renderer/d3d/d3d11/Query11.cpp
|
||||
@@ -20,7 +20,7 @@ typedef struct D3D11_QUERY_DATA_SO_STATISTICS {
|
||||
} D3D11_QUERY_DATA_SO_STATISTICS;
|
||||
#endif // ANGLE_MINGW32_COMPAT
|
||||
|
||||
-#ifdef __MINGW32__
|
||||
+#ifndef ANGLE_D3D11_QDTD_AVAILABLE
|
||||
typedef struct D3D11_QUERY_DATA_TIMESTAMP_DISJOINT {
|
||||
UINT64 Frequency;
|
||||
BOOL Disjoint;
|
||||
--
|
||||
2.10.2.windows.1
|
||||
|
@ -23,6 +23,11 @@ for(libname, STATICLIBS) {
|
||||
DEFINES += LIBANGLE_IMPLEMENTATION LIBGLESV2_IMPLEMENTATION GL_APICALL= GL_GLEXT_PROTOTYPES= EGLAPI=
|
||||
!winrt: DEFINES += ANGLE_ENABLE_D3D9 ANGLE_SKIP_DXGI_1_2_CHECK
|
||||
|
||||
QT_FOR_CONFIG += gui-private
|
||||
include($$OUT_PWD/../../../gui/qtgui-config.pri)
|
||||
|
||||
qtConfig(angle_d3d11_qdtd): DEFINES += ANGLE_D3D11_QDTD_AVAILABLE
|
||||
|
||||
HEADERS += \
|
||||
$$ANGLE_DIR/src/common/mathutil.h \
|
||||
$$ANGLE_DIR/src/common/blocklayout.h \
|
||||
|
@ -591,6 +591,11 @@
|
||||
},
|
||||
|
||||
"tests": {
|
||||
"angle_d3d11_qdtd": {
|
||||
"label": "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT",
|
||||
"type": "compile",
|
||||
"test": "win/angle_d3d11_qdtd"
|
||||
},
|
||||
"directwrite2": {
|
||||
"label": "DirectWrite 2",
|
||||
"type": "compile",
|
||||
@ -842,6 +847,11 @@
|
||||
{ "type": "define", "name": "QT_OPENGL_ES_2_ANGLE" }
|
||||
]
|
||||
},
|
||||
"angle_d3d11_qdtd": {
|
||||
"label": "D3D11_QUERY_DATA_TIMESTAMP_DISJOINT",
|
||||
"condition": "features.angle && tests.angle_d3d11_qdtd",
|
||||
"output": [ "privateFeature" ]
|
||||
},
|
||||
"combined-angle-lib": {
|
||||
"label": "Combined ANGLE Library",
|
||||
"autoDetect": false,
|
||||
|
Loading…
Reference in New Issue
Block a user