From nobody Mon Jul 01 08:18:34 2024 X-Original-To: dev-commits-ports-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4WCJpL5Dybz5Pqrs; Mon, 01 Jul 2024 08:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WCJpL2CLRz4y0M; Mon, 1 Jul 2024 08:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719821914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7I2R2He4a/hd0F7YXzI2OGrXkko1vKROiduTcYKROvo=; b=bKTzHRU2gmj5FBToVSxGb7X38Fl6yasaz/qdgnKeRPZwB4N7qy5aeBwF7HyQaLPmf5EdPY gwlvADAanRmuTJ8vORtf+MPIr8Tt/yRglzqI/v+fnBfp5GEgmI7EtYoIxNvJ3H1YmRkTLd hY9/kD56I9ylmZ38yo21dbp0poxwkd25m2UCPvRnakbwjgJxgGacJh7XjlJ51VyjUuQxh/ g+JCU6OuFQEUFQsScLLABOlxlv31XRS4XlMCYI1kP4QeFedaXmFIBKFxLCeHTJ6tE1XTTv y87/joiUgGvMkaXX9o9oeBaXadDHEatWIFYk6DJY9uhiSeS6ijIrrlVxrZcH5w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1719821914; a=rsa-sha256; cv=none; b=M9uQh/IQbQtdJ05/ObSeS5oGpdZdSoT9Uk1E9rEY77vXmQofHzWOytvsE4vEjklRhbuvFh U2p+4c+CJ+6Caq/Bz499y0Q7lxFtOfHDrLnqXDeHoXO+0S5B6AO3w6d0Zal/G+B45JDP9v J7p22Oe9BPhPdmD1wMJlj00yvK2aDHIbJiFwfoxeaO6NL5z8HlfLt73tqXU2/YMb1/GHT/ U2zVIaBVfvRJvoh3nAmvgT0y9HkgJjZXNzbx/MgxIV8cxPoA56iIAXcsmmE6xu2h5SA1yS 7vMb3xxIEPpq/yJ38rNVd2guhgT17AbbvoVNp6sm8KSUj9uBBkDqCA1B+ykoPQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1719821914; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=7I2R2He4a/hd0F7YXzI2OGrXkko1vKROiduTcYKROvo=; b=LMzP1UofU5euINGKIEnLqBh06DQs6pYLVmZ+ojoeI1KmfEUVQ1JEDRkZBReL7KOIVf+Joa LkJum4FU8Vk4txq6+t8xi7Baz1lWBw6FfvcCdOsW7j+p7vPuYIetw7irz5zqeo/96kHK7b JSgj1tmG4YZQFx1CvRjl5eXVS819kaxO9jGrPGpVhtV6BntTkZmRJgdv8PJVspyhXi7/dX n0SmwqX9fvAW8eLpPsa8jrwv8bASFqLJE98oPyiHMxkyQe/xpQCpOLELiNtWMUfD7E2oGG bxBpYvEbq5bLOi9cIIhGNFXdl9TvIm472YVq/M1xZyALhvk7xKoxMSSYQV6YZw== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4WCJpL1qRrzxj7; Mon, 1 Jul 2024 08:18:34 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 4618IYWK069350; Mon, 1 Jul 2024 08:18:34 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 4618IYUI069347; Mon, 1 Jul 2024 08:18:34 GMT (envelope-from git) Date: Mon, 1 Jul 2024 08:18:34 GMT Message-Id: <202407010818.4618IYUI069347@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Emmanuel Vadot Subject: git: efb0c89e59bd - main - graphics/mesa-dri: Convert gallium and vulkan driver to port options List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-ports-main@freebsd.org Sender: owner-dev-commits-ports-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: manu X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: efb0c89e59bd2768d97c23ad1efe9c37e33b11fb Auto-Submitted: auto-generated The branch main has been updated by manu: URL: https://cgit.FreeBSD.org/ports/commit/?id=efb0c89e59bd2768d97c23ad1efe9c37e33b11fb commit efb0c89e59bd2768d97c23ad1efe9c37e33b11fb Author: Emmanuel Vadot AuthorDate: 2024-06-27 06:27:30 +0000 Commit: Emmanuel Vadot CommitDate: 2024-07-01 08:17:57 +0000 graphics/mesa-dri: Convert gallium and vulkan driver to port options Instead of selecting the one by arches add options. This will help users who doesn't want some features. The default are still the same based on the specific arch. No functional changes intended. Differential Revision: https://reviews.freebsd.org/D45754 Inspired by: graphics/mesa-devel Reviewed by: bapt Sponsored by: Beckhoff Automation GmbH & Co. KG --- graphics/mesa-dri/Makefile | 92 +++++++++++++++++++++++++-------------------- graphics/mesa-dri/pkg-plist | 38 +++++++++---------- 2 files changed, 71 insertions(+), 59 deletions(-) diff --git a/graphics/mesa-dri/Makefile b/graphics/mesa-dri/Makefile index b0f9f3699612..6d62a6bd913e 100644 --- a/graphics/mesa-dri/Makefile +++ b/graphics/mesa-dri/Makefile @@ -1,6 +1,6 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ @@ -10,14 +10,8 @@ LIB_DEPENDS+= libglapi.so:graphics/mesa-libs USES+= llvm:lib,noexport -OPTIONS_GROUP= PLATFORM -OPTIONS_GROUP_PLATFORM= X11 WAYLAND -X11_DESC= Enable X11 support for GBM/EGL -WAYLAND_DESC= Enable Wayland support for GBM/EGL and Vulkan -WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols -WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland - OPTIONS_DEFINE= ZSTD +OPTIONS_GROUP= GALLIUM PLATFORM VULKAN OPTIONS_DEFAULT= WAYLAND X11 ZSTD OPTIONS_SUB= yes @@ -25,32 +19,52 @@ ZSTD_DESC= Use ZSTD for shader cache ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd ZSTD_MESON_ENABLED= zstd +OPTIONS_GROUP_PLATFORM= X11 WAYLAND +X11_DESC= Enable X11 support for GBM/EGL +WAYLAND_DESC= Enable Wayland support for GBM/EGL and Vulkan +WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols +WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland + +OPTIONS_GROUP_GALLIUM= crocus i915 iris panfrost r300 r600 radeonsi svga swrast zink +GALLIUM_DESC= Unified OpenGL drivers +crocus_DESC= Intel GPU Gen4 (Broadwater) to Gen7 (Haswell) +i915_DESC= Intel GPU Gen3 (Grantsdale to Pineview) +iris_DESC= Intel GPU Gen8 (Broadwell) and newer +panfrost_DESC= ARM Midgard and Bifrost +r300_DESC= AMD/ATI R300, R400 and R500 +r600_DESC= AMD/ATI R600, R700, Evergreen, Northern Islands +radeonsi_DESC= AMD/ATI Southern Islands and newer +svga_DESC= VMWare Virtual GPU +swrast_DESC= Software Rasterizer +zink_DESC= OpenGL on top of Khronos’ Vulkan API + +OPTIONS_EXCLUDE+= ${ARCH:Marmv7:C/.+/crocus i915 iris panfrost r300 r600 radeonsi svga zink/} +OPTIONS_EXCLUDE+= ${ARCH:Naarch64:C/.+/panfrost/} +OPTIONS_EXCLUDE+= ${ARCH:Namd64:Ni386:Nx86_64:C/.+/crocus i915 iris svga/} +MESON_ARGS+= -Dgallium-drivers=${GALLIUM_DRIVERS:ts,} +. for _gd in ${OPTIONS_GROUP_GALLIUM} +OPTIONS_DEFAULT+= ${_gd} +${_gd}_VARS+= GALLIUM_DRIVERS+=${_gd} +. endfor + +OPTIONS_GROUP_VULKAN= anv radv swrast_vk +VULKAN_DESC= Vulkan drivers +anv_DESC= Intel GPU Gen9 and newer Vulkan support +radv_DESC= AMD/ATI Southern Islands and newer Vulkan support +radv_BUILD_DEPENDS= glslangValidator:graphics/glslang +swrast_vk_DESC= Software Rasterizer Vulkan support + +OPTIONS_EXCLUDE+= ${ARCH:Marmv7:C/.+/anv radv/} +OPTIONS_EXCLUDE+= ${ARCH:Namd64:Ni386:Nx86_64:C/.+/anv/} +MESON_ARGS+= -Dvulkan-drivers=${VULKAN_DRIVERS:ts,} +. for _vd in ${OPTIONS_GROUP_VULKAN} +OPTIONS_DEFAULT+= ${_vd} +${_vd}_VARS+= VULKAN_DRIVERS+=${_vd:S/anv/intel/:S/radv/amd/:S/swrast_vk/swrast/} +. endfor + .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" -ALL_GALLIUM_DRIVERS= CROCUS I915 IRIS PANFROST R300 R600 RADEONSI SVGA \ - SWRAST ZINK -ALL_VULKAN_DRIVERS= INTEL AMD SWRAST - -GALLIUM_DRIVERS+= SWRAST \ - ZINK -VULKAN_DRIVERS+= SWRAST # lavapipe - -.if ${ARCH} == aarch64 -GALLIUM_DRIVERS+= PANFROST -.endif - -.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == i386 \ - || ${ARCH:Mpowerpc*} || ${ARCH} == riscv64 -GALLIUM_DRIVERS+= R300 R600 RADEONSI -VULKAN_DRIVERS+= AMD -BUILD_DEPENDS+= glslangValidator:graphics/glslang -.endif -.if ${ARCH} == amd64 || ${ARCH} == i386 -GALLIUM_DRIVERS+= CROCUS I915 IRIS SVGA -VULKAN_DRIVERS+= INTEL -.endif - LDFLAGS_i386= -Wl,-znotext .if ${PORT_OPTIONS:MX11} @@ -64,9 +78,7 @@ MESON_ARGS+= -Dxlib-lease=disabled MESA_PLATFORMS+= wayland .endif -MESON_ARGS+= -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \ - -Dvulkan-drivers="${VULKAN_DRIVERS:ts,:tl}" \ - -Dplatforms="${MESA_PLATFORMS:ts,:tl}" +MESON_ARGS+= -Dplatforms="${MESA_PLATFORMS:ts,:tl}" # Vulkan Video extensions (keep in sync with mesa-gallium-va) MESON_ARGS+= -Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc,av1dec,av1enc,vp9dec" @@ -85,20 +97,20 @@ MESON_ARGS+= -Dandroid-libbacktrace=disabled \ -Dosmesa=false \ -Dvalgrind=disabled -.for _gd in ${ALL_GALLIUM_DRIVERS} +.for _gd in ${OPTIONS_GROUP_GALLIUM} . if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}} -PLIST_SUB+= ${_gd}_GDRIVER="" +PLIST_SUB+= ${_gd}="" . else -PLIST_SUB+= ${_gd}_GDRIVER="@comment " +PLIST_SUB+= ${_gd}="@comment " . endif .endfor PLIST_SUB += ARCH=${ARCH:S/amd/x86_/} -.for _vd in ${ALL_VULKAN_DRIVERS} +.for _vd in ${OPTIONS_GROUP_VULKAN} . if defined(VULKAN_DRIVERS) && ${VULKAN_DRIVERS:M${_vd}} -PLIST_SUB+= ${_vd}_VDRIVER="" +PLIST_SUB+= ${_vd}="" . else -PLIST_SUB+= ${_vd}_VDRIVER="@comment " +PLIST_SUB+= ${_vd}="@comment " . endif .endfor diff --git a/graphics/mesa-dri/pkg-plist b/graphics/mesa-dri/pkg-plist index 1dbaa3607221..5c06f06c0b75 100644 --- a/graphics/mesa-dri/pkg-plist +++ b/graphics/mesa-dri/pkg-plist @@ -21,18 +21,18 @@ include/GL/internal/dri_interface.h @comment include/GLES3/gl3platform.h @comment include/KHR/khrplatform.h @comment include/gbm.h -%%CROCUS_GDRIVER%%lib/dri/crocus_dri.so -%%I915_GDRIVER%%lib/dri/i915_dri.so -%%IRIS_GDRIVER%%lib/dri/iris_dri.so -%%PANFROST_GDRIVER%%lib/dri/panfrost_dri.so -%%PANFROST_GDRIVER%%lib/dri/rockchip_dri.so -%%SWRAST_GDRIVER%%lib/dri/kms_swrast_dri.so -%%R300_GDRIVER%%lib/dri/r300_dri.so -%%R600_GDRIVER%%lib/dri/r600_dri.so -%%RADEONSI_GDRIVER%%lib/dri/radeonsi_dri.so -%%SWRAST_GDRIVER%%lib/dri/swrast_dri.so -%%SVGA_GDRIVER%%lib/dri/vmwgfx_dri.so -%%ZINK_GDRIVER%%lib/dri/zink_dri.so +%%crocus%%lib/dri/crocus_dri.so +%%i915%%lib/dri/i915_dri.so +%%iris%%lib/dri/iris_dri.so +%%panfrost%%lib/dri/panfrost_dri.so +%%panfrost%%lib/dri/rockchip_dri.so +%%r300%%lib/dri/r300_dri.so +%%r600%%lib/dri/r600_dri.so +%%radeonsi%%lib/dri/radeonsi_dri.so +%%svga%%lib/dri/vmwgfx_dri.so +%%swrast%%lib/dri/kms_swrast_dri.so +%%swrast%%lib/dri/swrast_dri.so +%%zink%%lib/dri/zink_dri.so @comment lib/libEGL.so @comment lib/libEGL.so.1 @comment lib/libEGL.so.1.0.0 @@ -48,17 +48,17 @@ include/GL/internal/dri_interface.h @comment lib/libGLESv2.so @comment lib/libGLESv2.so.2 @comment lib/libGLESv2.so.2.0.0 -%%INTEL_VDRIVER%%lib/libvulkan_intel.so -%%AMD_VDRIVER%%lib/libvulkan_radeon.so -%%SWRAST_VDRIVER%%lib/libvulkan_lvp.so +%%anv%%lib/libvulkan_intel.so +%%radv%%lib/libvulkan_radeon.so +%%swrast_vk%%lib/libvulkan_lvp.so libdata/pkgconfig/dri.pc @comment libdata/pkgconfig/egl.pc @comment libdata/pkgconfig/gbm.pc @comment libdata/pkgconfig/glesv1_cm.pc @comment libdata/pkgconfig/glesv2.pc share/drirc.d/00-mesa-defaults.conf -%%AMD_VDRIVER%%share/drirc.d/00-radv-defaults.conf +%%radv%%share/drirc.d/00-radv-defaults.conf share/drirc.d/01-freebsd.conf -%%INTEL_VDRIVER%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json -%%AMD_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json -%%SWRAST_VDRIVER%%share/vulkan/icd.d/lvp_icd.%%ARCH%%.json +%%anv%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json +%%radv%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json +%%swrast_vk%%share/vulkan/icd.d/lvp_icd.%%ARCH%%.json