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 <Friedemann.Kleint@digia.com> Reviewed-by: Laszlo Agocs <laszlo.agocs@digia.com> Reviewed-by: Tim Jenssen <tim.jenssen@digia.com>
This commit is contained in:
parent
2eb61feb9b
commit
b858e7af4f
@ -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 <GLES2/gl2.h>"
|
||||
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)
|
||||
|
@ -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")
|
||||
|
@ -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 -----------------------------------------------
|
||||
|
Loading…
x
Reference in New Issue
Block a user