[vlc-commits] direct3d11: try higher feature levels

Steve Lhomme git at videolan.org
Sun Apr 17 10:44:42 CEST 2016


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Sat Apr 16 18:47:34 2016 +0300| [5b3c74474379e60ced5a8384dbd51b4443e84ad6] | committer: Jean-Baptiste Kempf

direct3d11: try higher feature levels

Signed-off-by: Jean-Baptiste Kempf <jb at videolan.org>

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

 modules/video_output/msw/direct3d11.c |   13 ++++++++-----
 1 file changed, 8 insertions(+), 5 deletions(-)

diff --git a/modules/video_output/msw/direct3d11.c b/modules/video_output/msw/direct3d11.c
index cd710ea..417f4b8 100644
--- a/modules/video_output/msw/direct3d11.c
+++ b/modules/video_output/msw/direct3d11.c
@@ -891,13 +891,15 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
     IDXGIAdapter *dxgiadapter;
     static const D3D_FEATURE_LEVEL featureLevels[] =
     {
+        0xc000 /* D3D_FEATURE_LEVEL_12_1 */,
+        0xc100 /* D3D_FEATURE_LEVEL_12_0 */,
         D3D_FEATURE_LEVEL_11_1,
         D3D_FEATURE_LEVEL_11_0,
         D3D_FEATURE_LEVEL_10_1,
         D3D_FEATURE_LEVEL_10_0,
         D3D_FEATURE_LEVEL_9_3,
         D3D_FEATURE_LEVEL_9_2,
-        D3D_FEATURE_LEVEL_9_1
+        D3D_FEATURE_LEVEL_9_1,
     };
 
 # if USE_DXGI
@@ -956,14 +958,15 @@ static int Direct3D11Open(vout_display_t *vd, video_format_t *fmt)
     };
 
     for (UINT driver = 0; driver < ARRAYSIZE(driverAttempts); driver++) {
+        D3D_FEATURE_LEVEL i_feature_level;
         hr = D3D11CreateDevice(NULL, driverAttempts[driver], NULL, creationFlags,
-                    featureLevels, ARRAY_SIZE(featureLevels), D3D11_SDK_VERSION,
-                    &sys->d3ddevice, NULL, &sys->d3dcontext);
+                    featureLevels, 9, D3D11_SDK_VERSION,
+                    &sys->d3ddevice, &i_feature_level, &sys->d3dcontext);
         if (SUCCEEDED(hr)) {
 #ifndef NDEBUG
-            msg_Dbg(vd, "Created the D3D11 device 0x%p ctx 0x%p type %d.",
+            msg_Dbg(vd, "Created the D3D11 device 0x%p ctx 0x%p type %d level %d.",
                     (void *)sys->d3ddevice, (void *)sys->d3dcontext,
-                    driverAttempts[driver]);
+                    driverAttempts[driver], i_feature_level);
 #endif
             break;
         }



More information about the vlc-commits mailing list