From b858e7af4fefeed051f5a7e0795872fd1b834220 Mon Sep 17 00:00:00 2001 From: Andrew Knight Date: Tue, 2 Sep 2014 15:04:43 +0300 Subject: windows: Enable ANGLE D3D11 renderer by default Also, remove the -angle-d3d11 configure option, as it no longer is necessary to select the renderer at build time. The D3D11 renderer is the default renderer in upstream ANGLE, and has been shown to be a more reliable solution for developers running over remote desktop and inside virtual machines. It also provides more features to the OpenGL ES implementation. This configuration switch does not disable the D3D9 render; if the GPU does not support D3D11, D3D9 is used instead. [ChangeLog][QtGui][Windows] The ANGLE D3D11 renderer was enabled by default. Systems which cannot use the new renderer will automatically fall back to the D3D9 renderer at runtime. Task-number: QTBUG-41031 Change-Id: If894309c07d9309c236b63c36f37679f74375133 Reviewed-by: Friedemann Kleint Reviewed-by: Laszlo Agocs Reviewed-by: Tim Jenssen --- src/angle/angle.pro | 3 +-- src/angle/src/config.pri | 2 ++ tools/configure/configureapp.cpp | 15 +++------------ 3 files changed, 6 insertions(+), 14 deletions(-) diff --git a/src/angle/angle.pro b/src/angle/angle.pro index 78b53dfa14..c454fee8f9 100644 --- a/src/angle/angle.pro +++ b/src/angle/angle.pro @@ -6,6 +6,5 @@ SUBDIRS += src # 2) If we made a 'QtANGLE' module, the include directory would be flattened which won't work since # we need to support "#include " CONFIG += minimal_syncqt -QMAKE_SYNCQT_OPTIONS = -module QtANGLE/KHR -module QtANGLE/EGL -module QtANGLE/GLES2 -version none -angle_d3d11: QMAKE_SYNCQT_OPTIONS += -module QtANGLE/GLES3 +QMAKE_SYNCQT_OPTIONS = -module QtANGLE/KHR -module QtANGLE/EGL -module QtANGLE/GLES2 -module QtANGLE/GLES3 -version none load(qt_module_headers) diff --git a/src/angle/src/config.pri b/src/angle/src/config.pri index 88c65802de..07a18620da 100644 --- a/src/angle/src/config.pri +++ b/src/angle/src/config.pri @@ -39,6 +39,8 @@ DEFINES += _WINDOWS \ !winrt: DEFINES += ANGLE_ENABLE_D3D9 ANGLE_SKIP_DXGI_1_2_CHECK +CONFIG += angle_d3d11 # Remove to disable D3D11 renderer + angle_d3d11 { DEFINES += ANGLE_ENABLE_D3D11 ANGLE_DEFAULT_D3D11=1 !build_pass: message("Enabling D3D11 mode for ANGLE") diff --git a/tools/configure/configureapp.cpp b/tools/configure/configureapp.cpp index 3471ed78ae..ddfb1d955b 100644 --- a/tools/configure/configureapp.cpp +++ b/tools/configure/configureapp.cpp @@ -566,9 +566,6 @@ void Configure::parseCmdLine() else if (configCmdLine.at(i) == "-angle") { dictionary[ "ANGLE" ] = "yes"; dictionary[ "ANGLE_FROM" ] = "commandline"; - } else if (configCmdLine.at(i) == "-angle-d3d11") { - dictionary[ "ANGLE" ] = "d3d11"; - dictionary[ "ANGLE_FROM" ] = "commandline"; } else if (configCmdLine.at(i) == "-no-angle") { dictionary[ "ANGLE" ] = "no"; dictionary[ "ANGLE_FROM" ] = "commandline"; @@ -1640,7 +1637,7 @@ void Configure::applySpecSpecifics() dictionary[ "ICU" ] = "qt"; dictionary[ "CE_CRT" ] = "yes"; dictionary[ "LARGE_FILE" ] = "no"; - dictionary[ "ANGLE" ] = "d3d11"; + dictionary[ "ANGLE" ] = "yes"; dictionary[ "DYNAMICGL" ] = "no"; } else if (dictionary.value("XQMAKESPEC").startsWith("wince")) { dictionary[ "STYLE_WINDOWSXP" ] = "no"; @@ -1931,7 +1928,6 @@ bool Configure::displayHelp() } desc("ANGLE", "yes", "-angle", "Use the ANGLE implementation of OpenGL ES 2.0."); - desc("ANGLE", "d3d11", "-angle-d3d11", "Use the Direct3D 11-based ANGLE implementation of OpenGL ES 2.0."); desc("ANGLE", "no", "-no-angle", "Do not use ANGLE.\nSee http://code.google.com/p/angleproject/\n"); // Qt\Windows only options go below here -------------------------------------------------------------------------------- desc("\nQt for Windows only:\n\n"); @@ -2124,7 +2120,7 @@ bool Configure::checkAngleAvailability(QString *errorMessage /* = 0 */) const } } - const QString directXLibrary = dictionary["ANGLE"] == "d3d11" ? QStringLiteral("d3d11.lib") : QStringLiteral("d3d9.lib"); + const QString directXLibrary = QStringLiteral("d3d11.lib"); // Ensures at least the June 2010 DXSDK is present if (!findFile(directXLibrary)) { if (errorMessage) *errorMessage = QString::fromLatin1("The library '%1' could not be found.").arg(directXLibrary); @@ -2577,8 +2573,7 @@ bool Configure::verifyConfiguration() } if (dictionary["DYNAMICGL"] == "yes") { - // Note that d3d11 is still allowed for ANGLE, hence the check for == "yes". - if (dictionary["OPENGL_ES_2"] == "yes" || dictionary["ANGLE"] == "yes") { + if (dictionary["OPENGL_ES_2"] == "yes" || dictionary["ANGLE"] != "no") { cout << "ERROR: Dynamic OpenGL cannot be used with -angle." << endl; dictionary[ "DONE" ] = "error"; } @@ -2660,15 +2655,11 @@ void Configure::generateOutputVars() // ANGLE -------------------------------------------------------- if (dictionary[ "ANGLE" ] != "no") { qtConfig += "angle"; - if (dictionary[ "ANGLE" ] == "d3d11") - qmakeConfig += "angle_d3d11"; } // Dynamic OpenGL loading --------------------------------------- if (dictionary[ "DYNAMICGL" ] != "no") { qtConfig += "dynamicgl"; - if (dictionary[ "ANGLE" ] == "d3d11") - qmakeConfig += "angle_d3d11"; } // Image formates ----------------------------------------------- -- cgit v1.2.3