[vlc-commits] [Git][videolan/vlc][3.0.x] d3d11_fmt: allow using the vout pool for NVIDIA with recent enough drivers
Steve Lhomme (@robUx4)
gitlab at videolan.org
Mon Oct 5 12:23:00 UTC 2026
Steve Lhomme pushed to branch 3.0.x at VideoLAN / VLC
Commits:
20efb561 by Steve Lhomme at 2026-10-05T12:13:19+00:00
d3d11_fmt: allow using the vout pool for NVIDIA with recent enough drivers
The crash when calling CreateVideoDecoderOutputView() with a slice 30
or more was fixed in driver 31.0.15.2647 and onwards. We can avoid
this hack and work like the other GPU's.
Fixes #30187 for recent drivers as use the right amount of required
slices.
We also remove isNvidiaHardware() which calls IDXGIAdapter_GetDesc()
when in fact we always provide a valid adapterDesc in d3d11_device_t.
- - - - -
1 changed file:
- modules/video_chroma/d3d11_fmt.c
Changes:
=====================================
modules/video_chroma/d3d11_fmt.c
=====================================
@@ -418,20 +418,6 @@ bool isXboxHardware(const d3d11_device_t *d3ddev)
return result;
}
-static bool isNvidiaHardware(ID3D11Device *d3ddev)
-{
- IDXGIAdapter *p_adapter = D3D11DeviceAdapter(d3ddev);
- if (!p_adapter)
- return false;
-
- DXGI_ADAPTER_DESC adapterDesc;
- if (FAILED(IDXGIAdapter_GetDesc(p_adapter, &adapterDesc)))
- adapterDesc.VendorId = 0;
- IDXGIAdapter_Release(p_adapter);
-
- return adapterDesc.VendorId == GPU_MANUFACTURER_NVIDIA;
-}
-
bool CanUseVoutPool(d3d11_device_t *d3d_dev, UINT slices)
{
#if VLC_WINSTORE_APP
@@ -439,9 +425,24 @@ bool CanUseVoutPool(d3d11_device_t *d3d_dev, UINT slices)
* which is always smaller, we still get direct rendering from the decoder */
return false;
#else
+ if (slices <= 30 || d3d_dev->adapterDesc.VendorId != GPU_MANUFACTURER_NVIDIA)
+ return true;
+
/* NVIDIA cards crash when calling CreateVideoDecoderOutputView
- * on more than 30 slices */
- return slices <= 30 || !isNvidiaHardware(d3d_dev->d3ddevice);
+ * on more than 30 slices
+ * 31.0.15.2225 is wrong - 2022/10/06 - 522.25 WHQL
+ * 31.0.15.2647 is good - 2022/10/25 - 526.47 WHQL
+ */
+ struct wddm_version WDDM_os = {
+ .wddm = 31,
+ .d3d_features = 0,
+ .revision = 15,
+ .build = 2647,
+ };
+ if (D3D11CheckDriverVersion(d3d_dev, GPU_MANUFACTURER_NVIDIA, &WDDM_os) != VLC_SUCCESS)
+ return false;
+
+ return true;
#endif
}
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/20efb561c6f59fb653bc76e62cab787d91db2060
--
View it on GitLab: https://code.videolan.org/videolan/vlc/-/commit/20efb561c6f59fb653bc76e62cab787d91db2060
You're receiving this email because of your account on code.videolan.org. Manage all notifications: https://code.videolan.org/-/profile/notifications | Help: https://code.videolan.org/help
More information about the vlc-commits
mailing list