mirror of
https://git.freebsd.org/ports.git
synced 2025-07-18 01:39:16 -04:00
graphics/mesa: update to 23.1.8
While here: - Remove some unneeded dep in gallium-vdpau - Disable libelf from devel/elfutils (we will fallback on base libelf), PR 273803 - Always disable libunwind, if you want stacktrace you will need to compile from upstream PR: 250306 - enable vulkan haswell driver Co-authored-by: manu, vishwin PR: 273703, 273803, 250306
This commit is contained in:
parent
1be2fde36f
commit
29d855b6f7
17 changed files with 90 additions and 389 deletions
|
@ -8,10 +8,9 @@ WWW= https://www.mesa3d.org/
|
||||||
LICENSE= MIT
|
LICENSE= MIT
|
||||||
LICENSE_FILE= ${WRKSRC}/docs/license.rst
|
LICENSE_FILE= ${WRKSRC}/docs/license.rst
|
||||||
|
|
||||||
LIB_DEPENDS+= libLLVM-${LLVM_DEFAULT}.so:devel/llvm${LLVM_DEFAULT} \
|
LIB_DEPENDS+= libglapi.so:graphics/mesa-libs
|
||||||
libglapi.so:graphics/mesa-libs
|
|
||||||
|
|
||||||
USES= xorg
|
USES= llvm:lib,noexport xorg
|
||||||
USE_XORG= xorgproto
|
USE_XORG= xorgproto
|
||||||
USE_LDCONFIG= yes
|
USE_LDCONFIG= yes
|
||||||
|
|
||||||
|
@ -19,10 +18,10 @@ USE_LDCONFIG= yes
|
||||||
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
||||||
|
|
||||||
# Disable some options
|
# Disable some options
|
||||||
MESON_ARGS+= -Ddri-drivers="" \
|
MESON_ARGS+= -Dgallium-drivers="swrast" \
|
||||||
-Dgallium-drivers="swrast" \
|
|
||||||
-Dvulkan-drivers="" \
|
-Dvulkan-drivers="" \
|
||||||
-Dplatforms="" \
|
-Dplatforms="" \
|
||||||
|
-Dandroid-libbacktrace=disabled \
|
||||||
-Dgallium-vdpau=disabled \
|
-Dgallium-vdpau=disabled \
|
||||||
-Dgallium-omx=disabled \
|
-Dgallium-omx=disabled \
|
||||||
-Dgallium-va=disabled \
|
-Dgallium-va=disabled \
|
||||||
|
@ -31,12 +30,15 @@ MESON_ARGS+= -Ddri-drivers="" \
|
||||||
-Dgallium-nine=false \
|
-Dgallium-nine=false \
|
||||||
-Dgles1=disabled \
|
-Dgles1=disabled \
|
||||||
-Dgles2=disabled \
|
-Dgles2=disabled \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
-Dmicrosoft-clc=disabled \
|
-Dmicrosoft-clc=disabled \
|
||||||
-Dopengl=true \
|
-Dopengl=true \
|
||||||
-Dglx=disabled \
|
-Dglx=disabled \
|
||||||
-Degl=disabled \
|
-Degl=disabled \
|
||||||
-Dgbm=disabled \
|
-Dgbm=disabled \
|
||||||
-Dtools="" \
|
-Dtools="" \
|
||||||
|
-Dvalgrind=disabled \
|
||||||
|
-Dxlib-lease=disabled \
|
||||||
-Dzstd=disabled
|
-Dzstd=disabled
|
||||||
LDFLAGS_i386= -Wl,-znotext
|
LDFLAGS_i386= -Wl,-znotext
|
||||||
|
|
||||||
|
|
|
@ -1,13 +1,13 @@
|
||||||
PORTNAME= mesa-dri
|
PORTNAME= mesa-dri
|
||||||
PORTVERSION= ${MESAVERSION}
|
PORTVERSION= ${MESAVERSION}
|
||||||
PORTREVISION= 3
|
|
||||||
CATEGORIES= graphics
|
CATEGORIES= graphics
|
||||||
|
|
||||||
COMMENT= OpenGL hardware acceleration drivers for DRI2+
|
COMMENT= OpenGL hardware acceleration drivers for DRI2+
|
||||||
WWW= https://www.mesa3d.org/
|
WWW= https://www.mesa3d.org/
|
||||||
|
|
||||||
LIB_DEPENDS+= libLLVM-${LLVM_DEFAULT}.so:devel/llvm${LLVM_DEFAULT} \
|
LIB_DEPENDS+= libglapi.so:graphics/mesa-libs
|
||||||
libglapi.so:graphics/mesa-libs
|
|
||||||
|
USES+= llvm:lib,noexport
|
||||||
|
|
||||||
OPTIONS_GROUP= PLATFORM
|
OPTIONS_GROUP= PLATFORM
|
||||||
OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND
|
OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND
|
||||||
|
@ -33,7 +33,7 @@ ZSTD_MESON_ENABLED= zstd
|
||||||
|
|
||||||
ALL_GALLIUM_DRIVERS= CROCUS I915 IRIS PANFROST R300 R600 RADEONSI SVGA \
|
ALL_GALLIUM_DRIVERS= CROCUS I915 IRIS PANFROST R300 R600 RADEONSI SVGA \
|
||||||
SWRAST ZINK
|
SWRAST ZINK
|
||||||
ALL_VULKAN_DRIVERS= INTEL AMD SWRAST
|
ALL_VULKAN_DRIVERS= INTEL INTEL_HASVK AMD SWRAST
|
||||||
|
|
||||||
GALLIUM_DRIVERS+= SWRAST \
|
GALLIUM_DRIVERS+= SWRAST \
|
||||||
ZINK
|
ZINK
|
||||||
|
@ -51,7 +51,7 @@ BUILD_DEPENDS+= glslangValidator:graphics/glslang
|
||||||
.endif
|
.endif
|
||||||
.if ${ARCH} == amd64 || ${ARCH} == i386
|
.if ${ARCH} == amd64 || ${ARCH} == i386
|
||||||
GALLIUM_DRIVERS+= CROCUS I915 IRIS SVGA
|
GALLIUM_DRIVERS+= CROCUS I915 IRIS SVGA
|
||||||
VULKAN_DRIVERS+= INTEL
|
VULKAN_DRIVERS+= INTEL INTEL_HASVK
|
||||||
.endif
|
.endif
|
||||||
|
|
||||||
LDFLAGS_i386= -Wl,-znotext
|
LDFLAGS_i386= -Wl,-znotext
|
||||||
|
@ -73,14 +73,18 @@ MESON_ARGS+= -Dgallium-drivers="${GALLIUM_DRIVERS:ts,:tl}" \
|
||||||
-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
|
-Dplatforms="${MESA_PLATFORMS:ts,:tl}"
|
||||||
|
|
||||||
# Disable some options
|
# Disable some options
|
||||||
MESON_ARGS+= -Dgallium-xa=disabled \
|
MESON_ARGS+= -Dandroid-libbacktrace=disabled \
|
||||||
|
-Dgallium-xa=disabled \
|
||||||
-Dgallium-vdpau=disabled \
|
-Dgallium-vdpau=disabled \
|
||||||
-Dgallium-va=disabled \
|
-Dgallium-va=disabled \
|
||||||
-Dgles1=disabled \
|
-Dgles1=enabled \
|
||||||
-Dgles2=disabled \
|
-Dgles2=enabled \
|
||||||
-Dglx=disabled \
|
-Dglx=disabled \
|
||||||
|
-Degl=enabled \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
-Dmicrosoft-clc=disabled \
|
-Dmicrosoft-clc=disabled \
|
||||||
-Dosmesa=false
|
-Dosmesa=false \
|
||||||
|
-Dvalgrind=disabled
|
||||||
|
|
||||||
.for _gd in ${ALL_GALLIUM_DRIVERS}
|
.for _gd in ${ALL_GALLIUM_DRIVERS}
|
||||||
. if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}}
|
. if defined(GALLIUM_DRIVERS) && ${GALLIUM_DRIVERS:M${_gd}}
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
|
MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/}
|
||||||
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
|
MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/}
|
||||||
|
|
||||||
MESABASEVERSION= 22.3.7
|
MESABASEVERSION= 23.1.8
|
||||||
# if there is a subversion, don't include the '-' between 7.11-rc2.
|
# if there is a subversion, don't include the '-' between 7.11-rc2.
|
||||||
MESASUBVERSION=
|
MESASUBVERSION=
|
||||||
|
|
||||||
|
@ -23,6 +23,10 @@ MASTER_SITES= https://mesa.freedesktop.org/archive/ \
|
||||||
|
|
||||||
DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX}
|
DISTFILES= mesa-${MESADISTVERSION}${EXTRACT_SUFX}
|
||||||
|
|
||||||
|
PATCH_SITES= https://gitlab.freedesktop.org/mesa/mesa/-/commit/
|
||||||
|
PATCHFILES+= 9ba416cdc67073cdda9a73fe9d37304b82bdd526.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/issues/8671
|
||||||
|
PATCHFILES+= 4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/26284
|
||||||
|
|
||||||
MAINTAINER= x11@FreeBSD.org
|
MAINTAINER= x11@FreeBSD.org
|
||||||
|
|
||||||
LICENSE= MIT
|
LICENSE= MIT
|
||||||
|
@ -40,14 +44,8 @@ USES+= xorg
|
||||||
.if ${COMPONENT} != osmesa
|
.if ${COMPONENT} != osmesa
|
||||||
LIB_DEPENDS+= libdrm.so:graphics/libdrm
|
LIB_DEPENDS+= libdrm.so:graphics/libdrm
|
||||||
.endif
|
.endif
|
||||||
.if ${ARCH} == aarch64 || ${ARCH} == amd64 || ${ARCH} == armv7 || ${ARCH} == i386 || ${ARCH} == powerpc || ${ARCH} == powerpc64 || ${ARCH} == powerpc64le
|
|
||||||
LIB_DEPENDS+= libunwind.so:devel/libunwind
|
|
||||||
.endif
|
|
||||||
.if ${OPSYS} == DragonFly
|
|
||||||
LIB_DEPENDS+= libelf.so:devel/libelf
|
|
||||||
.endif
|
|
||||||
|
|
||||||
USES+= compiler:c++11-lib bison meson pathfix pkgconfig \
|
USES+= compiler:c++11-lib bison llvm:noexport meson pathfix pkgconfig \
|
||||||
python:build shebangfix tar:xz
|
python:build shebangfix tar:xz
|
||||||
|
|
||||||
.if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
|
.if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
|
||||||
|
@ -82,14 +80,9 @@ PKGDEINSTALL= ${.CURDIR}/pkg-deinstall
|
||||||
|
|
||||||
BINARY_ALIAS+= python3=${PYTHON_VERSION}
|
BINARY_ALIAS+= python3=${PYTHON_VERSION}
|
||||||
|
|
||||||
LLVM_DEFAULT= 15
|
CONFIGURE_ENV+= LLVM_CONFIG=${LLVM_CONFIG}
|
||||||
BUILD_DEPENDS+= llvm-config${LLVM_DEFAULT}:devel/llvm${LLVM_DEFAULT}
|
|
||||||
CONFIGURE_ENV+= LLVM_CONFIG=llvm-config${LLVM_DEFAULT}
|
|
||||||
|
|
||||||
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib
|
LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_VERSION}/lib
|
||||||
MESON_ARGS+= -Dllvm=enabled
|
MESON_ARGS+= -Dllvm=enabled \
|
||||||
|
-Dlibunwind=disabled \
|
||||||
# Some symbols in mesa's linker version scripts are not always defined,
|
-Dlibelf=disabled
|
||||||
# depending on configuration options. Suppress errors with lld >= 17 due to
|
|
||||||
# these undefined symbols.
|
|
||||||
LDFLAGS+= -Wl,--undefined-version
|
|
||||||
|
|
|
@ -1,3 +1,7 @@
|
||||||
TIMESTAMP = 1678348804
|
TIMESTAMP = 1700484156
|
||||||
SHA256 (mesa-22.3.7.tar.xz) = 894ce2f4a1c2e76177cdd2284620192d0da3066b243eec2fbb1d7cf37f13042c
|
SHA256 (mesa-23.1.8.tar.xz) = 45434ff91a709844130a3174d9c0ef39c6b50725b2bb0c13e736f36134db14ad
|
||||||
SIZE (mesa-22.3.7.tar.xz) = 17136476
|
SIZE (mesa-23.1.8.tar.xz) = 18566724
|
||||||
|
SHA256 (9ba416cdc67073cdda9a73fe9d37304b82bdd526.patch) = aac0f0bc9454d177729109103e4e851ee4bc894ba7cc28ea1712ed87b4660e85
|
||||||
|
SIZE (9ba416cdc67073cdda9a73fe9d37304b82bdd526.patch) = 1511
|
||||||
|
SHA256 (4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch) = 84f18f14788bd8f387e2fc754b945bf30f84b517dd917785ed5d8ef1d594e24a
|
||||||
|
SIZE (4a253aae7ca437201d2a31d2a11a1a5434fe41f1.patch) = 1626
|
||||||
|
|
|
@ -1,198 +0,0 @@
|
||||||
--- include/drm-uapi/dma-buf.h.orig 2022-10-14 14:21:26 UTC
|
|
||||||
+++ include/drm-uapi/dma-buf.h
|
|
||||||
@@ -0,0 +1,195 @@
|
|
||||||
+/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
|
|
||||||
+/*
|
|
||||||
+ * Framework for buffer objects that can be shared across devices/subsystems.
|
|
||||||
+ *
|
|
||||||
+ * Copyright(C) 2015 Intel Ltd
|
|
||||||
+ *
|
|
||||||
+ * This program is free software; you can redistribute it and/or modify it
|
|
||||||
+ * under the terms of the GNU General Public License version 2 as published by
|
|
||||||
+ * the Free Software Foundation.
|
|
||||||
+ *
|
|
||||||
+ * This program is distributed in the hope that it will be useful, but WITHOUT
|
|
||||||
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
|
||||||
+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for
|
|
||||||
+ * more details.
|
|
||||||
+ *
|
|
||||||
+ * You should have received a copy of the GNU General Public License along with
|
|
||||||
+ * this program. If not, see <http://www.gnu.org/licenses/>.
|
|
||||||
+ */
|
|
||||||
+
|
|
||||||
+#ifndef _DMA_BUF_UAPI_H_
|
|
||||||
+#define _DMA_BUF_UAPI_H_
|
|
||||||
+
|
|
||||||
+#ifdef __linux__
|
|
||||||
+#include <linux/types.h>
|
|
||||||
+#else
|
|
||||||
+#include <sys/types.h>
|
|
||||||
+
|
|
||||||
+typedef int8_t __s8;
|
|
||||||
+typedef uint8_t __u8;
|
|
||||||
+typedef int16_t __s16;
|
|
||||||
+typedef uint16_t __u16;
|
|
||||||
+typedef int32_t __s32;
|
|
||||||
+typedef uint32_t __u32;
|
|
||||||
+typedef int64_t __s64;
|
|
||||||
+typedef uint64_t __u64;
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * struct dma_buf_sync - Synchronize with CPU access.
|
|
||||||
+ *
|
|
||||||
+ * When a DMA buffer is accessed from the CPU via mmap, it is not always
|
|
||||||
+ * possible to guarantee coherency between the CPU-visible map and underlying
|
|
||||||
+ * memory. To manage coherency, DMA_BUF_IOCTL_SYNC must be used to bracket
|
|
||||||
+ * any CPU access to give the kernel the chance to shuffle memory around if
|
|
||||||
+ * needed.
|
|
||||||
+ *
|
|
||||||
+ * Prior to accessing the map, the client must call DMA_BUF_IOCTL_SYNC
|
|
||||||
+ * with DMA_BUF_SYNC_START and the appropriate read/write flags. Once the
|
|
||||||
+ * access is complete, the client should call DMA_BUF_IOCTL_SYNC with
|
|
||||||
+ * DMA_BUF_SYNC_END and the same read/write flags.
|
|
||||||
+ *
|
|
||||||
+ * The synchronization provided via DMA_BUF_IOCTL_SYNC only provides cache
|
|
||||||
+ * coherency. It does not prevent other processes or devices from
|
|
||||||
+ * accessing the memory at the same time. If synchronization with a GPU or
|
|
||||||
+ * other device driver is required, it is the client's responsibility to
|
|
||||||
+ * wait for buffer to be ready for reading or writing before calling this
|
|
||||||
+ * ioctl with DMA_BUF_SYNC_START. Likewise, the client must ensure that
|
|
||||||
+ * follow-up work is not submitted to GPU or other device driver until
|
|
||||||
+ * after this ioctl has been called with DMA_BUF_SYNC_END?
|
|
||||||
+ *
|
|
||||||
+ * If the driver or API with which the client is interacting uses implicit
|
|
||||||
+ * synchronization, waiting for prior work to complete can be done via
|
|
||||||
+ * poll() on the DMA buffer file descriptor. If the driver or API requires
|
|
||||||
+ * explicit synchronization, the client may have to wait on a sync_file or
|
|
||||||
+ * other synchronization primitive outside the scope of the DMA buffer API.
|
|
||||||
+ */
|
|
||||||
+struct dma_buf_sync {
|
|
||||||
+ /**
|
|
||||||
+ * @flags: Set of access flags
|
|
||||||
+ *
|
|
||||||
+ * DMA_BUF_SYNC_START:
|
|
||||||
+ * Indicates the start of a map access session.
|
|
||||||
+ *
|
|
||||||
+ * DMA_BUF_SYNC_END:
|
|
||||||
+ * Indicates the end of a map access session.
|
|
||||||
+ *
|
|
||||||
+ * DMA_BUF_SYNC_READ:
|
|
||||||
+ * Indicates that the mapped DMA buffer will be read by the
|
|
||||||
+ * client via the CPU map.
|
|
||||||
+ *
|
|
||||||
+ * DMA_BUF_SYNC_WRITE:
|
|
||||||
+ * Indicates that the mapped DMA buffer will be written by the
|
|
||||||
+ * client via the CPU map.
|
|
||||||
+ *
|
|
||||||
+ * DMA_BUF_SYNC_RW:
|
|
||||||
+ * An alias for DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE.
|
|
||||||
+ */
|
|
||||||
+ __u64 flags;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#define DMA_BUF_SYNC_READ (1 << 0)
|
|
||||||
+#define DMA_BUF_SYNC_WRITE (2 << 0)
|
|
||||||
+#define DMA_BUF_SYNC_RW (DMA_BUF_SYNC_READ | DMA_BUF_SYNC_WRITE)
|
|
||||||
+#define DMA_BUF_SYNC_START (0 << 2)
|
|
||||||
+#define DMA_BUF_SYNC_END (1 << 2)
|
|
||||||
+#define DMA_BUF_SYNC_VALID_FLAGS_MASK \
|
|
||||||
+ (DMA_BUF_SYNC_RW | DMA_BUF_SYNC_END)
|
|
||||||
+
|
|
||||||
+#define DMA_BUF_NAME_LEN 32
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * struct dma_buf_export_sync_file - Get a sync_file from a dma-buf
|
|
||||||
+ *
|
|
||||||
+ * Userspace can perform a DMA_BUF_IOCTL_EXPORT_SYNC_FILE to retrieve the
|
|
||||||
+ * current set of fences on a dma-buf file descriptor as a sync_file. CPU
|
|
||||||
+ * waits via poll() or other driver-specific mechanisms typically wait on
|
|
||||||
+ * whatever fences are on the dma-buf at the time the wait begins. This
|
|
||||||
+ * is similar except that it takes a snapshot of the current fences on the
|
|
||||||
+ * dma-buf for waiting later instead of waiting immediately. This is
|
|
||||||
+ * useful for modern graphics APIs such as Vulkan which assume an explicit
|
|
||||||
+ * synchronization model but still need to inter-operate with dma-buf.
|
|
||||||
+ *
|
|
||||||
+ * The intended usage pattern is the following:
|
|
||||||
+ *
|
|
||||||
+ * 1. Export a sync_file with flags corresponding to the expected GPU usage
|
|
||||||
+ * via DMA_BUF_IOCTL_EXPORT_SYNC_FILE.
|
|
||||||
+ *
|
|
||||||
+ * 2. Submit rendering work which uses the dma-buf. The work should wait on
|
|
||||||
+ * the exported sync file before rendering and produce another sync_file
|
|
||||||
+ * when complete.
|
|
||||||
+ *
|
|
||||||
+ * 3. Import the rendering-complete sync_file into the dma-buf with flags
|
|
||||||
+ * corresponding to the GPU usage via DMA_BUF_IOCTL_IMPORT_SYNC_FILE.
|
|
||||||
+ *
|
|
||||||
+ * Unlike doing implicit synchronization via a GPU kernel driver's exec ioctl,
|
|
||||||
+ * the above is not a single atomic operation. If userspace wants to ensure
|
|
||||||
+ * ordering via these fences, it is the respnosibility of userspace to use
|
|
||||||
+ * locks or other mechanisms to ensure that no other context adds fences or
|
|
||||||
+ * submits work between steps 1 and 3 above.
|
|
||||||
+ */
|
|
||||||
+struct dma_buf_export_sync_file {
|
|
||||||
+ /**
|
|
||||||
+ * @flags: Read/write flags
|
|
||||||
+ *
|
|
||||||
+ * Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.
|
|
||||||
+ *
|
|
||||||
+ * If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set,
|
|
||||||
+ * the returned sync file waits on any writers of the dma-buf to
|
|
||||||
+ * complete. Waiting on the returned sync file is equivalent to
|
|
||||||
+ * poll() with POLLIN.
|
|
||||||
+ *
|
|
||||||
+ * If DMA_BUF_SYNC_WRITE is set, the returned sync file waits on
|
|
||||||
+ * any users of the dma-buf (read or write) to complete. Waiting
|
|
||||||
+ * on the returned sync file is equivalent to poll() with POLLOUT.
|
|
||||||
+ * If both DMA_BUF_SYNC_WRITE and DMA_BUF_SYNC_READ are set, this
|
|
||||||
+ * is equivalent to just DMA_BUF_SYNC_WRITE.
|
|
||||||
+ */
|
|
||||||
+ __u32 flags;
|
|
||||||
+ /** @fd: Returned sync file descriptor */
|
|
||||||
+ __s32 fd;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+/**
|
|
||||||
+ * struct dma_buf_import_sync_file - Insert a sync_file into a dma-buf
|
|
||||||
+ *
|
|
||||||
+ * Userspace can perform a DMA_BUF_IOCTL_IMPORT_SYNC_FILE to insert a
|
|
||||||
+ * sync_file into a dma-buf for the purposes of implicit synchronization
|
|
||||||
+ * with other dma-buf consumers. This allows clients using explicitly
|
|
||||||
+ * synchronized APIs such as Vulkan to inter-op with dma-buf consumers
|
|
||||||
+ * which expect implicit synchronization such as OpenGL or most media
|
|
||||||
+ * drivers/video.
|
|
||||||
+ */
|
|
||||||
+struct dma_buf_import_sync_file {
|
|
||||||
+ /**
|
|
||||||
+ * @flags: Read/write flags
|
|
||||||
+ *
|
|
||||||
+ * Must be DMA_BUF_SYNC_READ, DMA_BUF_SYNC_WRITE, or both.
|
|
||||||
+ *
|
|
||||||
+ * If DMA_BUF_SYNC_READ is set and DMA_BUF_SYNC_WRITE is not set,
|
|
||||||
+ * this inserts the sync_file as a read-only fence. Any subsequent
|
|
||||||
+ * implicitly synchronized writes to this dma-buf will wait on this
|
|
||||||
+ * fence but reads will not.
|
|
||||||
+ *
|
|
||||||
+ * If DMA_BUF_SYNC_WRITE is set, this inserts the sync_file as a
|
|
||||||
+ * write fence. All subsequent implicitly synchronized access to
|
|
||||||
+ * this dma-buf will wait on this fence.
|
|
||||||
+ */
|
|
||||||
+ __u32 flags;
|
|
||||||
+ /** @fd: Sync file descriptor */
|
|
||||||
+ __s32 fd;
|
|
||||||
+};
|
|
||||||
+
|
|
||||||
+#define DMA_BUF_BASE 'b'
|
|
||||||
+#define DMA_BUF_IOCTL_SYNC _IOW(DMA_BUF_BASE, 0, struct dma_buf_sync)
|
|
||||||
+
|
|
||||||
+/* 32/64bitness of this uapi was botched in android, there's no difference
|
|
||||||
+ * between them in actual uapi, they're just different numbers.
|
|
||||||
+ */
|
|
||||||
+#define DMA_BUF_SET_NAME _IOW(DMA_BUF_BASE, 1, const char *)
|
|
||||||
+#define DMA_BUF_SET_NAME_A _IOW(DMA_BUF_BASE, 1, u32)
|
|
||||||
+#define DMA_BUF_SET_NAME_B _IOW(DMA_BUF_BASE, 1, u64)
|
|
||||||
+#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file)
|
|
||||||
+#define DMA_BUF_IOCTL_IMPORT_SYNC_FILE _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file)
|
|
||||||
+
|
|
||||||
+#endif
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- src/gallium/include/pipe/p_compiler.h.orig 2022-10-11 18:53:31 UTC
|
|
||||||
+++ src/gallium/include/pipe/p_compiler.h
|
|
||||||
@@ -125,7 +125,7 @@ typedef unsigned char boolean;
|
|
||||||
* aligned, but we only want to align the field.
|
|
||||||
*/
|
|
||||||
#define EXCLUSIVE_CACHELINE(decl) \
|
|
||||||
- union { char __cl_space[CACHE_LINE_SIZE]; \
|
|
||||||
+ union { char __cl_space[MESA_CACHE_LINE_SIZE]; \
|
|
||||||
decl; }
|
|
||||||
|
|
||||||
#if defined(__cplusplus)
|
|
|
@ -1,11 +0,0 @@
|
||||||
--- src/util/macros.h.orig 2022-10-11 18:53:31 UTC
|
|
||||||
+++ src/util/macros.h
|
|
||||||
@@ -448,7 +448,7 @@ typedef int lock_cap_t;
|
|
||||||
#endif
|
|
||||||
|
|
||||||
/* TODO: this could be different on non-x86 architectures. */
|
|
||||||
-#define CACHE_LINE_SIZE 64
|
|
||||||
+#define MESA_CACHE_LINE_SIZE 64
|
|
||||||
|
|
||||||
#define DO_PRAGMA(X) _Pragma (#X)
|
|
||||||
|
|
|
@ -1,7 +1,21 @@
|
||||||
--- src/util/u_memory.h.orig 2022-12-01 11:58:25 UTC
|
--- src/util/u_memory.h.orig 2023-09-06 23:29:52 UTC
|
||||||
+++ src/util/u_memory.h
|
+++ src/util/u_memory.h
|
||||||
@@ -91,8 +91,8 @@ mem_dup(const void *src, size_t size)
|
@@ -90,7 +90,7 @@ mem_dup(const void *src, size_t size)
|
||||||
|
#define Offset(TYPE, MEMBER) ((uintptr_t)&(((TYPE *)NULL)->MEMBER))
|
||||||
|
|
||||||
|
/* TODO: this could be different on non-x86 architectures. */
|
||||||
|
-#define CACHE_LINE_SIZE 64
|
||||||
|
+#define MESA_CACHE_LINE_SIZE 64
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Declare a variable on its own cache line.
|
||||||
|
@@ -107,12 +107,12 @@ mem_dup(const void *src, size_t size)
|
||||||
|
* aligned, but we only want to align the field.
|
||||||
|
*/
|
||||||
|
#define EXCLUSIVE_CACHELINE(decl) \
|
||||||
|
- union { char __cl_space[CACHE_LINE_SIZE]; \
|
||||||
|
+ union { char __cl_space[MESA_CACHE_LINE_SIZE]; \
|
||||||
|
decl; }
|
||||||
|
|
||||||
/* Allocate a structure aligned to a cache line. (used to make atomic ops faster) */
|
/* Allocate a structure aligned to a cache line. (used to make atomic ops faster) */
|
||||||
-#define MALLOC_STRUCT_CL(T) (struct T *)align_malloc(sizeof(struct T), CACHE_LINE_SIZE)
|
-#define MALLOC_STRUCT_CL(T) (struct T *)align_malloc(sizeof(struct T), CACHE_LINE_SIZE)
|
||||||
|
|
|
@ -1,61 +0,0 @@
|
||||||
--- src/vulkan/wsi/wsi_common_drm.c.orig 2022-10-11 18:53:31 UTC
|
|
||||||
+++ src/vulkan/wsi/wsi_common_drm.c
|
|
||||||
@@ -30,29 +30,15 @@
|
|
||||||
#include "vk_physical_device.h"
|
|
||||||
#include "vk_util.h"
|
|
||||||
#include "drm-uapi/drm_fourcc.h"
|
|
||||||
+#include "drm-uapi/dma-buf.h"
|
|
||||||
|
|
||||||
#include <errno.h>
|
|
||||||
-#include <linux/dma-buf.h>
|
|
||||||
-#include <linux/sync_file.h>
|
|
||||||
#include <time.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <xf86drm.h>
|
|
||||||
|
|
||||||
-struct dma_buf_export_sync_file_wsi {
|
|
||||||
- __u32 flags;
|
|
||||||
- __s32 fd;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-struct dma_buf_import_sync_file_wsi {
|
|
||||||
- __u32 flags;
|
|
||||||
- __s32 fd;
|
|
||||||
-};
|
|
||||||
-
|
|
||||||
-#define DMA_BUF_IOCTL_EXPORT_SYNC_FILE_WSI _IOWR(DMA_BUF_BASE, 2, struct dma_buf_export_sync_file_wsi)
|
|
||||||
-#define DMA_BUF_IOCTL_IMPORT_SYNC_FILE_WSI _IOW(DMA_BUF_BASE, 3, struct dma_buf_import_sync_file_wsi)
|
|
||||||
-
|
|
||||||
static VkResult
|
|
||||||
wsi_dma_buf_export_sync_file(int dma_buf_fd, int *sync_file_fd)
|
|
||||||
{
|
|
||||||
@@ -61,11 +47,11 @@ wsi_dma_buf_export_sync_file(int dma_buf_fd, int *sync
|
|
||||||
if (no_dma_buf_sync_file)
|
|
||||||
return VK_ERROR_FEATURE_NOT_PRESENT;
|
|
||||||
|
|
||||||
- struct dma_buf_export_sync_file_wsi export = {
|
|
||||||
+ struct dma_buf_export_sync_file export = {
|
|
||||||
.flags = DMA_BUF_SYNC_RW,
|
|
||||||
.fd = -1,
|
|
||||||
};
|
|
||||||
- int ret = drmIoctl(dma_buf_fd, DMA_BUF_IOCTL_EXPORT_SYNC_FILE_WSI, &export);
|
|
||||||
+ int ret = drmIoctl(dma_buf_fd, DMA_BUF_IOCTL_EXPORT_SYNC_FILE, &export);
|
|
||||||
if (ret) {
|
|
||||||
if (errno == ENOTTY || errno == EBADF || errno == ENOSYS) {
|
|
||||||
no_dma_buf_sync_file = true;
|
|
||||||
@@ -88,11 +74,11 @@ wsi_dma_buf_import_sync_file(int dma_buf_fd, int sync_
|
|
||||||
if (no_dma_buf_sync_file)
|
|
||||||
return VK_ERROR_FEATURE_NOT_PRESENT;
|
|
||||||
|
|
||||||
- struct dma_buf_import_sync_file_wsi import = {
|
|
||||||
+ struct dma_buf_import_sync_file import = {
|
|
||||||
.flags = DMA_BUF_SYNC_RW,
|
|
||||||
.fd = sync_file_fd,
|
|
||||||
};
|
|
||||||
- int ret = drmIoctl(dma_buf_fd, DMA_BUF_IOCTL_IMPORT_SYNC_FILE_WSI, &import);
|
|
||||||
+ int ret = drmIoctl(dma_buf_fd, DMA_BUF_IOCTL_IMPORT_SYNC_FILE, &import);
|
|
||||||
if (ret) {
|
|
||||||
if (errno == ENOTTY || errno == EBADF || errno == ENOSYS) {
|
|
||||||
no_dma_buf_sync_file = true;
|
|
|
@ -1,44 +0,0 @@
|
||||||
https://gitlab.freedesktop.org/mesa/mesa/-/commit/ee5d2250fd15
|
|
||||||
https://gitlab.freedesktop.org/mesa/mesa/-/commit/689ce66a4332
|
|
||||||
|
|
||||||
--- src/egl/drivers/dri2/platform_wayland.c.orig 2023-03-08 18:37:09 UTC
|
|
||||||
+++ src/egl/drivers/dri2/platform_wayland.c
|
|
||||||
@@ -2789,10 +2789,10 @@ dri2_teardown_wayland(struct dri2_egl_display *dri2_dp
|
|
||||||
wl_shm_destroy(dri2_dpy->wl_shm);
|
|
||||||
if (dri2_dpy->wl_registry)
|
|
||||||
wl_registry_destroy(dri2_dpy->wl_registry);
|
|
||||||
- if (dri2_dpy->wl_queue)
|
|
||||||
- wl_event_queue_destroy(dri2_dpy->wl_queue);
|
|
||||||
if (dri2_dpy->wl_dpy_wrapper)
|
|
||||||
wl_proxy_wrapper_destroy(dri2_dpy->wl_dpy_wrapper);
|
|
||||||
+ if (dri2_dpy->wl_queue)
|
|
||||||
+ wl_event_queue_destroy(dri2_dpy->wl_queue);
|
|
||||||
|
|
||||||
if (dri2_dpy->own_device)
|
|
||||||
wl_display_disconnect(dri2_dpy->wl_dpy);
|
|
||||||
--- src/vulkan/wsi/wsi_common_wayland.c.orig 2023-03-08 18:37:09 UTC
|
|
||||||
+++ src/vulkan/wsi/wsi_common_wayland.c
|
|
||||||
@@ -1156,17 +1156,17 @@ wsi_wl_surface_destroy(VkIcdSurfaceBase *icd_surface,
|
|
||||||
struct wsi_wl_surface *wsi_wl_surface =
|
|
||||||
wl_container_of((VkIcdSurfaceWayland *)icd_surface, wsi_wl_surface, base);
|
|
||||||
|
|
||||||
- if (wsi_wl_surface->surface)
|
|
||||||
- wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
|
|
||||||
-
|
|
||||||
- if (wsi_wl_surface->display)
|
|
||||||
- wsi_wl_display_destroy(wsi_wl_surface->display);
|
|
||||||
-
|
|
||||||
if (wsi_wl_surface->wl_dmabuf_feedback) {
|
|
||||||
zwp_linux_dmabuf_feedback_v1_destroy(wsi_wl_surface->wl_dmabuf_feedback);
|
|
||||||
dmabuf_feedback_fini(&wsi_wl_surface->dmabuf_feedback);
|
|
||||||
dmabuf_feedback_fini(&wsi_wl_surface->pending_dmabuf_feedback);
|
|
||||||
}
|
|
||||||
+
|
|
||||||
+ if (wsi_wl_surface->surface)
|
|
||||||
+ wl_proxy_wrapper_destroy(wsi_wl_surface->surface);
|
|
||||||
+
|
|
||||||
+ if (wsi_wl_surface->display)
|
|
||||||
+ wsi_wl_display_destroy(wsi_wl_surface->display);
|
|
||||||
|
|
||||||
vk_free2(&instance->alloc, pAllocator, wsi_wl_surface);
|
|
||||||
}
|
|
|
@ -31,6 +31,7 @@ include/GL/internal/dri_interface.h
|
||||||
@comment lib/libglapi.so.0
|
@comment lib/libglapi.so.0
|
||||||
@comment lib/libglapi.so.0.0.0
|
@comment lib/libglapi.so.0.0.0
|
||||||
%%INTEL_VDRIVER%%lib/libvulkan_intel.so
|
%%INTEL_VDRIVER%%lib/libvulkan_intel.so
|
||||||
|
%%INTEL_VDRIVER%%lib/libvulkan_intel_hasvk.so
|
||||||
%%AMD_VDRIVER%%lib/libvulkan_radeon.so
|
%%AMD_VDRIVER%%lib/libvulkan_radeon.so
|
||||||
%%SWRAST_VDRIVER%%lib/libvulkan_lvp.so
|
%%SWRAST_VDRIVER%%lib/libvulkan_lvp.so
|
||||||
libdata/pkgconfig/dri.pc
|
libdata/pkgconfig/dri.pc
|
||||||
|
@ -40,5 +41,6 @@ share/drirc.d/00-mesa-defaults.conf
|
||||||
%%AMD_VDRIVER%%share/drirc.d/00-radv-defaults.conf
|
%%AMD_VDRIVER%%share/drirc.d/00-radv-defaults.conf
|
||||||
share/drirc.d/01-freebsd.conf
|
share/drirc.d/01-freebsd.conf
|
||||||
%%INTEL_VDRIVER%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json
|
%%INTEL_VDRIVER%%share/vulkan/icd.d/intel_icd.%%ARCH%%.json
|
||||||
|
%%INTEL_VDRIVER%%share/vulkan/icd.d/intel_hasvk_icd.%%ARCH%%.json
|
||||||
%%AMD_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json
|
%%AMD_VDRIVER%%share/vulkan/icd.d/radeon_icd.%%ARCH%%.json
|
||||||
%%SWRAST_VDRIVER%%share/vulkan/icd.d/lvp_icd.%%ARCH%%.json
|
%%SWRAST_VDRIVER%%share/vulkan/icd.d/lvp_icd.%%ARCH%%.json
|
||||||
|
|
|
@ -12,9 +12,10 @@ ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le
|
||||||
ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware
|
ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware
|
||||||
|
|
||||||
LIB_DEPENDS= libva.so:multimedia/libva \
|
LIB_DEPENDS= libva.so:multimedia/libva \
|
||||||
libLLVM-${LLVM_DEFAULT}.so:devel/llvm${LLVM_DEFAULT} \
|
|
||||||
libzstd.so:archivers/zstd
|
libzstd.so:archivers/zstd
|
||||||
|
|
||||||
|
USES= llvm:lib,noexport
|
||||||
|
|
||||||
OPTIONS_DEFINE= X11
|
OPTIONS_DEFINE= X11
|
||||||
OPTIONS_DEFAULT= X11
|
OPTIONS_DEFAULT= X11
|
||||||
X11_DESC= Enable X11 support
|
X11_DESC= Enable X11 support
|
||||||
|
@ -24,10 +25,10 @@ X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
||||||
|
|
||||||
MESON_ARGS+= -Ddri-drivers="" \
|
MESON_ARGS+= -Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc" \
|
||||||
-Dvideo-codecs="vc1dec,h264dec,h264enc,h265dec,h265enc" \
|
|
||||||
-Dgallium-drivers="radeonsi,r600" \
|
-Dgallium-drivers="radeonsi,r600" \
|
||||||
-Dvulkan-drivers="" \
|
-Dvulkan-drivers="" \
|
||||||
|
-Dandroid-libbacktrace=disabled \
|
||||||
-Dgallium-vdpau=disabled \
|
-Dgallium-vdpau=disabled \
|
||||||
-Dgallium-omx=disabled \
|
-Dgallium-omx=disabled \
|
||||||
-Dgallium-xa=disabled \
|
-Dgallium-xa=disabled \
|
||||||
|
@ -36,8 +37,10 @@ MESON_ARGS+= -Ddri-drivers="" \
|
||||||
-Dgbm=disabled \
|
-Dgbm=disabled \
|
||||||
-Dgles1=disabled \
|
-Dgles1=disabled \
|
||||||
-Dgles2=disabled \
|
-Dgles2=disabled \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
-Dmicrosoft-clc=disabled \
|
-Dmicrosoft-clc=disabled \
|
||||||
-Dosmesa=false \
|
-Dosmesa=false \
|
||||||
|
-Dvalgrind=disabled \
|
||||||
-Dglx=disabled \
|
-Dglx=disabled \
|
||||||
-Ddri3=enabled
|
-Ddri3=enabled
|
||||||
|
|
||||||
|
|
|
@ -11,10 +11,9 @@ LICENSE_FILE= ${WRKSRC}/docs/license.rst
|
||||||
ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le
|
ONLY_FOR_ARCHS= aarch64 amd64 i386 powerpc64 powerpc64le
|
||||||
ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware
|
ONLY_FOR_ARCHS_REASON= used only by AMD/Radeon hardware
|
||||||
|
|
||||||
LIB_DEPENDS= libva.so:multimedia/libva \
|
LIB_DEPENDS= libzstd.so:archivers/zstd
|
||||||
libLLVM-${LLVM_DEFAULT}.so:devel/llvm${LLVM_DEFAULT} \
|
|
||||||
libvdpau.so:multimedia/libvdpau \
|
USES= llvm:lib,noexport
|
||||||
libzstd.so:archivers/zstd
|
|
||||||
|
|
||||||
OPTIONS_DEFINE= X11
|
OPTIONS_DEFINE= X11
|
||||||
OPTIONS_DEFAULT= X11
|
OPTIONS_DEFAULT= X11
|
||||||
|
@ -25,9 +24,9 @@ X11_USE= xorg=xorgproto,x11,xcb,xdamage,xext,xfixes,xshmfence,xxf86vm,xrandr
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
||||||
|
|
||||||
MESON_ARGS+= -Ddri-drivers="" \
|
MESON_ARGS+= -Dgallium-drivers="r600,radeonsi" \
|
||||||
-Dgallium-drivers="r300,r600,radeonsi" \
|
|
||||||
-Dvulkan-drivers="" \
|
-Dvulkan-drivers="" \
|
||||||
|
-Dandroid-libbacktrace=disabled \
|
||||||
-Dgallium-va=disabled \
|
-Dgallium-va=disabled \
|
||||||
-Dgallium-omx=disabled \
|
-Dgallium-omx=disabled \
|
||||||
-Dgallium-xa=disabled \
|
-Dgallium-xa=disabled \
|
||||||
|
@ -36,8 +35,10 @@ MESON_ARGS+= -Ddri-drivers="" \
|
||||||
-Dgbm=disabled \
|
-Dgbm=disabled \
|
||||||
-Dgles1=disabled \
|
-Dgles1=disabled \
|
||||||
-Dgles2=disabled \
|
-Dgles2=disabled \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
-Dmicrosoft-clc=disabled \
|
-Dmicrosoft-clc=disabled \
|
||||||
-Dosmesa=false \
|
-Dosmesa=false \
|
||||||
|
-Dvalgrind=disabled \
|
||||||
-Dglx=disabled \
|
-Dglx=disabled \
|
||||||
-Ddri3=enabled
|
-Ddri3=enabled
|
||||||
|
|
||||||
|
|
|
@ -19,10 +19,6 @@
|
||||||
@comment lib/libglapi.so
|
@comment lib/libglapi.so
|
||||||
@comment lib/libglapi.so.0
|
@comment lib/libglapi.so.0
|
||||||
@comment lib/libglapi.so.0.0.0
|
@comment lib/libglapi.so.0.0.0
|
||||||
lib/vdpau/libvdpau_r300.so
|
|
||||||
lib/vdpau/libvdpau_r300.so.1
|
|
||||||
lib/vdpau/libvdpau_r300.so.1.0
|
|
||||||
lib/vdpau/libvdpau_r300.so.1.0.0
|
|
||||||
lib/vdpau/libvdpau_r600.so
|
lib/vdpau/libvdpau_r600.so
|
||||||
lib/vdpau/libvdpau_r600.so.1
|
lib/vdpau/libvdpau_r600.so.1
|
||||||
lib/vdpau/libvdpau_r600.so.1.0
|
lib/vdpau/libvdpau_r600.so.1.0
|
||||||
|
|
|
@ -11,18 +11,16 @@ LICENSE_FILE= ${WRKSRC}/docs/license.rst
|
||||||
ONLY_FOR_ARCHS= amd64 i386
|
ONLY_FOR_ARCHS= amd64 i386
|
||||||
ONLY_FOR_ARCHS_REASON= used only by VMware supported architectures
|
ONLY_FOR_ARCHS_REASON= used only by VMware supported architectures
|
||||||
|
|
||||||
LIB_DEPENDS= libLLVM-${LLVM_DEFAULT}.so:devel/llvm${LLVM_DEFAULT}
|
USES= llvm:lib,noexport xorg
|
||||||
|
|
||||||
USES= xorg
|
|
||||||
USE_XORG= xorgproto
|
USE_XORG= xorgproto
|
||||||
|
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
||||||
|
|
||||||
MESON_ARGS+= -Ddri-drivers="" \
|
MESON_ARGS+= -Dgallium-drivers="svga" \
|
||||||
-Dgallium-drivers="svga" \
|
|
||||||
-Dvulkan-drivers="" \
|
-Dvulkan-drivers="" \
|
||||||
-Dplatforms="" \
|
-Dplatforms="" \
|
||||||
|
-Dandroid-libbacktrace=disabled \
|
||||||
-Dgallium-vdpau=disabled \
|
-Dgallium-vdpau=disabled \
|
||||||
-Dgallium-omx=disabled \
|
-Dgallium-omx=disabled \
|
||||||
-Dgallium-va=disabled \
|
-Dgallium-va=disabled \
|
||||||
|
@ -33,10 +31,13 @@ MESON_ARGS+= -Ddri-drivers="" \
|
||||||
-Dgles1=disabled \
|
-Dgles1=disabled \
|
||||||
-Dgles2=disabled \
|
-Dgles2=disabled \
|
||||||
-Dglx=disabled \
|
-Dglx=disabled \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
-Dmicrosoft-clc=disabled \
|
-Dmicrosoft-clc=disabled \
|
||||||
-Dopengl=false \
|
-Dopengl=false \
|
||||||
-Dshared-glapi=disabled \
|
-Dshared-glapi=disabled \
|
||||||
-Dosmesa=false
|
-Dosmesa=false \
|
||||||
|
-Dvalgrind=disabled \
|
||||||
|
-Dxlib-lease=disabled
|
||||||
|
|
||||||
LDFLAGS_i386= -Wl,-znotext
|
LDFLAGS_i386= -Wl,-znotext
|
||||||
|
|
||||||
|
|
|
@ -1,6 +1,5 @@
|
||||||
PORTNAME= mesa-libs
|
PORTNAME= mesa-libs
|
||||||
PORTVERSION= ${MESAVERSION}
|
PORTVERSION= ${MESAVERSION}
|
||||||
PORTREVISION= 2
|
|
||||||
CATEGORIES= graphics
|
CATEGORIES= graphics
|
||||||
|
|
||||||
COMMENT= OpenGL libraries that support GLX and EGL clients
|
COMMENT= OpenGL libraries that support GLX and EGL clients
|
||||||
|
@ -35,14 +34,17 @@ USE_LDCONFIG= yes
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
||||||
|
|
||||||
MESON_ARGS+= -Dgallium-vdpau=disabled \
|
MESON_ARGS+= -Dandroid-libbacktrace=disabled \
|
||||||
|
-Dgallium-vdpau=disabled \
|
||||||
-Dgallium-omx=disabled \
|
-Dgallium-omx=disabled \
|
||||||
-Dgallium-va=disabled \
|
-Dgallium-va=disabled \
|
||||||
-Dgallium-xa=disabled \
|
-Dgallium-xa=disabled \
|
||||||
-Dgallium-nine=false \
|
-Dgallium-nine=false \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
-Dmicrosoft-clc=disabled \
|
-Dmicrosoft-clc=disabled \
|
||||||
-Dosmesa=false \
|
-Dosmesa=false \
|
||||||
-Dtools="" \
|
-Dtools="" \
|
||||||
|
-Dvalgrind=disabled \
|
||||||
-Degl=enabled \
|
-Degl=enabled \
|
||||||
-Dgbm=enabled \
|
-Dgbm=enabled \
|
||||||
-Dvulkan-drivers="" \
|
-Dvulkan-drivers="" \
|
||||||
|
|
|
@ -14,17 +14,18 @@ ONLY_FOR_ARCHS_REASON= needs a GPU supported by the Radeon KMS driver
|
||||||
BUILD_DEPENDS= libclc>=0.3.0:devel/libclc \
|
BUILD_DEPENDS= libclc>=0.3.0:devel/libclc \
|
||||||
opencl>=0:devel/opencl
|
opencl>=0:devel/opencl
|
||||||
LIB_DEPENDS= libOpenCL.so:devel/ocl-icd \
|
LIB_DEPENDS= libOpenCL.so:devel/ocl-icd \
|
||||||
libLLVM-${LLVM_DEFAULT}.so:devel/llvm${LLVM_DEFAULT} \
|
|
||||||
libzstd.so:archivers/zstd
|
libzstd.so:archivers/zstd
|
||||||
RUN_DEPENDS= libclc>=0.3.0:devel/libclc \
|
RUN_DEPENDS= libclc>=0.3.0:devel/libclc \
|
||||||
opencl>=0:devel/opencl
|
opencl>=0:devel/opencl
|
||||||
|
|
||||||
|
USES= llvm:lib,noexport
|
||||||
|
|
||||||
.include <bsd.port.options.mk>
|
.include <bsd.port.options.mk>
|
||||||
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common"
|
||||||
|
|
||||||
MESON_ARGS+= -Ddri-drivers="" \
|
MESON_ARGS+= -Dplatforms="" \
|
||||||
-Dplatforms="" \
|
|
||||||
-Dvulkan-drivers="" \
|
-Dvulkan-drivers="" \
|
||||||
|
-Dandroid-libbacktrace=disabled \
|
||||||
-Dgallium-nine=false \
|
-Dgallium-nine=false \
|
||||||
-Dgallium-omx=disabled \
|
-Dgallium-omx=disabled \
|
||||||
-Dgallium-opencl=disabled \
|
-Dgallium-opencl=disabled \
|
||||||
|
@ -39,6 +40,9 @@ MESON_ARGS+= -Ddri-drivers="" \
|
||||||
-Degl=disabled \
|
-Degl=disabled \
|
||||||
-Dgbm=disabled \
|
-Dgbm=disabled \
|
||||||
-Dtools="" \
|
-Dtools="" \
|
||||||
|
-Dxlib-lease=disabled \
|
||||||
|
-Dlmsensors=disabled \
|
||||||
|
-Dvalgrind=disabled \
|
||||||
-Dgallium-opencl=icd \
|
-Dgallium-opencl=icd \
|
||||||
-Dgallium-drivers=r600,radeonsi
|
-Dgallium-drivers=r600,radeonsi
|
||||||
|
|
||||||
|
@ -47,9 +51,9 @@ LDFLAGS_i386= -Wl,-znotext
|
||||||
.include "${MASTERDIR}/Makefile.targets"
|
.include "${MASTERDIR}/Makefile.targets"
|
||||||
|
|
||||||
pre-patch:
|
pre-patch:
|
||||||
@if [ -e ${LOCALBASE}/bin/llvm-config${LLVM_DEFAULT} ] && \
|
@if [ -e ${LOCALBASE}/bin/llvm-config${LLVM_VERSION} ] && \
|
||||||
! [ -e ${LOCALBASE}/bin/clang${LLVM_DEFAULT} ]; then \
|
! [ -e ${LOCALBASE}/bin/clang${LLVM_VERSION} ]; then \
|
||||||
${ECHO_MSG} "Your llvm${LLVM_DEFAULT} is not built with clang support, which is required."; \
|
${ECHO_MSG} "Your llvm${LLVM_VERSION} is not built with clang support, which is required."; \
|
||||||
${FALSE}; \
|
${FALSE}; \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue