[Interest] How to make WARP as fallback after d3d11 fails

Kai Koehne Kai.Koehne at qt.io
Tue Mar 21 09:09:59 CET 2017


> -----Original Message-----
> From: Interest [mailto:interest-bounces+kai.koehne=qt.io at qt-project.org]
> On Behalf Of Yuchen Deng
> Sent: Tuesday, March 21, 2017 7:14 AM
> To: interest at qt-project.org
> Subject: [Interest] How to make WARP as fallback after d3d11 fails
> hi, everyone, I have a question about OpenGL support on Windows. How can
> I do make WARP as fallback after d3d11 fails. for now it's depends mesa's
> opengl32sw if angle's d3d11 fail.

Hi!

The code that implements this logic is in

qtbase\src\plugins\platforms\windows\qwindowsopengltester.cpp

ook at QWindowsOpenGLTester::requestedRenderer() and QWindowsOpenGLTester::detectSupportedRenderers()

https://code.woboq.org/qt5/qtbase/src/plugins/platforms/windows/qwindowsopengltester.cpp.html#_ZN20QWindowsOpenGLTester17requestedRendererEv

> I know to change the environment variable `set QT_OPENGL=angle` and `set
> QT_ANGLE_PLATFORM=warp` can do that always, but I wanna when d3d11
> fails then set WARP as fallback not depends any environment variable setup.

QWindowsOpenGLTester::detectSupportedRenderers() defines the order in which the different OpenGL ES renderers on Windows are evaluated. It also shows that there is a blacklist feature that disables certain types. So, if you blacklist e.g. D3D9 Qt should directly fall back to D3d11Warp.

https://code.woboq.org/qt5/qtbase/src/plugins/platforms/windows/qwindowsopengltester.cpp.html#_ZN20QWindowsOpenGLTester24detectSupportedRenderersERK14GpuDescriptionb

Hope this helps,

Kai


More information about the Interest mailing list