[vlc-commits] direct3d11: fix the AMD driver bug detection

Steve Lhomme git at videolan.org
Wed Sep 13 22:50:51 CEST 2017


vlc | branch: master | Steve Lhomme <robUx4 at videolabs.io> | Tue Sep 12 08:24:08 2017 +0200| [8038ab679b714faa6b6e3329e0768e94ccd4cff9] | committer: Jean-Baptiste Kempf

direct3d11: fix the AMD driver bug detection

P010 is displayed fine with the 22.19.162.xxx drivers

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

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

 modules/video_output/win32/direct3d11.c | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index baeee4f1fc..10f4ffdd34 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -2199,6 +2199,7 @@ static HKEY GetAdapterRegistry(DXGI_ADAPTER_DESC *adapterDesc)
         if( RegOpenKeyEx(HKEY_LOCAL_MACHINE, key, 0, KEY_READ, &hKey) != ERROR_SUCCESS )
             return NULL;
 
+        len = sizeof(szData);
         if( RegQueryValueEx( hKey, TEXT("MatchingDeviceId"), NULL, NULL, (LPBYTE) &szData, &len ) == ERROR_SUCCESS ) {
             if (_tcscmp(lookup, szData) == 0)
                 return hKey;
@@ -2246,8 +2247,8 @@ static bool CanUseTextureArray(vout_display_t *vd)
         int wddm, d3d_features, revision, build;
         /* see https://msdn.microsoft.com/windows/hardware/commercialize/design/compatibility/device-graphics */
         if (_stscanf(szData, TEXT("%d.%d.%d.%d"), &wddm, &d3d_features, &revision, &build) == 4)
-            /* it should be OK starting from driver 22.19.128.xxx */
-            return wddm > 22 || (wddm == 22 && (d3d_features > 19 || (d3d_features == 19 && revision >= 128)));
+            /* it should be OK starting from driver 22.19.162.xxx */
+            return wddm > 22 || (wddm == 22 && (d3d_features > 19 || (d3d_features == 19 && revision >= 162)));
     }
 #endif
     msg_Dbg(vd, "fallback to legacy shader mode for old AMD drivers");



More information about the vlc-commits mailing list