summaryrefslogtreecommitdiffstats
path: root/src/plugins/platforms/windows/qwindowsopengltester.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Windows QPA: Fix clang warnings about repetitive type namesFriedemann Kleint2019-06-131-1/+1
| | | | | | | | | | Fix warning like: warning: use auto when initializing with new/reinterpret_cast to avoid duplicating the type name [modernize-use-auto] Change-Id: Ieb7f052919173f6923e68de9f9e849dee45e36e7 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Replace Q_DISABLE_COPY by Q_DISABLE_COPY_MOVEFriedemann Kleint2019-05-241-1/+1
| | | | | | | | | | | Fix clang warnings like: warning: class 'QWindowsStaticOpenGLContext' defines a default destructor, a copy constructor and a copy assignment operator but does not define a move constructor or a move assignment operator [cppcoreguidelines-special-member-functions Change-Id: I736d20476ef407100b6ecb654d1112106e545758 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Prefix textstream operators with Qt::Lars Knoll2019-05-021-4/+4
| | | | | | | As the non prefixed variants are deprecated Change-Id: I2ba09d71b9cea5203b54297a3f2332e6d44fedcf Reviewed-by: Allan Sandfeld Jensen <allan.jensen@qt.io>
* Windows QPA: Output all adapters in diagnostics used by qtdiagFriedemann Kleint2019-03-141-41/+91
| | | | | | | | | | | | Split up the code detecting the GPUs into small helpers. Add a QDirect3D9Handle class providing Direct3D9 functionality, add GpuDescription::detectAll() and add a QVariantList "gpuList" property to the native interface. Task-number: QTBUG-50371 Task-number: QTBUG-65882 Change-Id: I8673542d327837babc2ad8f507da76e8ff5524ea Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows/Direct2d QPA: Use nullptrFriedemann Kleint2019-01-281-11/+11
| | | | | Change-Id: I6ce01caa58de78e0eb61e243ee1e7b05cc1f5568 Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Windows QPA: Don't test for Desktop GL if Qt::AA_UseDesktopOpenGL is setFriedemann Kleint2018-09-281-16/+12
| | | | | | | | | Pass the requested render to detectSupportedRenderers(), replacing the bool glesOnly parameters. This allows for simplifying the code. Fixes: QTBUG-70733 Change-Id: Iab65f62d24bf750019180e3b00e2d23c105e5997 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Windows: Disable shader disk cache for Intel HD Graphics 620Friedemann Kleint2018-09-111-0/+4
| | | | | | | | | | Set Qt::AA_DisableShaderDiskCache when the feature "disable_program_cache" (modeled after the Chromium driver bug list) is present and set it for the Intel HD Graphics 620 card. Task-number: QTBUG-64697 Change-Id: Ibba588d2ab296b5c959ab8ee9712b47ec7cc906e Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io>
* Windows QPA: Force windows to the main screen in certain AMD GPU setupsAndre de la Rocha2018-08-231-10/+52
| | | | | | | | | | | | A multi-screen setup with an AMD adapter set as the 'main display' leads to using the AMD drivers for OpenGL. This then causes a crash when calling SetPixelFormat and similar for windows located on another adapter's screen. This workaround detects the conditions leading to the crash and moves the window to the main display. Task-number: QTBUG-50371 Change-Id: I4007c490bdcdc13d6e8bce82983b150aa4930338 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* Merge remote-tracking branch 'origin/5.11' into devLiang Qi2018-07-021-9/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/plugins/platforms/cocoa/qnsview.mm src/plugins/platforms/cocoa/qnsview_dragging.mm src/plugins/platforms/ios/qiosinputcontext.mm src/plugins/platforms/xcb/qxcbconnection.cpp src/plugins/platforms/xcb/qxcbconnection_xi2.cpp src/plugins/platforms/xcb/qxcbwindow.cpp src/tools/androiddeployqt/main.cpp Was moved from qttools into qtbase in 5.11. So re-apply 32398e4d here. tests/auto/corelib/global/qlogging/test/test.pro tests/auto/corelib/global/qlogging/tst_qlogging.cpp tests/auto/corelib/io/qfile/tst_qfile.cpp tests/auto/corelib/kernel/qtimer/tst_qtimer.cpp tests/auto/corelib/thread/qthreadstorage/test/test.pro tests/auto/widgets/itemviews/qheaderview/tst_qheaderview.cpp tests/auto/widgets/kernel/qapplication/test/test.pro Done-with: Gatis Paeglis <gatis.paeglis@qt.io> Done-with: Mårten Nordheim <marten.nordheim@qt.io> Done-with: Oliver Wolff <oliver.wolff@qt.io> Change-Id: Id970486c5315a1718c540f00deb2633533e8fc7b
| * Windows QPA/GL: Fix build with MinGW/g++ 8.1 x64Friedemann Kleint2018-06-261-9/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix warnings about invalid function type casts (return types conflicting with the PROC returned by wglGetProcAddress()) like: qwindowsglcontext.cpp:1250:138: error: cast between incompatible function types from 'PROC' {aka 'long long int (*)()'} to 'GLenum (*)()' {aka 'unsigned int (*)()'} [-Werror=cast-function-type] m_getGraphicsResetStatus = (GLenum (APIENTRY *)()) QOpenGLStaticContext::opengl32.wglGetProcAddress("glGetGraphicsResetStatusARB"); by introducing nested casts. Task-number: QTBUG-68742 Task-number: QTQAINFRA-2095 Change-Id: I7c51836f2b9f7e2a6fa17c5108d59b23c42fb99d Reviewed-by: Ville Voutilainen <ville.voutilainen@qt.io>
* | Windows QPA: Fix Qt include statementsFriedemann Kleint2018-05-231-9/+9
|/ | | | | | | | | | | | Change #include <QtCore/QDebug> to #include <QtCore/qdebug.h> according to the coding style. Change-Id: I6ba8a7424c548ddde1d18f3f6f4f87e30973d710 Reviewed-by: Joerg Bornemann <joerg.bornemann@qt.io>
* qwindowsopengltester.cpp: Fix -Wclazy-strict-iteratorsFriedemann Kleint2017-12-121-1/+1
| | | | | Change-Id: Id22096197aa5bf406ea1f072e8b5ca2a90578eec Reviewed-by: Oliver Wolff <oliver.wolff@qt.io>
* Merge remote-tracking branch 'origin/5.7' into devEdward Welbourne2016-07-191-4/+5
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/library/qmakebuiltins.cpp qmake/library/qmakeevaluator.cpp qmake/library/qmakeevaluator.h qmake/project.h QMakeEvaluator: * evaluateConditional(): one side changed return type, the other changed a parameter type. * split_value_list(): one side changed a parameter adjacent to where ... * expandVariableReferences(): ... the other killed one overload and changed the survivor src/corelib/io/qlockfile_unix.cpp One side changed a #if condition, the other moved NETBSD's part of what it controlled. src/corelib/tools/qdatetime.cpp One side fixed a reachable Q_UNREACHABLE in toMSecsSinceEpoch(), the other moved it from the private class to the public one, in the midst of the "short date-time" optimization, which confused diff entirely. One side changed a QStringLiteral to QLatin1String, the other rewrote adjoining code. src/network/kernel/qauthenticator.cpp Both rewrote a line, equivalently; kept the dev version. src/platformsupport/fontdatabases/mac/qfontengine_coretext.mm src/platformsupport/fontdatabases/mac/qfontengine_coretext_p.h One side changed #if-ery that the other removed. tools/configure/configureapp.cpp One side added a check to -target parsing; the other killed -target. tests/auto/testlib/selftests/expected_cmptest.lightxml tests/auto/testlib/selftests/expected_cmptest.teamcity tests/auto/testlib/selftests/expected_cmptest.txt tests/auto/testlib/selftests/expected_cmptest.xml tests/auto/testlib/selftests/expected_cmptest.xunitxml Regenerated using generate_expected_output.py I note that quite a few other expected_* come out changed, now. There was no git-conflict in src/widgets/kernel/qformlayout.cpp but it didn't compile; one side removed some unused methods; the other found uses for one of them. Put FixedColumnMatrix<>::removeRow(int) back for its new user. Change-Id: I8cc2a71add48c0a848e13cfc47b5a7754e8ca584
| * QWindowsOpenGLTester: fall back to built-in blacklist if buglist file cannot ↵Tim Blechmann2016-07-121-4/+5
| | | | | | | | | | | | | | | | | | | | | | be resolved if the environment variable is set, but the buglist file cannot be found, we should fall back to the built-in buglist instead of not using any. Change-Id: I370a1f21238efd155b46f0e7071734f5d3c6c343 Reviewed-by: Laszlo Agocs <laszlo.agocs@qt.io> Reviewed-by: Friedemann Kleint <Friedemann.Kleint@qt.io>
* | Windows QPA: Remove Windows CE.Friedemann Kleint2016-03-291-28/+8
|/ | | | | | Task-number: QTBUG-51673 Change-Id: I5b58a7d1651fce7f868a4d3fdd8fa46f35e67695 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.6' into 5.7Liang Qi2016-02-241-8/+7
|\ | | | | | | | | | | | | | | | | | | | | Conflicts: src/android/jar/src/org/qtproject/qt5/android/QtActivityDelegate.java src/plugins/platforms/windows/qwindowsfontengine.cpp src/plugins/platforms/windows/qwindowsnativeimage.cpp tests/auto/gui/kernel/qwindow/BLACKLIST tests/auto/gui/kernel/qwindow/tst_qwindow.cpp Change-Id: I649b32b260ce0ed2d6a5089021daa0d6a8db85f7
| * Windows QPA: Fix warnings as shown by Qt Creator's Clang based code model.Friedemann Kleint2016-02-191-8/+7
| | | | | | | | | | | | | | | | Code except font, accessibility and file qwindowswindow.cpp. Task-number: QTBUG-50804 Change-Id: I40848264f9fa16eea00cf70d7be009c484c49e92 Reviewed-by: Oliver Wolff <oliver.wolff@theqtcompany.com>
* | Updated license headersJani Heikkinen2016-01-151-14/+20
|/ | | | | | | | | | | From Qt 5.7 -> LGPL v2.1 isn't an option anymore, see http://blog.qt.io/blog/2016/01/13/new-agreement-with-the-kde-free-qt-foundation/ Updated license headers to use new LGPL header instead of LGPL21 one (in those files which will be under LGPL v3) Change-Id: I046ec3e47b1876cd7b4b0353a576b352e3a946d9 Reviewed-by: Lars Knoll <lars.knoll@theqtcompany.com>
* Windows Open GL blacklist: Introduce keyword "disable_rotation".Friedemann Kleint2015-11-271-1/+4
| | | | | | | | | | | Add a flag to disable rotation to the Renderers enumeration of QWindowsOpenGLTester triggered by the keyword "disable_rotation". Specifying this keyword forces the application to landscape mode for Desktop GL. It is intended for drivers that have issues with rotation. Task-number: QTBUG-49541 Change-Id: I0f0bb7415c59e98648be09b34a59dd201d52b211 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows QPA: Fix debug operators.Friedemann Kleint2015-10-271-0/+2
| | | | | | | | | | Enclose all debug operators within QT_NO_DEBUG_STREAM, declare all public ones and make the others static. Add operators for POINT and WINDOWPLACEMENT. Task-number: QTBUG-48449 Change-Id: I33f2dba2bf486a8f5cb11f11f4e2b37cce086def Reviewed-by: Joerg Bornemann <joerg.bornemann@theqtcompany.com>
* Merge remote-tracking branch 'origin/5.5' into 5.6Liang Qi2015-10-021-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: qmake/doc/src/qmake-manual.qdoc src/corelib/tools/qstring.h src/gui/image/qimagereader.cpp src/network/access/qnetworkaccessmanager.cpp src/tools/qdoc/doc/examples/examples.qdoc src/widgets/accessible/qaccessiblewidgetfactory_p.h src/widgets/doc/qtwidgets.qdocconf Change-Id: I8fae62283aebefe24e5ca4b4abd97386560c0fcb
| * Fix compilation with QT_NO_[DEBUG|WARNING]_OUTPUTKai Koehne2015-09-211-2/+2
| | | | | | | | | | Change-Id: I4b92ac6b917c9979449b4834764497003d6de087 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Merge remote-tracking branch 'origin/5.5' into HEADSimon Hausmann2015-07-171-1/+1
|\| | | | | | | | | | | | | Conflicts: src/plugins/platforms/windows/qwindowsopengltester.cpp Change-Id: Ia7abeba9395ccf84e2fa81b91a5725a86dedb9fe
| * Fix broken gpu blacklist matching in the windows pluginLaszlo Agocs2015-07-161-1/+1
| | | | | | | | | | | | Task-number: QTBUG-46868 Change-Id: I70db75291d17dbb2c4db4cfed6c31dc48ab398d7 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* | Add support for driver_description and os.release in GPU blacklistsLaszlo Agocs2015-06-261-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | os.version is the kernel version which is just not very useful or easy to use for us. Instead, introduce a string that allows easy differentiation between Windows 7 and 8. From the adapter identifier the driver description is often helpful too, especially in virtual machines. These allow writing rules like: { "description": "Use WARP in some Win 8 and 8.1 VMs", "os": { "type": "win", "release": [ "8", "8.1" ] }, "driver_description": "VMware SVGA 3D", "features": [ "disable_desktopgl", "disable_d3d9", "disable_d3d11" ] } Change-Id: I196f6b44d7bb9e42ef47f61f4c28d8aa79afb7c4 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Revert "windows: Disable D3D9/11 with ANGLE in VMs"Laszlo Agocs2015-06-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit a6000e2b6679d91c9dab44e49b485de6816372bc. Temporarily remove this to unblock the qtdeclarative dev CI. While Windows 8 VMs are fixed by this patch, Windows 7 has different problems. Change-Id: I45ef064ed953cc4b7bbf19657300d4fc43d82452 Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | Prospective fix to unbreak qtdeclarative testsSimon Hausmann2015-06-201-4/+4
| | | | | | | | | | | | | | | | | | | | | | Since commit a6000e2b6679d91c9dab44e49b485de6816372bc tests run in the CI now disable D3D11 and are intended to fall back to warp. This causes additional output, which confuses tests in qtdeclarative that look closely at the output of processes. So let's make these debug messages instead of warnings. Change-Id: I91d2f88c66e2e7368c8cbbfb3aec7ad0c47b8bee Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* | windows: Disable D3D9/11 with ANGLE in VMsLaszlo Agocs2015-06-191-1/+1
|/ | | | | | | | | | | | | | | | By adding support for the driver description, we can detect if we are in VMware. In this case D3D9 and 11 get disabled, so only the software-based options are in use. This allows running autotests like tst_qopengl, tst_qopenglwidget, tst_qgl, etc. in the Qt CI system. There OpenGL 2.x is not available, so ANGLE is the only option. D3D11 is not an option, so it picks D3D9 by default. However, this results in mystic failures. The stable solution seems to be to use WARP. This can be achieved by setting disable_d3d9 in the built-in GPU blacklist. Change-Id: I937c4b3fa82fc1a2d524b4eb712732722df2070c Reviewed-by: Simon Hausmann <simon.hausmann@theqtcompany.com>
* Add matching by GL_VENDOR to QOpenGLConfigLaszlo Agocs2015-04-161-4/+1
| | | | | | | | This will be essential on Linux, especially Embedded where PCI IDs are not that useful. Change-Id: I2fa8ca07236e8aae203e21fe629d12aab092c7fd Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Fix QT_NO_OPENGL buildKai Koehne2015-03-311-7/+12
| | | | | Change-Id: Ieb99dce5389c37fb28a28691c75bf879740398e1 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* windows: Introduce a built-in GPU blacklistLaszlo Agocs2015-03-111-32/+40
| | | | | | | | | | | | | | | | | | | | | | | Use a built-in JSON file in case the QT_OPENGL_BUGLIST environment variable is not set. When QT_OPENGL_BUGLIST is set, the built-in list is ignored. To make the implementation simpler and more readable, some of the code in QWindowsOpenGLTester is reshuffled a bit. It also caches the results now, so it is safe and fast to call supportedRenderers() and friends multiple times. The blacklist currently contains the Intel card from QTBUG-43263 (Intel GMA / HD3000 ?) and may also apply to QTBUG-42240. [ChangeLog][QtGui] Qt now contains a built-in GPU driver blacklist for Windows that disables the usage of desktop OpenGL with some older cards that are known to be unstable with opengl32.dll. Task-number: QTBUG-42240 Task-number: QTBUG-43263 Change-Id: I1ecd65b51fca77925317d52048e7ab01d9b8797c Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Add support for GPU bug list reading.Friedemann Kleint2015-02-141-0/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Add support for reading out feature lists from GPU bug lists in Chromium format (supporting OS + version, exceptions lists, device ids and vendor ids). Add a overloads allowing for passing file name, data or JSON documents. - Test reading in tst_qopenglconfig - Prototypically have the Windows plugin read the file from the environment variable "QT_OPENGL_BUGLIST" and turn off renderers depending on the standard keyword "disable_d3d11" and newly introduced keywords "disable_d3d9", "disable_desktopgl". - QT_OPENGL_BUGLIST can point to an absolute or relative path, in which case it is resolved via QLibraryInfo::SettingsPath and QStandardPaths::ConfigLocation. [ChangeLog][QtGui][Windows] Introduce experimental feature allowing the user to specify a GPU driver buglist with some additional keywords to chooose the GL renderer backend depending on GPU. Task-number: QTBUG-43263 Change-Id: I8c20b0e8ee3cf575b91d0672bf405c42d3e9fb64 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Use QVersionNumber in GPU driver version.Friedemann Kleint2015-02-141-48/+12
| | | | | | | | Remove custom class. Task-number: QTBUG-43263 Change-Id: I3399f86bbbe287560917ccda00334e348ac7da4c Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update copyright headersJani Heikkinen2015-02-111-7/+7
| | | | | | | | | | | | | | | | | | Qt copyrights are now in The Qt Company, so we could update the source code headers accordingly. In the same go we should also fix the links to point to qt.io. Outdated header.LGPL removed (use header.LGPL21 instead) Old header.LGPL3 renamed to header.LGPL3-COMM to match actual licensing combination. New header.LGPL-COMM taken in the use file which were using old header.LGPL3 (src/plugins/platforms/android/extract.cpp) Added new header.LGPL3 containing Commercial + LGPLv3 + GPLv2 license combination Change-Id: I6f49b819a8a20cc4f88b794a8f6726d975e8ffbe Reviewed-by: Matti Paaso <matti.paaso@theqtcompany.com>
* Fall back to ANGLE on OpenGL 1.xLaszlo Agocs2015-01-191-0/+32
| | | | | | | | | | | | | | | Apparently on some cards, that only provide OpenGL 1.4, the check for OpenGL 2 specific functions is not sufficient (presumably some old extensions provide the functions and so the test passes, even though it really shouldn't) To avoid crashing the apps later on, we should check the context version and activate the fall back to ANGLE if it's below 2.0. Task-number: QTBUG-43870 Change-Id: Id0e3d8ad1f632334ba03bbb1a4802413f28436dc Reviewed-by: Friedemann Kleint <Friedemann.Kleint@theqtcompany.com>
* Windows: Add infrastructure to be able to a GL renderer based on GPU.Friedemann Kleint2015-01-151-0/+82
| | | | | | | | | | | Introduce flags for the renderer type and move code to qwindowsopengltester. Introduce QWindowsOpenGLTester::supportedGlesRenderers() where type-dependent checking can be added. Change-Id: I4bbffaf861cb0fdbea0919e081e3626fb5a872de Task-number: QTBUG-43263 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Windows: Add GPU detection.Friedemann Kleint2015-01-151-2/+140
| | | | | | | | | | | | | Compile qwindowsopengltester on all platforms and add struct GpuDescription with detection method based on IDirect3D9 (dynamically loaded). Expose as a QVariantMap-property to QWindowsNativeInterface to be able to access it from qtdiag. Task-number: QTBUG-43263 Change-Id: I3c6cd0bbbe36465e0e05f7064ecfc943d6ea4101 Reviewed-by: Laszlo Agocs <laszlo.agocs@theqtcompany.com>
* Update license headers and add new license filesMatti Paaso2014-09-241-18/+10
| | | | | | | | | - Renamed LICENSE.LGPL to LICENSE.LGPLv21 - Added LICENSE.LGPLv3 - Removed LICENSE.GPL Change-Id: Iec3406e3eb3f133be549092015cefe33d259a3f2 Reviewed-by: Iikka Eklund <iikka.eklund@digia.com>
* Load winsys and gl dynamically in the windows pluginLaszlo Agocs2014-05-221-0/+146
The dynamic builds (-opengl dynamic) are now functional on Windows. In such a build no components in Qt link to any OpenGL libraries directly and qmake will not automatically add any such libraries to the applications' makefiles. Instead, the libraries are chosen and loaded during runtime and applications are expected to use QOpenGLFunctions instead of direct OpenGLfunction calls. Set the environment variable QT_OPENGL to desktop or angle to skip testing and force the given implementation. The application attributes (AA_UseOpenGLES and such) are also taken into account. The testing logic is same as before: We try to load opengl32 and resolve a shader related function. If this fails, ANGLE is chosen. This allows utilizing full desktop OpenGL on systems that have proper drivers, while a transparent fallback to ANGLE will be done automatically for systems that don't. The latter includes also remote desktop connections. Software rendering via Mesa llvmpipe is supported too. The fallback is automatic on systems where the desktop test fails and ANGLE fails to load or initialize (e.g. due to missing libs like d3dcompiler), as long as a suitable patched build of Mesa is available. [ChangeLog][QtGui] Dynamic OpenGL implementation loading is now supported on Windows. This requires Qt to be configured with -opengl dynamic. Task-number: QTBUG-36483 Change-Id: Ie8bb25a6d55b3a1609b00150aeccd909aec27313 Reviewed-by: Friedemann Kleint <Friedemann.Kleint@digia.com>