Skip to content

d3d12: Make video an optional feature with a meson option

Since the d3d12 video implementation requires directx-headers >= 1.602.0, update the dependency. It will now try to resolve the latest DirectX-Headers dependency by default.

image

Also let's make d3d12 video an optional feature with a meson option which can be controlled by the build arguments for environments where d3d12 driver without video support is not necessary/video frontends are not available.

Tested building mesa with the following configs variations on meson described below.

When d3d12 is on galium-drivers list:

Builds d3d12 without video source files and doesn't generate the target file as a video driver (VDPAU/VA) when:

  • -gallium-d3d12-video=disabled

Clones DirectX-Headers in main branch as a subproject on the latest version and enables d3d12 video:

  • -gallium-d3d12-video=auto with directx-headers-dev < 1.602.0
  • -gallium-d3d12-video=enabled with directx-headers-dev < 1.602.0
  • Without specifying -gallium-d3d12-video with directx-headers-dev < 1.602.0

Builds d3d12 and enables video entrypoints as expected when:

  • -gallium-d3d12-video=enabled with directx-headers-dev >= 1.602.0
  • -gallium-d3d12-video=auto with directx-headers-dev >= 1.602.0
  • Without specifying -gallium-d3d12-video with directx-headers-dev >= 1.602.0

When d3d12 is non on the gallium-drivers list:

Option is ignored when:

  • -gallium-d3d12-video=disabled
  • -gallium-d3d12-video=auto
  • Without specifying -gallium-d3d12-video
  • d3d12 not in gallium drivers and gallium-d3d12-video=enabled
Edited by Sil Vilerino

Merge request reports