[vlc-commits] qt: don't load DComp backend when the device doesn't support D3D11 features

Pierre Lamot git at videolan.org
Thu Aug 20 10:20:52 CEST 2020


vlc | branch: master | Pierre Lamot <pierre at videolabs.io> | Thu Jun 18 16:07:34 2020 +0200| [deb7c732eac7766c42d7e2b7d26d1611437671cd] | committer: Pierre Lamot

qt: don't load DComp backend when the device doesn't support D3D11 features

> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=deb7c732eac7766c42d7e2b7d26d1611437671cd
---

 modules/gui/qt/maininterface/compositor_dcomp.cpp | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/modules/gui/qt/maininterface/compositor_dcomp.cpp b/modules/gui/qt/maininterface/compositor_dcomp.cpp
index 69b4145498..23b0612a9e 100644
--- a/modules/gui/qt/maininterface/compositor_dcomp.cpp
+++ b/modules/gui/qt/maininterface/compositor_dcomp.cpp
@@ -157,13 +157,18 @@ bool CompositorDirectComposition::init()
         //| D3D11_CREATE_DEVICE_DEBUG
             ;
 
+    D3D_FEATURE_LEVEL requestedFeatureLevels[] = {
+        D3D_FEATURE_LEVEL_11_1,
+        D3D_FEATURE_LEVEL_11_0,
+    };
+
     hr = D3D11CreateDevice(
         nullptr,    // Adapter
         D3D_DRIVER_TYPE_HARDWARE,
         nullptr,    // Module
         creationFlags,
-        nullptr,
-        0, // Highest available feature level
+        requestedFeatureLevels,
+        ARRAY_SIZE(requestedFeatureLevels),
         D3D11_SDK_VERSION,
         m_d3d11Device.GetAddressOf(),
         nullptr,    // Actual feature level



More information about the vlc-commits mailing list