mpv-player/mpv

[vo/gpu-next/d3d11] Failed to create Direct3D 11 device

Obegg opened this issue · 5 comments

Obegg commented

Important Information

Provide following Information:

  • mpv version
mpv 0.35.0-339-gd1d0b1a8 Copyright © 2000-2023 mpv/MPlayer/mplayer2 projects
 built on Tue Mar 28 12:41:04 2023
libplacebo version: v5.264.0-85-g0f36b01
FFmpeg version: N-110105-g9bf1848ac
FFmpeg library versions:
   libavutil       58.5.100
   libavcodec      60.7.100
   libavformat     60.4.100
   libswscale      7.2.100
   libavfilter     9.5.100
   libswresample   4.11.100
  • Windows Version
Edition	Windows 10 Pro
Version	22H2
Installed on	‎19/‎03/‎2023
OS build	19045.2728
Experience	Windows Feature Experience Pack 120.2212.4190.0

Reproduction steps

mpv --no-config --fs --log-file=Example1-0005.txt --gpu-debug --vo=gpu-next Example1-0005.m2ts

Expected behavior

mpv able to use d3d11

Actual behavior

[   0.121][v][vo/gpu-next] Probing for best GPU context.
[   0.121][v][vo/gpu-next/d3d11] Initializing GPU context 'd3d11'
[   0.689][d][vo/gpu-next/d3d11] Failed to create 12_0+ device, trying 11_1
[   1.249][d][vo/gpu-next/d3d11] Failed to create 11_1+ device, trying 11_0
[   1.810][d][vo/gpu-next/d3d11] Failed to create hardware device, trying WARP
[   1.812][d][vo/gpu-next/d3d11] Failed to create 12_0+ device, trying 11_1
[   1.813][d][vo/gpu-next/d3d11] Failed to create 11_1+ device, trying 11_0
[   1.814][f][vo/gpu-next/d3d11] Failed to create Direct3D 11 device: The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887a002d)
[   1.814][v][vo/gpu-next/opengl] Initializing GPU context 'angle'
[   1.814][v][vo/gpu-next] Failed to load LIBEGL.DLL
[   1.815][v][vo/gpu-next/opengl] Initializing GPU context 'win'
[   1.880][v][vo/gpu-next] GL_VERSION='4.6.0 NVIDIA 531.41'
[   1.880][v][vo/gpu-next] Detected desktop OpenGL 4.6.
[   1.880][v][vo/gpu-next] GL_VENDOR='NVIDIA Corporation'

Log file

Example1-0005.txt

[   1.814][f][vo/gpu-next/d3d11] Failed to create Direct3D 11 device: The application requested an operation that depends on an SDK component that is missing or mismatched. (0x887a002d)

Install SDK with debug layers or remove --gpu-debug.

We probably should make DXGI_ERROR_SDK_COMPONENT_MISSING non critical error.

jeeb commented

User has explicitly requested gpu-debug, so IMHO that request should be honored. I don't think a user would expect to not get debugging enabled if it was explicitly requested.

Of course, the thing that is missing here is a proper error message if the failure is due to debug layers missing, that's why this bug report was done.

haasn commented

Status quo from the vulkan context is to print a warning and fallback with debugging disabled.

Status quo from the vulkan context is to print a warning and fallback with debugging disabled.

It brings two implementation consistent to each other, I prefer warning approach. It is what libplacebo does for d3d11 and Vulkan, and what mpv does for Vulkan.

It is valid argument that enabling debug is optional, but IMHO hard error doesn't work really, it is hidden anyway, because we fallback to opengl if d3d11 fails. So fallbacking to d3d11 without debug first makes sense instead of going to opengl.

jeeb commented

Even with fallback, just having it fail once with a proper message would make sense. Since the only reason this bug was reported because it was not clear why the d3d11 feature downgrades did not succeed.

But geez, if vulkan does that 🤦 ... I guess consistency is the first step. Main thing being that there is a message and that it is clear.