[vlc-commits] direct3d11: rework the check on AMD drivers capable to display decoder NV12
Steve Lhomme
git at videolan.org
Fri Jun 21 19:57:15 CEST 2019
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Fri Jun 21 18:04:12 2019 +0200| [94707552e9cbdec41dc1f6c5f432c3d6becbf9db] | committer: Steve Lhomme
direct3d11: rework the check on AMD drivers capable to display decoder NV12
The test allowed either version 20 and above OR version 162 and above.
Both conditions need to be true.
Add more known bad drivers to the documentation.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=94707552e9cbdec41dc1f6c5f432c3d6becbf9db
---
modules/video_output/win32/direct3d11.c | 30 +++++++++++++++++++++---------
1 file changed, 21 insertions(+), 9 deletions(-)
diff --git a/modules/video_output/win32/direct3d11.c b/modules/video_output/win32/direct3d11.c
index ec50ef824c..411860d813 100644
--- a/modules/video_output/win32/direct3d11.c
+++ b/modules/video_output/win32/direct3d11.c
@@ -1082,17 +1082,29 @@ static bool CanUseTextureArray(vout_display_t *vd)
(void) vd;
return false;
#else
- struct wddm_version WDDM = {
- .wddm = 20, // starting with drivers designed for W10
- // 15.200.1062.1004 is wrong - 2015/08/03
- // 22.19.165.3 is good - 2017/05/04
- .revision = 162, // 17.5.1
+ // 15.200.1062.1004 is wrong - 2015/08/03 - 15.7.1 WHQL
+ // 21.19.144.1281 is wrong -
+ // 22.19.165.3 is good - 2017/05/04 - ReLive Edition 17.5.1
+ struct wddm_version WDDM_os = {
+ .wddm = 21, // starting with drivers designed for W10 Anniversary Update
};
- if (D3D11CheckDriverVersion(&vd->sys->d3d_dev, GPU_MANUFACTURER_AMD, &WDDM) == VLC_SUCCESS)
- return true;
+ if (D3D11CheckDriverVersion(&vd->sys->d3d_dev, GPU_MANUFACTURER_AMD, &WDDM_os) != VLC_SUCCESS)
+ {
+ msg_Dbg(vd, "AMD driver too old, fallback to legacy shader mode");
+ return false;
+ }
- msg_Dbg(vd, "fallback to legacy shader mode for old AMD drivers");
- return false;
+ // xx.xx.1000.xxx drivers can't happen here for WDDM > 2.0
+ struct wddm_version WDDM_build = {
+ .revision = 162,
+ };
+ if (D3D11CheckDriverVersion(&vd->sys->d3d_dev, GPU_MANUFACTURER_AMD, &WDDM_build) != VLC_SUCCESS)
+ {
+ msg_Dbg(vd, "Bogus AMD driver detected, fallback to legacy shader mode");
+ return false;
+ }
+
+ return true;
#endif
}
More information about the vlc-commits
mailing list