[vlc-devel] [PATCH 02/16] qt: don't load DComp backend when the device doesn't support D3D11 features

Pierre Lamot pierre at videolabs.io
Thu Aug 6 09:43:48 CEST 2020


---
 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
-- 
2.25.1



More information about the vlc-devel mailing list