diff options
author | Mike Lothian <mike@fireburn.co.uk> | 2022-08-05 13:49:36 +0100 |
---|---|---|
committer | Matt Turner <mattst88@gentoo.org> | 2022-09-06 12:03:24 -0400 |
commit | a4ca7cc2d9bc8cb0a253e81632b1a034920cf87e (patch) | |
tree | e3d088eddc692f97335d7bb9990d9b5c9ee8d712 /media-libs/mesa | |
parent | dev-util/directx-headers: Add new ebuild (diff) | |
download | gentoo-a4ca7cc2d9bc8cb0a253e81632b1a034920cf87e.tar.gz gentoo-a4ca7cc2d9bc8cb0a253e81632b1a034920cf87e.tar.bz2 gentoo-a4ca7cc2d9bc8cb0a253e81632b1a034920cf87e.zip |
media-libs/mesa: Add support for d3d12 and dozen drivers
This adds support for the d3d12 gallium driver and the dozen vulkan
driver. It uses the video_cards_microsoft flag
It optionally adds in video acceleration if vaapi or vdpau is enabled
It's been compiled tested with GCC 12.1 & Clang 14
If building mesa with Clang, directx-headers must be build with clang
too, otherwise you'll experience linking errors
Closes: https://github.com/gentoo/gentoo/pull/26746
Signed-off-by: Mike Lothain <mike@fireburn.co.uk>
Signed-off-by: Matt Turner <mattst88@gentoo.org>
Diffstat (limited to 'media-libs/mesa')
-rw-r--r-- | media-libs/mesa/mesa-9999.ebuild | 30 |
1 files changed, 21 insertions, 9 deletions
diff --git a/media-libs/mesa/mesa-9999.ebuild b/media-libs/mesa/mesa-9999.ebuild index 379fc0756847..830e5bfd10f3 100644 --- a/media-libs/mesa/mesa-9999.ebuild +++ b/media-libs/mesa/mesa-9999.ebuild @@ -25,7 +25,7 @@ SLOT="0" RESTRICT="!test? ( test )" RADEON_CARDS="r300 r600 radeon radeonsi" -VIDEO_CARDS="${RADEON_CARDS} freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware" +VIDEO_CARDS="${RADEON_CARDS} d3d12 freedreno intel lima nouveau panfrost v3d vc4 virgl vivante vmware" for card in ${VIDEO_CARDS}; do IUSE_VIDEO_CARDS+=" video_cards_${card}" done @@ -176,6 +176,7 @@ RDEPEND="${RDEPEND} unset {LLVM,CLANG}_DEPSTR{,_AMDGPU} DEPEND="${RDEPEND} + video_cards_d3d12? ( dev-util/directx-headers[${MULTILIB_USEDEP}] ) valgrind? ( dev-util/valgrind ) wayland? ( >=dev-libs/wayland-protocols-1.24 ) X? ( @@ -223,11 +224,12 @@ llvm_check_deps() { pkg_pretend() { if use vulkan; then - if ! use video_cards_freedreno && + if ! use video_cards_d3d12 && + ! use video_cards_freedreno && ! use video_cards_intel && ! use video_cards_radeonsi && ! use video_cards_v3d; then - ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain freedreno, intel, radeonsi, or v3d" + ewarn "Ignoring USE=vulkan since VIDEO_CARDS does not contain d3d12, freedreno, intel, radeonsi, or v3d" fi fi @@ -239,19 +241,21 @@ pkg_pretend() { fi if use vaapi; then - if ! use video_cards_r600 && + if ! use video_cards_d3d12 && + ! use video_cards_r600 && ! use video_cards_radeonsi && ! use video_cards_nouveau; then - ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain r600, radeonsi, or nouveau" + ewarn "Ignoring USE=vaapi since VIDEO_CARDS does not contain d3d12, r600, radeonsi, or nouveau" fi fi if use vdpau; then - if ! use video_cards_r300 && + if ! use video_cards_d3d12 && + ! use video_cards_r300 && ! use video_cards_r600 && ! use video_cards_radeonsi && ! use video_cards_nouveau; then - ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain r300, r600, radeonsi, or nouveau" + ewarn "Ignoring USE=vdpau since VIDEO_CARDS does not contain d3d12, r300, r600, radeonsi, or nouveau" fi fi @@ -329,7 +333,8 @@ multilib_src_configure() { emesonargs+=(-Dgallium-nine=false) fi - if use video_cards_r600 || + if use video_cards_d3d12 || + use video_cards_r600 || use video_cards_radeonsi || use video_cards_nouveau; then emesonargs+=($(meson_feature vaapi gallium-va)) @@ -338,7 +343,12 @@ multilib_src_configure() { emesonargs+=(-Dgallium-va=disabled) fi - if use video_cards_r300 || + if use video_cards_d3d12; then + emesonargs+=($(meson_feature vaapi gallium-d3d12-video)) + fi + + if use video_cards_d3d12 || + use video_cards_r300 || use video_cards_r600 || use video_cards_radeonsi || use video_cards_nouveau; then @@ -375,6 +385,7 @@ multilib_src_configure() { gallium_enable video_cards_freedreno freedreno gallium_enable video_cards_intel crocus i915 iris gallium_enable video_cards_lima lima + gallium_enable video_cards_d3d12 d3d12 gallium_enable video_cards_nouveau nouveau gallium_enable video_cards_panfrost panfrost gallium_enable video_cards_v3d v3d @@ -400,6 +411,7 @@ multilib_src_configure() { if use vulkan; then vulkan_enable video_cards_freedreno freedreno vulkan_enable video_cards_intel intel + vulkan_enable video_cards_d3d12 microsoft-experimental vulkan_enable video_cards_radeonsi amd vulkan_enable video_cards_v3d broadcom fi |