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

Steve Lhomme git at videolan.org
Mon Jun 25 17:59:04 CEST 2018


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

d3d11_fmt: keep the modified build number once and for all

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

 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 aebf5befe6..a8543b0f57 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -204,6 +204,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
 }
 
@@ -373,13 +378,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)
@@ -403,9 +401,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