Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile (revision 466923) +++ head/graphics/mesa-dri/Makefile (revision 466924) @@ -1,111 +1,111 @@ # Created by: Eric Anholt # $FreeBSD$ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ USE_XORG= dri2proto dri3proto glproto presentproto x11 xdamage xext \ xfixes xshmfence xv xvmc OPTIONS_DEFINE= TEXTURE VAAPI VDPAU OPTIONS_DEFAULT=TEXTURE OPTIONS_SUB= yes TEXTURE_DESC= Enable texture-float support (patent encumbered) TEXTURE_CONFIGURE_ENABLE= texture-float VAAPI_CONFIGURE_ENABLE= va VAAPI_LIB_DEPENDS= libva.so:multimedia/libva VAAPI_USE= XORG=xcb VDPAU_CONFIGURE_ENABLE= vdpau VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" ALL_DRI_DRIVERS= I915 I965 RADEON R200 SWRAST ALL_GALLIUM_DRIVERS= FREEDRENO R300 R600 RADEONSI SVGA SWRAST VC4 ALL_VULKAN_DRIVERS= INTEL RADEON DRI_DRIVERS= SWRAST # classic swrast .if "${MESA_LLVM_VER}" != "" GALLIUM_DRIVERS= SWRAST # llvmpipe .else GALLIUM_DRIVERS= "" .endif VULKAN_DRIVERS= # .if ${ARCH} == amd64 || ${ARCH} == i386 \ || ${ARCH} == powerpc || ${ARCH} == powerpc64 DRI_DRIVERS+= RADEON R200 GALLIUM_DRIVERS+= R300 R600 . if "${MESA_LLVM_VER}" != "" # until PPC gets LLVM in base GALLIUM_DRIVERS+= RADEONSI VULKAN_DRIVERS+= RADEON . endif .endif .if ${ARCH} == amd64 || ${ARCH} == i386 DRI_DRIVERS+= I915 I965 GALLIUM_DRIVERS+= SVGA . if ${OPSYS} == FreeBSD EXTRA_PATCHES+= ${PATCHDIR}/extra-src_mesa_drivers_dri_i965_intel__screen.c . endif VULKAN_DRIVERS+= INTEL .elif ${ARCH} == aarch64 || ${ARCH} == armv6 || ${ARCH} == armv7 GALLIUM_DRIVERS+= FREEDRENO VC4 . if ${ARCH} == armv6 || ${ARCH} == armv7 EXTRA_PATCHES+= ${PATCHDIR}/extra-src_gallium_drivers_vc4_Makefile.in . endif .endif .if ${VULKAN_DRIVERS} BUILD_DEPENDS+= ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR} .endif .if ${VULKAN_DRIVERS:MINTEL} . if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld # --build-id isn't supported by old GNU ld.bfd in base USE_BINUTILS= yes LDFLAGS+= -B${LOCALBASE}/bin . endif .endif CONFIGURE_ARGS+= --with-dri-drivers="${DRI_DRIVERS:tl}" \ --with-gallium-drivers="${GALLIUM_DRIVERS:tl}" \ --with-vulkan-drivers="${VULKAN_DRIVERS:tl}" .for _d in ${ALL_DRI_DRIVERS} . if ${DRI_DRIVERS:M${_d}} PLIST_SUB+= ${_d}_DRIVER="" . else PLIST_SUB+= ${_d}_DRIVER="@comment " . endif .endfor .for _gd in ${ALL_GALLIUM_DRIVERS} . if ${GALLIUM_DRIVERS:M${_gd}} PLIST_SUB+= ${_gd}_GDRIVER="" . else PLIST_SUB+= ${_gd}_GDRIVER="@comment " . endif .endfor .for _vd in ${ALL_VULKAN_DRIVERS} . if ${VULKAN_DRIVERS:M${_vd}} PLIST_SUB+= ${_vd}_VDRIVER="" ARCH="${ARCH}" . else PLIST_SUB+= ${_vd}_VDRIVER="@comment " . endif .endfor .include "${MASTERDIR}/Makefile.targets" post-install: @${RM} -r ${STAGEDIR}/etc/OpenCL .include Index: head/graphics/mesa-dri/files/patch-src_loader_loader.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_loader_loader.c (nonexistent) +++ head/graphics/mesa-dri/files/patch-src_loader_loader.c (revision 466924) @@ -0,0 +1,68 @@ +commit db8519a369261cdedda50852facc45616d4eba28 +Author: Greg V +Date: Mon Oct 23 23:20:40 2017 +0300 + + loader: use drmGetDeviceNameFromFd2 from libdrm + + Reduce code duplication and automatically benefit from OS-specific + fixes to libdrm (e.g. in FreeBSD ports). + + API was introduced with 2.4.74 and we already require 2.4.75 globally. + + Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=103283 + Reviewed-by: Eric Engestrom + Reviewed-by: Emil Velikov + +--- src/loader/loader.c.orig 2017-12-21 17:31:21 UTC ++++ src/loader/loader.c +@@ -245,30 +245,7 @@ int loader_get_user_preferred_fd(int default_fd, bool + #endif + + #if defined(HAVE_LIBDRM) +-static int +-dev_node_from_fd(int fd, unsigned int *maj, unsigned int *min) +-{ +- struct stat buf; + +- if (fstat(fd, &buf) < 0) { +- log_(_LOADER_WARNING, "MESA-LOADER: failed to stat fd %d\n", fd); +- return -1; +- } +- +- if (!S_ISCHR(buf.st_mode)) { +- log_(_LOADER_WARNING, "MESA-LOADER: fd %d not a character device\n", fd); +- return -1; +- } +- +- *maj = major(buf.st_rdev); +- *min = minor(buf.st_rdev); +- +- return 0; +-} +-#endif +- +-#if defined(HAVE_LIBDRM) +- + static int + drm_get_pci_id_for_fd(int fd, int *vendor_id, int *chip_id) + { +@@ -312,18 +289,7 @@ loader_get_pci_id_for_fd(int fd, int *vendor_id, int * + static char * + drm_get_device_name_for_fd(int fd) + { +- unsigned int maj, min; +- char buf[0x40]; +- int n; +- +- if (dev_node_from_fd(fd, &maj, &min) < 0) +- return NULL; +- +- n = snprintf(buf, sizeof(buf), DRM_DEV_NAME, DRM_DIR_NAME, min); +- if (n == -1 || n >= sizeof(buf)) +- return NULL; +- +- return strdup(buf); ++ return drmGetDeviceNameFromFd2(fd); + } + #endif + Property changes on: head/graphics/mesa-dri/files/patch-src_loader_loader.c ___________________________________________________________________ Added: fbsd:nokeywords ## -0,0 +1 ## +yes \ No newline at end of property Added: svn:eol-style ## -0,0 +1 ## +native \ No newline at end of property Added: svn:mime-type ## -0,0 +1 ## +text/plain \ No newline at end of property