[vlc-commits] d3d11_fmt: keep the modified build number once and for all

Steve Lhomme git at videolan.org
Tue Aug 7 09:12:58 CEST 2018


vlc/vlc-3.0 | branch: master | Steve Lhomme <robux4 at ycbcr.xyz> | Mon Jun 25 17:32:08 2018 +0200| [6e842859cd4439864656655a35bd7ac860da8147] | committer: Steve Lhomme

d3d11_fmt: keep the modified build number once and for all

(cherry picked from commit 6dd231f7e007a93dace97b45cc5d015b5ebed929)

> http://git.videolan.org/gitweb.cgi/vlc/vlc-3.0.git/?a=commit;h=6e842859cd4439864656655a35bd7ac860da8147
---

 modules/video_chroma/d3d11_fmt.c | 16 +++++++---------
 1 file changed, 7 insertions(+), 9 deletions(-)

diff --git a/modules/video_chroma/d3d11_fmt.c b/modules/video_chroma/d3d11_fmt.c
index 1eb44fe148..18738c5bd8 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -208,6 +208,11 @@ void D3D11_GetDriverVersion(vlc_object_t *obj, d3d11_device_t *d3d_dev)
     d3d_dev->WDDM.revision     = revision;
     d3d_dev->WDDM.build        = build;
     msg_Dbg(obj, "%s WDDM driver %d.%d.%d.%d", DxgiVendorStr(adapterDesc.VendorId), wddm, d3d_features, revision, build);
+    if (adapterDesc.VendorId == GPU_MANUFACTURER_INTEL && revision >= 100)
+    {
+        /* new Intel driver format */
+        d3d_dev->WDDM.build += (revision - 100) * 1000;
+    }
 #endif
 }
 
@@ -392,13 +397,6 @@ 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)
@@ -422,9 +420,9 @@ int D3D11CheckDriverVersion(d3d11_device_t *d3d_dev, UINT vendorId, const struct
     }
     if (min_ver->build)
     {
-        if (build > min_ver->build)
+        if (d3d_dev->WDDM.build > min_ver->build)
             return VLC_SUCCESS;
-        else if (build != min_ver->build)
+        else if (d3d_dev->WDDM.build != min_ver->build)
             return VLC_EGENERIC;
     }
     return VLC_SUCCESS;



More information about the vlc-commits mailing list