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

Steve Lhomme robux4 at videolabs.io
Tue Sep 12 08:24:08 CEST 2017


P010 is displayed fine with the 22.19.162.xxx drivers
---
 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");
-- 
2.12.1



More information about the vlc-devel mailing list