From 8038ab679b714faa6b6e3329e0768e94ccd4cff9 Mon Sep 17 00:00:00 2001 From: Steve Lhomme Date: Tue, 12 Sep 2017 08:24:08 +0200 Subject: [PATCH] direct3d11: fix the AMD driver bug detection P010 is displayed fine with the 22.19.162.xxx drivers Signed-off-by: Jean-Baptiste Kempf --- 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.11.4.GIT