[vlc-commits] d3d: handle new Intel driver version formats
Steve Lhomme
git at videolan.org
Thu Apr 5 08:47:00 CEST 2018
vlc | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Thu Apr 5 08:37:48 2018 +0200| [704ad60d442661ddab1327b8546e1ce2ceb89bcd] | committer: Steve Lhomme
d3d: handle new Intel driver version formats
aa.bb.16.dddd becomes aa.bb.100.dddd
and after aa.bb.100.9999 comes aa.bb.101.1000
When we need to target higher versions we'll use 101.11000 internally so the
build number can be compared with all formats.
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=704ad60d442661ddab1327b8546e1ce2ceb89bcd
---
modules/video_chroma/d3d11_fmt.c | 11 +++++++++--
modules/video_chroma/d3d9_fmt.c | 6 ++++++
2 files changed, 15 insertions(+), 2 deletions(-)
diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 0932c4228d..9247ac0628 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -375,6 +375,13 @@ int D3D11CheckDriverVersion(d3d11_device_t *d3d_dev, UINT vendorId, const struct
if (vendorId && adapterDesc.VendorId != vendorId)
return VLC_SUCCESS;
+ int build = d3d_dev->WDDM.build;
+ if (adapterDesc.VendorId == GPU_MANUFACTURER_INTEL && d3d_dev->WDDM.revision >= 100)
+ {
+ /* new Intel driver format */
+ build += (d3d_dev->WDDM.revision - 100) * 1000;
+ }
+
if (min_ver->wddm)
{
if (d3d_dev->WDDM.wddm > min_ver->wddm)
@@ -398,9 +405,9 @@ int D3D11CheckDriverVersion(d3d11_device_t *d3d_dev, UINT vendorId, const struct
}
if (min_ver->build)
{
- if (d3d_dev->WDDM.build > min_ver->build)
+ if (build > min_ver->build)
return VLC_SUCCESS;
- else if (d3d_dev->WDDM.build != min_ver->build)
+ else if (build != min_ver->build)
return VLC_EGENERIC;
}
return VLC_SUCCESS;
diff --git a/modules/video_chroma/d3d9_fmt.c b/modules/video_chroma/d3d9_fmt.c
index 73ad2aa55a..a0a0bb12a5 100644
--- a/modules/video_chroma/d3d9_fmt.c
+++ b/modules/video_chroma/d3d9_fmt.c
@@ -273,6 +273,12 @@ int D3D9CheckDriverVersion(d3d9_handle_t *hd3d, d3d9_device_t *d3d_dev,
revision = (int) (identifier.DriverVersion.LowPart >> 16 & 0xFFFF);
build = (int) (identifier.DriverVersion.LowPart >> 0 & 0xFFFF);
+ if (identifier.VendorId == GPU_MANUFACTURER_INTEL && revision >= 100)
+ {
+ /* new Intel driver format */
+ build += (revision - 100) * 1000;
+ }
+
bool newer =
wddm > min_ver->wddm ||
(wddm == min_ver->wddm && (d3d_features > min_ver->d3d_features ||
More information about the vlc-commits
mailing list