[vlc-devel] [3.0 4/6] d3d11_fmt: keep the modified build number once and for all
Steve Lhomme
robux4 at ycbcr.xyz
Mon Jul 30 12:27:58 CEST 2018
(cherry picked from commit 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 18d9345f00..36e31379f7 100644
--- a/modules/video_chroma/d3d11_fmt.c
+++ b/modules/video_chroma/d3d11_fmt.c
@@ -203,6 +203,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
}
@@ -372,13 +377,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)
@@ -402,9 +400,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;
--
2.17.0
More information about the vlc-devel
mailing list