[vlc-commits] [Git][videolan/vlc][master] d3d11_fmt: don't assert if the driver can't be read the old way

Steve Lhomme (@robUx4) gitlab at videolan.org
Thu Sep 19 08:04:02 UTC 2024



Steve Lhomme pushed to branch master at VideoLAN / VLC


Commits:
9e200111 by Steve Lhomme at 2024-09-19T07:45:58+00:00
d3d11_fmt: don't assert if the driver can't be read the old way

The assert is only useful to check the values match, not that
D3D11_GetSystemDriver() may fail, which happens on Windows ARM.

Fixes #28787

- - - - -


1 changed file:

- modules/video_chroma/d3d11_fmt.cpp


Changes:

=====================================
modules/video_chroma/d3d11_fmt.cpp
=====================================
@@ -301,7 +301,10 @@ static void D3D11_GetDriverVersion(vlc_object_t *obj, d3d11_device_t *d3d_dev, I
     }
     else
     {
-        assert(driver.QuadPart == D3D11_GetSystemDriver(obj, d3d_dev).QuadPart);
+#ifndef NDEBUG
+        const auto check_old_way = D3D11_GetSystemDriver(obj, d3d_dev);
+        assert(driver.QuadPart == check_old_way.QuadPart || check_old_way.QuadPart == 0);
+#endif
     }
 
     wddm         = HIWORD(driver.HighPart);



View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9e200111cc4b4263adf600138dcf16e3c2274a20

-- 
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/9e200111cc4b4263adf600138dcf16e3c2274a20
You're receiving this email because of your account on code.videolan.org.


VideoLAN code repository instance


More information about the vlc-commits mailing list