Index: head/UPDATING =================================================================== --- head/UPDATING +++ head/UPDATING @@ -5,6 +5,14 @@ You should get into the habit of checking this file for changes each time you update your ports collection, before attempting any port upgrades. +20201012: + AFFECTS: Users of mesa-dri with VAAPI or VDPAU options + AUTHOR: manu@FreeBSD.org + + The nondefault options VAAPI and VDPAU were removed from the mesa-dri + port and two new ports, mesa-gallium-va and mesa-gallium-vdpau now contain + the necessary libraries for using VAAPI or VDPAU on AMD hardware. + 20201006: AFFECTS: users of sysutils/tenshi AUTHOR: 0mp@FreeBSD.org Index: head/devel/libclc/Makefile =================================================================== --- head/devel/libclc/Makefile +++ head/devel/libclc/Makefile @@ -43,9 +43,6 @@ .include -# Keep in sync with lang/clover -.if ${LLVM_DEFAULT:C/[1-5]./&0/:S,-devel,990,} >= 90 -LLVM_DEFAULT= 80 -.endif +LLVM_DEFAULT= 10 .include Index: head/graphics/Makefile =================================================================== --- head/graphics/Makefile +++ head/graphics/Makefile @@ -534,6 +534,8 @@ SUBDIR += mesa-demos SUBDIR += mesa-devel SUBDIR += mesa-dri + SUBDIR += mesa-gallium-va + SUBDIR += mesa-gallium-vdpau SUBDIR += mesa-gallium-xa SUBDIR += mesa-libs SUBDIR += metacam Index: head/graphics/libosmesa/Makefile =================================================================== --- head/graphics/libosmesa/Makefile +++ head/graphics/libosmesa/Makefile @@ -3,7 +3,6 @@ PORTNAME= libosmesa PORTVERSION= ${MESAVERSION} -PORTREVISION= 1 CATEGORIES= graphics COMMENT= Off-Screen Mesa implementation of the OpenGL API @@ -14,26 +13,26 @@ .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" - # Disable some options MESON_ARGS+= -Ddri-drivers="" \ -Dgallium-drivers=swrast \ -Dvulkan-drivers="" \ -Dplatforms="" \ - -Dgallium-vdpau=false \ + -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ - -Dgallium-va=false \ + -Dgallium-va=disabled \ -Dgallium-opencl=disabled \ - -Dgallium-xa=false \ - -Dgallium-xvmc=false \ + -Dgallium-xa=disabled \ + -Dgallium-xvmc=disabled \ -Dgallium-nine=false \ - -Dgles1=false \ - -Dgles2=false \ - -Dopengl=false \ + -Dgles1=disabled \ + -Dgles2=disabled \ + -Dopengl=true \ -Dglx=disabled \ - -Degl=false \ - -Dgbm=false \ - -Dtools="" + -Degl=disabled \ + -Dgbm=disabled \ + -Dtools="" \ + -Dzstd=disabled LDFLAGS_i386= -Wl,-znotext .if ${ARCH} == sparc64 Index: head/graphics/mesa-dri/Makefile =================================================================== --- head/graphics/mesa-dri/Makefile +++ head/graphics/mesa-dri/Makefile @@ -3,35 +3,29 @@ PORTNAME= mesa-dri PORTVERSION= ${MESAVERSION} -PORTREVISION= 9 CATEGORIES= graphics COMMENT= OpenGL hardware acceleration drivers for DRI2+ OPTIONS_GROUP= PLATFORM -OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS +OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_X11_DESC= Enable X11 support for GBM/EGL PLATFORM_WAYLAND_DESC= Enable Wayland support for GBM/EGL -PLATFORM_DRM_DESC= Enable DRM support for GBM/EGL -PLATFORM_SURFACELESS_DESC= Enable Surfaceless support for GBM/EGL PLATFORM_WAYLAND_IMPLIES= WAYLAND -OPTIONS_DEFINE= VAAPI VDPAU WAYLAND -OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS -OPTIONS_SUB= yes +OPTIONS_DEFINE= WAYLAND ZSTD +OPTIONS_DEFAULT= WAYLAND PLATFORM_X11 PLATFORM_WAYLAND ZSTD +OPTIONS_SUB= yes -VAAPI_MESON_ON= -Dgallium-va=true -VAAPI_LIB_DEPENDS= libva.so:multimedia/libva -VAAPI_USE= XORG=xcb - -VDPAU_MESON_ON= -Dgallium-vdpau=true -VDPAU_LIB_DEPENDS= libvdpau.so:multimedia/libvdpau - WAYLAND_DESC= Enable support for the Wayland platform in Vulkan drivers WAYLAND_BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols WAYLAND_LIB_DEPENDS= libwayland-client.so:graphics/wayland WAYLAND_IMPLIES= PLATFORM_WAYLAND +ZSTD_DESC= Use ZSTD for shader cache +ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd +ZSTD_MESON_ENABLED= zstd + .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" @@ -51,16 +45,13 @@ GALLIUM_DRIVERS+= R300 R600 RADEONSI VULKAN_DRIVERS+= AMD . if ${PORT_OPTIONS:MPLATFORM_X11} -MESON_ARGS+= -Dgallium-xvmc=true -USE_XORG+= xvmc +USE_XORG+= xv xvmc +MESON_ARGS+= -Dgallium-xvmc=enabled . 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 .endif @@ -74,14 +65,6 @@ .endif .endif -.if ${PORT_OPTIONS:MPLATFORM_DRM} -MESA_PLATFORMS+= drm -.endif - -.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS} -MESA_PLATFORMS+= surfaceless -.endif - .if ${PORT_OPTIONS:MPLATFORM_WAYLAND} MESA_PLATFORMS+= wayland .endif @@ -92,11 +75,11 @@ -Dplatforms="${MESA_PLATFORMS:ts,:tl}" # Disable some options -MESON_ARGS+= -Dgallium-xa=false \ - -Dgles1=false \ - -Dgles2=false \ +MESON_ARGS+= -Dgallium-xa=disabled \ + -Dgles1=disabled \ + -Dgles2=disabled \ -Dglx=disabled \ - -Degl=false \ + -Degl=disabled \ -Dosmesa=none \ -Dtools="" Index: head/graphics/mesa-dri/Makefile.common =================================================================== --- head/graphics/mesa-dri/Makefile.common +++ head/graphics/mesa-dri/Makefile.common @@ -14,7 +14,7 @@ MESAVERSION= ${MESABASEVERSION}${MESASUBVERSION:C/^(.)/.\1/} MESADISTVERSION=${MESABASEVERSION}${MESASUBVERSION:C/^(.)/-\1/} -MESABASEVERSION= 19.0.8 +MESABASEVERSION= 20.2.0 # if there is a subversion, don't include the '-' between 7.11-rc2. MESASUBVERSION= @@ -74,7 +74,6 @@ SHEBANG_FILES= src/gallium/*/*/*.py src/gallium/tools/trace/*.py \ src/gallium/drivers/svga/svgadump/svga_dump.py \ src/mapi/glapi/gen/*.py src/mapi/mapi_abi.py \ - src/util/xmlpool/gen_xmlpool.py \ src/mesa/main/get_*.py src/util/format_srgb.py \ src/amd/*/*.py src/intel/genxml/gen_pack_header.py @@ -86,23 +85,34 @@ PKGHELP= ${.CURDIR}/pkg-help PKGINSTALL= ${.CURDIR}/pkg-install PKGDEINSTALL= ${.CURDIR}/pkg-deinstall -INSTALL_TARGET= install-strip -.include +.if ${OSVERSION} < 1200000 +EXTRA_PATCHES+= ${PATCHDIR}/extra-src_util_build__id.c +.endif -.if ${ARCH} == powerpc64 -LLVM_DEFAULT= 90 -.elif ${LLVM_DEFAULT:C/[1-5]./&0/:S,-devel,990,} >= 90 -LLVM_DEFAULT= 80 +.if ${COMPONENT} == clover +EXTRA_PATCHES+= ${PATCHDIR}/extra-src_gallium_auxiliary_meson.build \ + ${PATCHDIR}/extra-src_gallium_auxiliary_vl_vl__stubs.c .endif +.include + BINARY_ALIAS+= python3=${PYTHON_VERSION} -BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} +.if ${ARCH} == powerpc64 +LLVM_DEFAULT= 90 +BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=9.0.1_2:devel/llvm${LLVM_DEFAULT} .if ${COMPONENT} != libs -RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=3.9.0_4:devel/llvm${LLVM_DEFAULT} +RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=9.0.1_2:devel/llvm${LLVM_DEFAULT} .endif +.else +LLVM_DEFAULT= 10 +BUILD_DEPENDS+= llvm${LLVM_DEFAULT}>=10.0.1_1:devel/llvm${LLVM_DEFAULT} +.if ${COMPONENT} != libs +RUN_DEPENDS+= llvm${LLVM_DEFAULT}>=10.0.1_1:devel/llvm${LLVM_DEFAULT} +.endif +.endif + MESON_ARGS+= --native-file="${WRKSRC}/llvm.ini" LDFLAGS+= -Wl,-rpath=${LOCALBASE}/llvm${LLVM_DEFAULT}/lib -MESON_ARGS+= -Dllvm=true - +MESON_ARGS+= -Dllvm=enabled Index: head/graphics/mesa-dri/distinfo =================================================================== --- head/graphics/mesa-dri/distinfo +++ head/graphics/mesa-dri/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1561580048 -SHA256 (mesa-19.0.8.tar.xz) = d017eb53a810c32dabeedf6ca2238ae1e897ce9090e470e9ce1d6c9e3f1b0862 -SIZE (mesa-19.0.8.tar.xz) = 11967592 +TIMESTAMP = 1601893546 +SHA256 (mesa-20.2.0.tar.xz) = 63f0359575d558ef98dd78adffc0df4c66b76964ebf603b778b7004964191d30 +SIZE (mesa-20.2.0.tar.xz) = 13675596 Index: head/graphics/mesa-dri/files/extra-src_gallium_auxiliary_meson.build =================================================================== --- head/graphics/mesa-dri/files/extra-src_gallium_auxiliary_meson.build +++ head/graphics/mesa-dri/files/extra-src_gallium_auxiliary_meson.build @@ -0,0 +1,18 @@ +--- src/gallium/auxiliary/meson.build.orig 2020-09-23 21:05:28 UTC ++++ src/gallium/auxiliary/meson.build +@@ -440,7 +440,6 @@ files_libgalliumvl = files( + 'vl/vl_compositor_cs.h', + 'vl/vl_csc.c', + 'vl/vl_csc.h', +- 'vl/vl_decoder.c', + 'vl/vl_decoder.h', + 'vl/vl_defines.h', + 'vl/vl_deint_filter.c', +@@ -461,7 +460,6 @@ files_libgalliumvl = files( + 'vl/vl_types.h', + 'vl/vl_vertex_buffers.c', + 'vl/vl_vertex_buffers.h', +- 'vl/vl_video_buffer.c', + 'vl/vl_video_buffer.h', + 'vl/vl_vlc.h', + 'vl/vl_zscan.c', Index: head/graphics/mesa-dri/files/extra-src_gallium_auxiliary_vl_vl__stubs.c =================================================================== --- head/graphics/mesa-dri/files/extra-src_gallium_auxiliary_vl_vl__stubs.c +++ head/graphics/mesa-dri/files/extra-src_gallium_auxiliary_vl_vl__stubs.c @@ -0,0 +1,17 @@ +--- src/gallium/auxiliary/vl/vl_stubs.c.orig 2020-09-23 21:12:53 UTC ++++ src/gallium/auxiliary/vl/vl_stubs.c +@@ -140,6 +140,14 @@ vl_create_mpeg12_decoder(struct pipe_context *pipe, + return NULL; + } + ++struct pipe_video_buffer * ++vl_video_buffer_create_as_resource(struct pipe_context *pipe, ++ const struct pipe_video_buffer *tmpl) ++{ ++ assert(0); ++ return NULL; ++} ++ + /* + * vl_zscan + */ Index: head/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c =================================================================== --- head/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c +++ head/graphics/mesa-dri/files/extra-src_mesa_drivers_dri_i965_intel__screen.c @@ -1,37 +0,0 @@ -# Partial revert of the following commit because the feature check fails on 10.x -# which disables HW accel on gen4+ (the new check occurs for gen6+ as well) - -From 088449487ebcb72561d73ffb91c96302583445a8 Mon Sep 17 00:00:00 2001 -From: Kenneth Graunke -Date: Wed, 22 Mar 2017 15:20:51 -0700 -Subject: i965: Require Kernel 3.6 for Gen4-5 platforms. - -We've already required Kernel 3.6 on Gen6+ since Mesa 9.2 (May 2013, -commit 92d2f5acfadea672417b6785710c9e8b7f605e41). It seems reasonable -to require it for Gen4-5 as well, bumping the requirement from 2.6.39. - -This is necessary for glClientWaitSync with a timeout to work, which -is a feature we expose on Gen4-5. Without it, we would fall back to an -infinite wait, which is pretty bad. - -See kernel commit 172cf15d18889313bf2c3bfb81fcea08369274ef in 3.6+. - -Reviewed-by: Matt Turner - -diff --git a/src/mesa/drivers/dri/i965/intel_screen.c b/src/mesa/drivers/dri/i965/intel_screen.c -index c7f111d..bc998ab 100644 ---- src/mesa/drivers/dri/i965/intel_screen.c -+++ src/mesa/drivers/dri/i965/intel_screen.c -@@ -1776,8 +1776,8 @@ intel_init_bufmgr(struct intel_screen *screen) - return false; - } - -- if (!intel_get_boolean(screen, I915_PARAM_HAS_EXEC_NO_RELOC)) { -- fprintf(stderr, "[%s: %u] Kernel 3.9 required.\n", __func__, __LINE__); -+ if (!intel_get_boolean(screen, I915_PARAM_HAS_RELAXED_DELTA)) { -+ fprintf(stderr, "[%s: %u] Kernel 2.6.39 required.\n", __func__, __LINE__); - return false; - } - --- -cgit v0.10.2 Index: head/graphics/mesa-dri/files/patch-75e5720e.c =================================================================== --- head/graphics/mesa-dri/files/patch-75e5720e.c +++ head/graphics/mesa-dri/files/patch-75e5720e.c @@ -1,69 +0,0 @@ -commit 75e5720e1a64fac116e19cd9a7682b1d0f530149 -Author: Timur Kristóf -Date: Tue Jan 21 16:36:54 2020 +0100 - - radeon: Fix multiple definition error with radeon_debug - - Signed-off-by: Timur Kristóf - Reviewed-by: Marek Olšák - Tested-by: Marge Bot - Part-of: - -diff --git src/mesa/drivers/dri/radeon/radeon_debug.c src/mesa/drivers/dri/radeon/radeon_debug.c -index 91f86a96b52..4ac974473e2 100644 ---- src/mesa/drivers/dri/radeon/radeon_debug.c -+++ src/mesa/drivers/dri/radeon/radeon_debug.c -@@ -57,13 +57,17 @@ static const struct debug_control debug_control[] = { - {NULL, 0} - }; - --radeon_debug_type_t radeon_enabled_debug_types; -+#if defined(RADEON_R200) -+radeon_debug_type_t r200_enabled_debug_types; -+#elif defined(RADEON_R100) -+radeon_debug_type_t r100_enabled_debug_types; -+#endif - - void radeon_init_debug(void) - { -- radeon_enabled_debug_types = parse_debug_string(getenv("RADEON_DEBUG"), debug_control); -+ RADEON_DEBUG = parse_debug_string(getenv("RADEON_DEBUG"), debug_control); - -- radeon_enabled_debug_types |= RADEON_GENERAL; -+ RADEON_DEBUG |= RADEON_GENERAL; - } - - void _radeon_debug_add_indent(void) -diff --git src/mesa/drivers/dri/radeon/radeon_debug.h src/mesa/drivers/dri/radeon/radeon_debug.h -index df2f1abfbf2..8f56ec6769b 100644 ---- src/mesa/drivers/dri/radeon/radeon_debug.h -+++ src/mesa/drivers/dri/radeon/radeon_debug.h -@@ -81,18 +81,24 @@ struct radeon_debug { - char indent[RADEON_MAX_INDENT]; - }; - --extern radeon_debug_type_t radeon_enabled_debug_types; -- - /** - * Compabibility layer for old debug code - **/ --#define RADEON_DEBUG radeon_enabled_debug_types -+#if defined(RADEON_R200) -+extern radeon_debug_type_t r200_enabled_debug_types; -+#define RADEON_DEBUG r200_enabled_debug_types -+#elif defined(RADEON_R100) -+extern radeon_debug_type_t r100_enabled_debug_types; -+#define RADEON_DEBUG r100_enabled_debug_types -+#else -+#error "Neither RADEON_R100 nor RADEON_R200 are defined." -+#endif - - static inline int radeon_is_debug_enabled(const radeon_debug_type_t type, - const radeon_debug_level_t level) - { - return RADEON_DEBUG_LEVEL >= level -- && (type & radeon_enabled_debug_types); -+ && (type & RADEON_DEBUG); - } - - extern void _radeon_print(const radeon_debug_type_t type, Index: head/graphics/mesa-dri/files/patch-a134ac5e.c =================================================================== --- head/graphics/mesa-dri/files/patch-a134ac5e.c +++ head/graphics/mesa-dri/files/patch-a134ac5e.c @@ -1,40 +0,0 @@ -commit a134ac5ee9355779e015f8d7f9fe3e2ab22cdb86 -Author: Timur Kristóf -Date: Tue Jan 21 16:08:21 2020 +0100 - - r600: Move get_pic_param to radeon_vce.c - - Signed-off-by: Timur Kristóf - Reviewed-by: Marek Olšák - Part-of: - -diff --git src/gallium/drivers/r600/radeon_vce.c src/gallium/drivers/r600/radeon_vce.c -index 4051d73533d..16f48c69456 100644 ---- src/gallium/drivers/r600/radeon_vce.c -+++ src/gallium/drivers/r600/radeon_vce.c -@@ -54,6 +54,10 @@ - #define FW_52_8_3 ((52 << 24) | (8 << 16) | (3 << 8)) - #define FW_53 (53 << 24) - -+/* version specific function for getting parameters */ -+static void (*get_pic_param)(struct rvce_encoder *enc, -+ struct pipe_h264_enc_picture_desc *pic) = NULL; -+ - /** - * flush commands to the hardware - */ -diff --git src/gallium/drivers/r600/radeon_vce.h src/gallium/drivers/r600/radeon_vce.h -index 71f028721b4..c5e05477763 100644 ---- src/gallium/drivers/r600/radeon_vce.h -+++ src/gallium/drivers/r600/radeon_vce.h -@@ -443,10 +443,6 @@ void radeon_vce_50_init(struct rvce_encoder *enc); - /* init vce fw 52 specific callbacks */ - void radeon_vce_52_init(struct rvce_encoder *enc); - --/* version specific function for getting parameters */ --void (*get_pic_param)(struct rvce_encoder *enc, -- struct pipe_h264_enc_picture_desc *pic); -- - /* get parameters for vce 40.2.2 */ - void radeon_vce_40_2_2_get_param(struct rvce_encoder *enc, - struct pipe_h264_enc_picture_desc *pic); Index: head/graphics/mesa-dri/files/patch-b7f97598.c =================================================================== --- head/graphics/mesa-dri/files/patch-b7f97598.c +++ head/graphics/mesa-dri/files/patch-b7f97598.c @@ -1,40 +0,0 @@ -commit b7f975980916d670dcfc280af1678f4439a59d2f -Author: Timur Kristóf -Date: Tue Jan 21 16:04:33 2020 +0100 - - radeon: Move si_get_pic_param to radeon_vce.c - - Signed-off-by: Timur Kristóf - Reviewed-by: Marek Olšák - Part-of: - -diff --git src/gallium/drivers/radeon/radeon_vce.c src/gallium/drivers/radeon/radeon_vce.c -index 84d3c1e2fa4..652b4250654 100644 ---- src/gallium/drivers/radeon/radeon_vce.c -+++ src/gallium/drivers/radeon/radeon_vce.c -@@ -48,6 +48,10 @@ - #define FW_52_8_3 ((52 << 24) | (8 << 16) | (3 << 8)) - #define FW_53 (53 << 24) - -+/* version specific function for getting parameters */ -+static void (*si_get_pic_param)(struct rvce_encoder *enc, -+ struct pipe_h264_enc_picture_desc *pic) = NULL; -+ - /** - * flush commands to the hardware - */ -diff --git src/gallium/drivers/radeon/radeon_vce.h src/gallium/drivers/radeon/radeon_vce.h -index cf625e6fed7..b5cfe178061 100644 ---- src/gallium/drivers/radeon/radeon_vce.h -+++ src/gallium/drivers/radeon/radeon_vce.h -@@ -437,10 +437,6 @@ void si_vce_50_init(struct rvce_encoder *enc); - /* init vce fw 52 specific callbacks */ - void si_vce_52_init(struct rvce_encoder *enc); - --/* version specific function for getting parameters */ --void (*si_get_pic_param)(struct rvce_encoder *enc, -- struct pipe_h264_enc_picture_desc *pic); -- - /* get parameters for vce 40.2.2 */ - void si_vce_40_2_2_get_param(struct rvce_encoder *enc, - struct pipe_h264_enc_picture_desc *pic); Index: head/graphics/mesa-dri/files/patch-bd4380c6.c =================================================================== --- head/graphics/mesa-dri/files/patch-bd4380c6.c +++ head/graphics/mesa-dri/files/patch-bd4380c6.c @@ -1,28 +0,0 @@ -commit bd4380c63c3b8b8b5f60dc840809dbe96a222fd7 -Author: Bas Nieuwenhuizen -Date: Tue Jan 21 11:49:55 2020 +0100 - - radv: Remove syncobj_handle variable in header. - - I strongly suspect it was supposed to be a typedef. However, used - nowhere, we should remove it. - - Fixes: eaa56eab6da "radv: initial support for shared semaphores (v2)" - Closes: https://gitlab.freedesktop.org/mesa/mesa/issues/2385 - Reviewed-by: Michel Dänzer - Reviewed-by: Samuel Pitoiset - Tested-by: Marge Bot - Part-of: - -diff --git src/amd/vulkan/radv_radeon_winsys.h src/amd/vulkan/radv_radeon_winsys.h -index c8790917bcc..5c7b1ab5118 100644 ---- src/amd/vulkan/radv_radeon_winsys.h -+++ src/amd/vulkan/radv_radeon_winsys.h -@@ -156,7 +156,6 @@ struct radeon_bo_metadata { - uint32_t metadata[64]; - }; - --uint32_t syncobj_handle; - struct radeon_winsys_fence; - - struct radeon_winsys_bo { Index: head/graphics/mesa-dri/files/patch-compat-include-guards =================================================================== --- head/graphics/mesa-dri/files/patch-compat-include-guards +++ head/graphics/mesa-dri/files/patch-compat-include-guards @@ -1,64 +0,0 @@ -Partially revert https://cgit.freedesktop.org/mesa/mesa/commit/?id=f7d42ee7d319 -in order to allow ports like devel/allegro, devel/sdl{12,20}, graphics/glew, -graphics/libepoxy, x11-toolkits/qt5-gui to skip inclusion via . - ---- include/GLES2/gl2.h.orig 2018-11-09 11:03:00 UTC -+++ include/GLES2/gl2.h -@@ -1,5 +1,5 @@ --#ifndef __gles2_gl2_h_ --#define __gles2_gl2_h_ 1 -+#ifndef __gl2_h_ -+#define __gl2_h_ 1 - - #ifdef __cplusplus - extern "C" { ---- include/GLES2/gl2ext.h.orig 2018-11-09 11:03:00 UTC -+++ include/GLES2/gl2ext.h -@@ -1,5 +1,5 @@ --#ifndef __gles2_gl2ext_h_ --#define __gles2_gl2ext_h_ 1 -+#ifndef __gl2ext_h_ -+#define __gl2ext_h_ 1 - - #ifdef __cplusplus - extern "C" { ---- include/GLES3/gl3.h.orig 2018-11-09 11:03:00 UTC -+++ include/GLES3/gl3.h -@@ -1,5 +1,5 @@ --#ifndef __gles2_gl3_h_ --#define __gles2_gl3_h_ 1 -+#ifndef __gl3_h_ -+#define __gl3_h_ 1 - - #ifdef __cplusplus - extern "C" { ---- include/GL/glcorearb.h.orig 2018-11-09 11:03:00 UTC -+++ include/GL/glcorearb.h -@@ -1,5 +1,5 @@ --#ifndef __gl_glcorearb_h_ --#define __gl_glcorearb_h_ 1 -+#ifndef __glcorearb_h_ -+#define __glcorearb_h_ 1 - - #ifdef __cplusplus - extern "C" { ---- include/GL/glext.h.orig 2018-11-09 11:03:00 UTC -+++ include/GL/glext.h -@@ -1,5 +1,5 @@ --#ifndef __gl_glext_h_ --#define __gl_glext_h_ 1 -+#ifndef __glext_h_ -+#define __glext_h_ 1 - - #ifdef __cplusplus - extern "C" { ---- include/GL/glxext.h.orig 2018-11-09 11:03:00 UTC -+++ include/GL/glxext.h -@@ -1,5 +1,5 @@ --#ifndef __glx_glxext_h_ --#define __glx_glxext_h_ 1 -+#ifndef __glxext_h_ -+#define __glxext_h_ 1 - - #ifdef __cplusplus - extern "C" { Index: head/graphics/mesa-dri/files/patch-eda36feb.c =================================================================== --- head/graphics/mesa-dri/files/patch-eda36feb.c +++ head/graphics/mesa-dri/files/patch-eda36feb.c @@ -1,36 +0,0 @@ -commit eda36feb2b7eef8347f579c3c8590a8f09017cf0 -Author: Mark Janes -Date: Fri Apr 5 11:39:18 2019 -0700 - - intel/tools: Remove redundant definitions of INTEL_DEBUG - - INTEL_DEBUG is declared extern and defined in gen_debug.c - - Reviewed-by: Kenneth Graunke - -diff --git src/intel/common/gen_disasm.c src/intel/common/gen_disasm.c -index 4f835c19883..656613cd931 100644 ---- src/intel/common/gen_disasm.c -+++ src/intel/common/gen_disasm.c -@@ -28,8 +28,6 @@ - - #include "gen_disasm.h" - --uint64_t INTEL_DEBUG; -- - struct gen_disasm { - struct gen_device_info devinfo; - }; -diff --git src/intel/tools/i965_disasm.c src/intel/tools/i965_disasm.c -index 79434e6462a..5fe4afa35ff 100644 ---- src/intel/tools/i965_disasm.c -+++ src/intel/tools/i965_disasm.c -@@ -29,8 +29,6 @@ - #include "compiler/brw_eu.h" - #include "dev/gen_device_info.h" - --uint64_t INTEL_DEBUG; -- - /* Return size of file in bytes pointed by fp */ - static size_t - i965_disasm_get_file_size(FILE *fp) Index: head/graphics/mesa-dri/files/patch-i386 =================================================================== --- head/graphics/mesa-dri/files/patch-i386 +++ head/graphics/mesa-dri/files/patch-i386 @@ -1,53 +0,0 @@ -FreeBSD doesn't ship libatomic for Clang to use, so use __sync* atomics. -https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=230888 - -Checking if "GCC atomic builtins" compiles: YES -Checking if "GCC atomic builtins required -latomic" links: NO - -meson.build:1098:4: ERROR: C library 'atomic' not found - -ld.lld: error: undefined symbol: __atomic_load_8 ->>> referenced by testfile.c ->>> /tmp/testfile-055958.o:(main) - -ld.lld: error: undefined symbol: __atomic_fetch_add_8 ->>> referenced by testfile.c ->>> /tmp/testfile-055958.o:(main) -cc: error: linker command failed with exit code 1 (use -v to see invocation) - ---- meson.build.orig 2020-05-30 21:28:01 UTC -+++ meson.build -@@ -1068,7 +1068,7 @@ endif - # Check for GCC style atomics - dep_atomic = null_dep - --if cc.compiles('''#include -+if cc.links('''#include - int main() { - struct { - uint64_t *v; -@@ -1079,24 +1079,6 @@ if cc.compiles('''#include - }''', - name : 'GCC atomic builtins') - pre_args += '-DUSE_GCC_ATOMIC_BUILTINS' -- -- # Not all atomic calls can be turned into lock-free instructions, in which -- # GCC will make calls into the libatomic library. Check whether we need to -- # link with -latomic. -- # -- # This can happen for 64-bit atomic operations on 32-bit architectures such -- # as ARM. -- if not cc.links('''#include -- int main() { -- struct { -- uint64_t *v; -- } x; -- return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & -- (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); -- }''', -- name : 'GCC atomic builtins required -latomic') -- dep_atomic = cc.find_library('atomic') -- endif - endif - if not cc.links('''#include - uint64_t v; Index: head/graphics/mesa-dri/files/patch-include_GL_internal_dri__interface.h =================================================================== --- head/graphics/mesa-dri/files/patch-include_GL_internal_dri__interface.h +++ head/graphics/mesa-dri/files/patch-include_GL_internal_dri__interface.h @@ -1,19 +0,0 @@ -GCC on 9.x doesn't allow types to be overwritten, these types are defined -in drm.h also, which causes build issues in xorg-server. - ---- include/GL/internal/dri_interface.h.orig 2017-12-21 17:31:21 UTC -+++ include/GL/internal/dri_interface.h -@@ -40,13 +40,7 @@ - #ifndef DRI_INTERFACE_H - #define DRI_INTERFACE_H - --#ifdef HAVE_LIBDRM - #include --#else --typedef unsigned int drm_context_t; --typedef unsigned int drm_drawable_t; --typedef struct drm_clip_rect drm_clip_rect_t; --#endif - - #include - Index: head/graphics/mesa-dri/files/patch-meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-meson.build +++ head/graphics/mesa-dri/files/patch-meson.build @@ -1,64 +1,42 @@ -- Do not define GLX_USE_TLS, this doesn't work on all FreeBSD version - Later mesa version rename this to USE_ELF_TLS and make it conditional - on some platform, but for now simply comment it here. - See https://github.com/dumbbell/test-tls-initial-exec for more info -- Add dependency on libxv for xvmc, this is fixed in later mesa version. -- Define _GNU_SOURCE on FreeBSD, adapted from - https://gitlab.freedesktop.org/mesa/mesa/commit/b4f508ab5990 -- sys/sysctl.h needs sys/types.h to be properly detected, adapted from - https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5462/diffs ---- meson.build.orig 2020-06-14 07:52:34 UTC +--- meson.build.orig 2020-10-06 07:15:26 UTC +++ meson.build -@@ -25,7 +25,7 @@ project( - [find_program('python', 'python2', 'python3'), 'bin/meson_get_version.py'] - ).stdout(), - license : 'MIT', -- meson_version : '>= 0.45', -+ meson_version : '>= 0.46', - default_options : ['buildtype=debugoptimized', 'b_ndebug=if-release', 'c_std=c99', 'cpp_std=c++11'] - ) - -@@ -336,7 +336,7 @@ if with_egl and not (with_platform_drm or with_platfor - endif +@@ -1108,9 +1108,9 @@ else endif --pre_args += '-DGLX_USE_TLS' -+#pre_args += '-DGLX_USE_TLS' - if with_glx != 'disabled' - if not (with_platform_x11 and with_any_opengl) - error('Cannot build GLX support without X11 platform support and at least one OpenGL API') -@@ -458,7 +458,8 @@ dep_xvmc = null_dep - with_gallium_xvmc = false - if _xvmc != 'false' - dep_xvmc = dependency('xvmc', version : '>= 1.0.6', required : _xvmc == 'true') -- with_gallium_xvmc = dep_xvmc.found() -+ dep_xv = dependency('xv', required: _xvmc == 'true') -+ with_gallium_xvmc = dep_xvmc.found() and dep_xv.found() - endif + # Check for GCC style atomics +-dep_atomic = null_dep ++dep_atomic = cc.find_library('atomic', required : false) - xvmc_drivers_path = get_option('xvmc-libs-path') -@@ -792,7 +793,7 @@ if cc.compiles('int foo(void) __attribute__((__noretur - endif +-if cc.compiles('''#include ++if cc.links('''#include + int main() { + struct { + uint64_t *v; +@@ -1119,26 +1119,9 @@ if cc.compiles('''#include + (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); - # TODO: this is very incomplete --if ['linux', 'cygwin', 'gnu'].contains(host_machine.system()) -+if ['linux', 'cygwin', 'gnu', 'freebsd', 'gnu/kfreebsd'].contains(host_machine.system()) - pre_args += '-D_GNU_SOURCE' + }''', ++ dependencies : dep_atomic, + name : 'GCC atomic builtins') + pre_args += '-DUSE_GCC_ATOMIC_BUILTINS' +- +- # Not all atomic calls can be turned into lock-free instructions, in which +- # GCC will make calls into the libatomic library. Check whether we need to +- # link with -latomic. +- # +- # This can happen for 64-bit atomic operations on 32-bit architectures such +- # as ARM. +- if not cc.links('''#include +- int main() { +- struct { +- uint64_t *v; +- } x; +- return (int)__atomic_load_n(x.v, __ATOMIC_ACQUIRE) & +- (int)__atomic_add_fetch(x.v, (uint64_t)1, __ATOMIC_ACQ_REL); +- }''', +- name : 'GCC atomic builtins required -latomic') +- dep_atomic = cc.find_library('atomic') +- endif endif - -@@ -977,7 +978,14 @@ elif cc.has_header_symbol('sys/mkdev.h', 'major') - pre_args += '-DMAJOR_IN_MKDEV' - endif - --foreach h : ['xlocale.h', 'sys/sysctl.h', 'linux/futex.h', 'endian.h', 'dlfcn.h'] -+if not ['linux'].contains(host_machine.system()) -+ # Deprecated on Linux and requires on FreeBSD and OpenBSD -+ if cc.check_header('sys/sysctl.h', prefix : '#include ') -+ pre_args += '-DHAVE_SYS_SYSCTL_H' -+ endif -+endif -+ -+foreach h : ['xlocale.h', 'linux/futex.h', 'endian.h', 'dlfcn.h'] - if cc.compiles('#include <@0@>'.format(h), name : '@0@'.format(h)) - pre_args += '-DHAVE_@0@'.format(h.to_upper().underscorify()) - endif + if not cc.links('''#include + uint64_t v; Index: head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c +++ head/graphics/mesa-dri/files/patch-src_amd_vulkan_radv__device.c @@ -1,19 +1,13 @@ -- Define CLOCK_MONOTONIC_RAW if missing - ---- src/amd/vulkan/radv_device.c.orig 2018-11-06 16:16:02 UTC +--- src/amd/vulkan/radv_device.c.orig 2020-09-28 22:52:10 UTC +++ src/amd/vulkan/radv_device.c -@@ -50,6 +50,14 @@ - #include "util/debug.h" - #include "util/mesa-sha1.h" +@@ -56,6 +56,10 @@ + #include "compiler/glsl_types.h" + #include "util/driconf.h" -+#ifndef CLOCK_MONOTONIC_RAW -+# ifdef CLOCK_MONOTONIC_FAST -+# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST -+# else -+# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC -+# endif ++#if DETECT_OS_FREEBSD ++#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST +#endif + - static int - radv_device_get_cache_uuid(enum radeon_family family, void *uuid) - { + static struct radv_timeline_point * + radv_timeline_find_point_at_least_locked(struct radv_device *device, + struct radv_timeline *timeline, Index: head/graphics/mesa-dri/files/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c +++ head/graphics/mesa-dri/files/patch-src_amd_vulkan_winsys_amdgpu_radv__amdgpu__cs.c @@ -1,14 +0,0 @@ -- Define ETIME if missing - ---- src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c.orig 2018-01-23 18:08:49 UTC -+++ src/amd/vulkan/winsys/amdgpu/radv_amdgpu_cs.c -@@ -33,6 +33,9 @@ - #include "radv_amdgpu_bo.h" - #include "sid.h" - -+#ifndef ETIME -+#define ETIME ETIMEDOUT -+#endif - - enum { - VIRTUAL_BUFFER_HASH_TABLE_SIZE = 1024 Index: head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c +++ head/graphics/mesa-dri/files/patch-src_gallium_auxiliary_pipe-loader_pipe__loader__drm.c @@ -1,118 +0,0 @@ -Revert the following commit. - -FreeBSD and DragonFly don't have the required render nodes. - -------- - -From 69a1b9959e59653da262185c4e2cf57d24939b19 Mon Sep 17 00:00:00 2001 -From: Emil Velikov -Date: Mon, 29 Jun 2015 12:36:45 +0100 -Subject: pipe-loader: drop support for non-render node devices - -Render nodes have been around for quite some time. Removing support via -the master/primary node allows us to clean up the conditional -compilation and simplify the build greatly. - -For example currently we the pipe-loader, which explicitly links against -xcb and friends (for X auth) if found at compile-time. That -would cause problems as one will be forced to use X/xcb, even if it's a -headless system that is used for opencl. - -v2: Clarify the linking topic in the commit message. - -Cc: Tom Stellard -Signed-off-by: Emil Velikov -Reviewed-by: Francisco Jerez - - ---- src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c.orig 2017-12-21 17:31:21 UTC -+++ src/gallium/auxiliary/pipe-loader/pipe_loader_drm.c -@@ -207,6 +207,14 @@ pipe_loader_drm_probe_fd(struct pipe_loa - } - - static int -+open_drm_minor(int minor) -+{ -+ char path[PATH_MAX]; -+ snprintf(path, sizeof(path), DRM_DEV_NAME, DRM_DIR_NAME, minor); -+ return open(path, O_RDWR, 0); -+} -+ -+static int - open_drm_render_node_minor(int minor) - { - char path[PATH_MAX]; -@@ -218,8 +226,15 @@ open_drm_render_node_minor(int minor) - int - pipe_loader_drm_probe(struct pipe_loader_device **devs, int ndev) - { -- int i, j, fd; -+ int i, k, fd, num_render_node_devs; -+ int j = 0; -+ -+ struct { -+ unsigned vendor_id; -+ unsigned chip_id; -+ } render_node_devs[DRM_RENDER_NODE_MAX_NODES]; - -+ /* Look for render nodes first */ - for (i = DRM_RENDER_NODE_MIN_MINOR, j = 0; - i <= DRM_RENDER_NODE_MAX_MINOR; i++) { - struct pipe_loader_device *dev; -@@ -233,6 +248,9 @@ pipe_loader_drm_probe(struct pipe_loader - continue; - } - -+ render_node_devs[j].vendor_id = dev->u.pci.vendor_id; -+ render_node_devs[j].chip_id = dev->u.pci.chip_id; -+ - if (j < ndev) { - devs[j] = dev; - } else { -@@ -242,6 +260,46 @@ pipe_loader_drm_probe(struct pipe_loader - j++; - } - -+ num_render_node_devs = j; -+ -+ /* Next look for drm devices. */ -+ for (i = 0; i < DRM_MAX_MINOR; i++) { -+ struct pipe_loader_device *dev; -+ boolean duplicate = FALSE; -+ fd = open_drm_minor(i); -+ if (fd < 0) -+ continue; -+ -+ if (!pipe_loader_drm_probe_fd(&dev, fd)) { -+ close(fd); -+ continue; -+ } -+ -+ /* Check to make sure we aren't already accessing this device via -+ * render nodes. -+ */ -+ for (k = 0; k < num_render_node_devs; k++) { -+ if (dev->u.pci.vendor_id == render_node_devs[k].vendor_id && -+ dev->u.pci.chip_id == render_node_devs[k].chip_id) { -+ close(fd); -+ dev->ops->release(&dev); -+ duplicate = TRUE; -+ break; -+ } -+ } -+ -+ if (duplicate) -+ continue; -+ -+ if (j < ndev) { -+ devs[j] = dev; -+ } else { -+ dev->ops->release(&dev); -+ } -+ -+ j++; -+ } -+ - return j; - } - Index: head/graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__config.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__config.h +++ head/graphics/mesa-dri/files/patch-src_gallium_include_pipe_p__config.h @@ -1,15 +0,0 @@ ---- src/gallium/include/pipe/p_config.h.orig 2019-06-26 20:14:08 UTC -+++ src/gallium/include/pipe/p_config.h -@@ -160,6 +160,12 @@ - #define PIPE_OS_ANDROID - #endif - -+#if defined(__DragonFly__) -+#define PIPE_OS_DRAGONFLY -+#define PIPE_OS_BSD -+#define PIPE_OS_UNIX -+#endif -+ - #if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) - #define PIPE_OS_FREEBSD - #define PIPE_OS_BSD Index: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp +++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp @@ -1,30 +0,0 @@ -# fix errors like the following -# -# llvm/invocation.cpp:(.text+0x1275): undefined reference to `std::__1::basic_string, std::__1::allocator >::c_str() - const' -# /usr/bin/ld: ../../../../src/gallium/state_trackers/clover/.libs/libclover.a(libclllvm_la-invocation.o): relocation R_X86_64_PC32 against `_ZNKSt3__112bas -ic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEE5c_strEv' can not be used when making a shared object; recompile with -fPIC -# /usr/bin/ld: final link failed: Bad value -# ---- src/gallium/state_trackers/clover/llvm/invocation.cpp.orig 2017-04-01 15:33:37 UTC -+++ src/gallium/state_trackers/clover/llvm/invocation.cpp -@@ -93,6 +93,8 @@ namespace { - return ctx; - } - -+ const char* cstr(const std::string& str) { return str.c_str(); } -+ - std::unique_ptr - create_compiler_instance(const target &target, - const std::vector &opts, -@@ -105,8 +107,8 @@ namespace { - // Parse the compiler options. A file name should be present at the end - // and must have the .cl extension in order for the CompilerInvocation - // class to recognize it as an OpenCL source file. -- const std::vector copts = -- map(std::mem_fn(&std::string::c_str), opts); -+ std::vector copts(opts.size()); -+ std::transform(opts.begin(), opts.end(), copts.begin(), cstr); - - if (!clang::CompilerInvocation::CreateFromArgs( - c->getInvocation(), copts.data(), copts.data() + copts.size(), diag)) Index: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp +++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp @@ -1,13 +0,0 @@ -# Fix error: no matching constructor for initialization of 'std::vector' -# ---- src/gallium/state_trackers/clover/llvm/metadata.hpp.orig 2016-11-10 22:05:17 UTC -+++ src/gallium/state_trackers/clover/llvm/metadata.hpp -@@ -42,7 +42,7 @@ namespace clover { - get_kernel_nodes(const ::llvm::Module &mod) { - if (const ::llvm::NamedMDNode *n = - mod.getNamedMetadata("opencl.kernels")) -- return { n->op_begin(), n->op_end() }; -+ return { n->getOperand(0), n->getOperand(n->getNumOperands()) }; - else - return {}; - } Index: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_util_range.hpp =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_util_range.hpp +++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_clover_util_range.hpp @@ -1,31 +0,0 @@ -From b95533b981af9a6687b41418e7cc2a5652fc2bdb Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Jean-S=C3=A9bastien=20P=C3=A9dron?= -Date: Fri, 7 Mar 2014 15:16:08 +0100 -Subject: [PATCH 3/3] Work around for clang 3.4 which fails to build Clover - -See: - https://bugs.freedesktop.org/show_bug.cgi?id=74098#c3 ---- src/gallium/state_trackers/clover/util/range.hpp.orig 2016-11-10 22:05:17 UTC -+++ src/gallium/state_trackers/clover/util/range.hpp -@@ -362,6 +362,12 @@ namespace clover { - return { i, i + n }; - } - -+ namespace detail { -+ template -+ using fixup_function_type = -+ typename std::conditional::value, T &, T>::type; -+ } -+ - /// - /// Create a range by transforming the contents of a number of - /// source ranges \a rs element-wise using a provided functor \a f. -@@ -369,7 +375,7 @@ namespace clover { - /// \sa adaptor_range. - /// - template -- adaptor_range -+ adaptor_range, Rs...> - map(F &&f, Rs &&... rs) { - return { std::forward(f), std::forward(rs)... }; - } Index: head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build +++ head/graphics/mesa-dri/files/patch-src_gallium_state__trackers_xvmc_meson.build @@ -1,19 +0,0 @@ ---- src/gallium/state_trackers/xvmc/meson.build.orig 2019-06-26 20:14:08 UTC -+++ src/gallium/state_trackers/xvmc/meson.build -@@ -18,12 +18,15 @@ - # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE - # SOFTWARE. - -+XVMC_MAJOR = 1 -+XVMC_MINOR = 0 -+ - libxvmc_st = static_library( - 'xvmc_st', - files('attributes.c', 'block.c', 'context.c', 'surface.c', 'subpicture.c'), - c_args : [c_vis_args], - include_directories : [inc_common], -- dependencies : [dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3], -+ dependencies : [dep_xvmc, dep_x11_xcb, dep_xcb, dep_xcb_dri2, dep_xcb_dri3, dep_xv], - ) - - # These tests will not work without a working xvmc configuration. Index: head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build =================================================================== --- head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build +++ head/graphics/mesa-dri/files/patch-src_gallium_targets_xvmc_meson.build @@ -1,11 +0,0 @@ ---- src/gallium/targets/xvmc/meson.build.orig 2020-06-04 18:31:48 UTC -+++ src/gallium/targets/xvmc/meson.build -@@ -55,7 +55,7 @@ libxvmc_gallium = shared_library( - - foreach d : [[with_gallium_r600, 'r600'], [with_gallium_nouveau, 'nouveau']] - if d[0] -- xvmc_drivers += 'libXvMC@0@.so'.format(d[1]) -+ xvmc_drivers += 'libXvMC@0@.so.@1@.@2@.0'.format(d[1], XVMC_MAJOR, XVMC_MINOR) - endif - endforeach - Index: head/graphics/mesa-dri/files/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp +++ head/graphics/mesa-dri/files/patch-src_intel_compiler_brw__fs__bank__conflicts.cpp @@ -1,18 +0,0 @@ -compiler/brw_fs_bank_conflicts.cpp:719:25: error: scalar initializer cannot be empty - vector_type s_p = {}, s_n = {}; - ^~ -compiler/brw_fs_bank_conflicts.cpp:719:35: error: scalar initializer cannot be empty - vector_type s_p = {}, s_n = {}; - ^~ - ---- src/intel/compiler/brw_fs_bank_conflicts.cpp.orig 2018-01-23 18:08:50 UTC -+++ src/intel/compiler/brw_fs_bank_conflicts.cpp -@@ -716,7 +716,7 @@ namespace { - const weight_vector_type &conflicts) - { - const unsigned m = DIV_ROUND_UP(conflicts.size, vector_width); -- vector_type s_p = {}, s_n = {}; -+ vector_type s_p = {0}, s_n = {0}; - - for (unsigned r = 0; r < m; r++) { - s_p = adds(s_p, mask(bank_mask_p.v[r], conflicts.v[r])); Index: head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aub__mem.c @@ -1,39 +0,0 @@ -- Partially implement memfd_create() via mkostemp() - ---- src/intel/tools/aub_mem.c.orig 2018-11-06 16:16:02 UTC -+++ src/intel/tools/aub_mem.c -@@ -30,11 +30,34 @@ - - #ifndef HAVE_MEMFD_CREATE - #include -+#include - - static inline int - memfd_create(const char *name, unsigned int flags) - { -+#if defined(__linux__) - return syscall(SYS_memfd_create, name, flags); -+#elif defined(__FreeBSD__) -+ return shm_open(SHM_ANON, flags | O_RDWR | O_CREAT, 0600); -+#else /* DragonFly, NetBSD, OpenBSD, Solaris */ -+ char template[] = "/tmp/shmfd-XXXXXX"; -+#ifdef HAVE_MKOSTEMP -+ int fd = mkostemp(template, flags); -+#else -+ int fd = mkstemp(template); -+ if (flags & O_CLOEXEC) { -+ int flags = fcntl(fd, F_GETFD); -+ if (flags != -1) { -+ flags |= FD_CLOEXEC; -+ (void) fcntl(fd, F_SETFD, &flags); -+ } -+ } -+#endif /* HAVE_MKOSTEMP */ -+ if (fd >= 0) -+ unlink(template); -+ -+ return fd; -+#endif /* __linux__ */ - } - #endif - Index: head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c +++ head/graphics/mesa-dri/files/patch-src_intel_tools_aubinator__error__decode.c @@ -1,14 +0,0 @@ -# expose getline in FreeBSD's stdio.h -# ---- src/intel/tools/aubinator_error_decode.c.orig 2017-05-10 14:13:57 UTC -+++ src/intel/tools/aubinator_error_decode.c -@@ -22,6 +22,9 @@ - * - */ - -+#if defined(__FreeBSD__) && __FreeBSD__ < 12 -+#define _WITH_GETLINE -+#endif - #include - #include - #include Index: head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c +++ head/graphics/mesa-dri/files/patch-src_intel_tools_error2aub.c @@ -1,14 +0,0 @@ -# expose getline in FreeBSD's stdio.h -# ---- src/intel/tools/error2aub.c.orig 2018-08-09 00:34:30 UTC -+++ src/intel/tools/error2aub.c -@@ -26,6 +26,9 @@ - #include - #include - #include -+#if defined(__FreeBSD__) && __FreeBSD__ < 12 -+#define _WITH_GETLINE -+#endif - #include - #include - #include Index: head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__allocator.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__allocator.c +++ head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__allocator.c @@ -1,57 +0,0 @@ -- Partially implement memfd_create() via mkostemp() -- Ignore MAP_POPULATE if unsupported - ---- src/intel/vulkan/anv_allocator.c.orig 2018-01-23 18:08:50 UTC -+++ src/intel/vulkan/anv_allocator.c -@@ -25,9 +25,21 @@ - #include - #include - #include -+#ifdef __linux__ - #include -+#else -+#include -+#endif - #include - -+#ifndef MAP_POPULATE -+#define MAP_POPULATE 0 -+#endif -+ -+#ifndef MFD_CLOEXEC -+#define MFD_CLOEXEC O_CLOEXEC -+#endif -+ - #include "anv_private.h" - - #include "util/hash_table.h" -@@ -113,7 +125,29 @@ struct anv_mmap_cleanup { - static inline int - memfd_create(const char *name, unsigned int flags) - { -+#if defined(__linux__) - return syscall(SYS_memfd_create, name, flags); -+#elif defined(__FreeBSD__) -+ return shm_open(SHM_ANON, flags | O_RDWR | O_CREAT, 0600); -+#else /* DragonFly, NetBSD, OpenBSD, Solaris */ -+ char template[] = "/tmp/shmfd-XXXXXX"; -+#ifdef HAVE_MKOSTEMP -+ int fd = mkostemp(template, flags); -+#else -+ int fd = mkstemp(template); -+ if (flags & O_CLOEXEC) { -+ int flags = fcntl(fd, F_GETFD); -+ if (flags != -1) { -+ flags |= FD_CLOEXEC; -+ (void) fcntl(fd, F_SETFD, &flags); -+ } -+ } -+#endif /* HAVE_MKOSTEMP */ -+ if (fd >= 0) -+ unlink(template); -+ -+ return fd; -+#endif /* __linux__ */ - } - #endif - Index: head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c +++ head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__device.c @@ -1,50 +1,13 @@ -- Without sysinfo() fall back to sysconf() -- Define ETIME if missing -- Define CLOCK_MONOTONIC_RAW if missing - ---- src/intel/vulkan/anv_device.c.orig 2018-11-06 16:16:02 UTC +--- src/intel/vulkan/anv_device.c.orig 2020-09-28 22:52:12 UTC +++ src/intel/vulkan/anv_device.c -@@ -25,7 +25,9 @@ - #include - #include - #include -+#ifdef __GLIBC__ - #include -+#endif - #include - #include - #include -@@ -44,6 +46,17 @@ +@@ -48,6 +48,10 @@ #include "genxml/gen7_pack.h" -+#ifndef ETIME -+#define ETIME ETIMEDOUT ++#if DETECT_OS_FREEBSD ++#define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST +#endif -+#ifndef CLOCK_MONOTONIC_RAW -+# ifdef CLOCK_MONOTONIC_FAST -+# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC_FAST -+# else -+# define CLOCK_MONOTONIC_RAW CLOCK_MONOTONIC -+# endif -+#endif + - static void - compiler_debug_log(void *data, const char *fmt, ...) - { } -@@ -64,10 +73,15 @@ static VkResult - anv_compute_heap_size(int fd, uint64_t gtt_size, uint64_t *heap_size) - { - /* Query the total ram from the system */ -+#ifdef __GLIBC__ - struct sysinfo info; - sysinfo(&info); - - uint64_t total_ram = (uint64_t)info.totalram * (uint64_t)info.mem_unit; -+#else -+ uint64_t total_ram = sysconf(_SC_PHYS_PAGES) * sysconf(_SC_PAGE_SIZE); -+#endif -+ - - /* We don't want to burn too much ram with the GPU. If the user has 4GiB - * or less, we use at most half. If they have more than 4GiB, we use 3/4. + static const char anv_dri_options_xml[] = + DRI_CONF_BEGIN + DRI_CONF_SECTION_PERFORMANCE Index: head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__gem.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__gem.c +++ head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__gem.c @@ -1,14 +0,0 @@ -- Define ETIME if missing - ---- src/intel/vulkan/anv_gem.c.orig 2017-10-23 13:21:18 UTC -+++ src/intel/vulkan/anv_gem.c -@@ -26,6 +26,9 @@ - #include - #include - #include -+#ifndef ETIME -+#define ETIME ETIMEDOUT -+#endif - #include - #include - Index: head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__queue.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__queue.c +++ head/graphics/mesa-dri/files/patch-src_intel_vulkan_anv__queue.c @@ -1,18 +0,0 @@ -- Define ETIME if missing -- Drop header that was never used - ---- src/intel/vulkan/anv_queue.c.orig 2017-10-23 13:21:18 UTC -+++ src/intel/vulkan/anv_queue.c -@@ -26,8 +26,11 @@ - */ - - #include -+#include -+#ifndef ETIME -+#define ETIME ETIMEDOUT -+#endif - #include --#include - - #include "anv_private.h" - #include "vk_util.h" Index: head/graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py =================================================================== --- head/graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py +++ head/graphics/mesa-dri/files/patch-src_mapi_glapi_gen_gl__gentable.py @@ -1,11 +0,0 @@ ---- src/mapi/glapi/gen/gl_gentable.py.orig 2017-05-15 12:05:59 UTC -+++ src/mapi/glapi/gen/gl_gentable.py -@@ -43,7 +43,7 @@ header = """/* GLXEXT is the define used - #endif - - #if (defined(GLXEXT) && defined(HAVE_BACKTRACE)) \\ -- || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__DragonFly__)) -+ || (!defined(GLXEXT) && defined(DEBUG) && !defined(__CYGWIN__) && !defined(__MINGW32__) && !defined(__OpenBSD__) && !defined(__NetBSD__) && !defined(__FreeBSD__) && !defined(__DragonFly__)) - #define USE_BACKTRACE - #endif - Index: head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h +++ head/graphics/mesa-dri/files/patch-src_mesa_main_macros.h @@ -1,13 +0,0 @@ ---- src/mesa/main/macros.h.orig 2019-06-26 20:14:08 UTC -+++ src/mesa/main/macros.h -@@ -677,6 +677,10 @@ minify(unsigned value, unsigned levels) - * - * \sa ROUND_DOWN_TO() - */ -+#ifdef __FreeBSD__ -+#undef ALIGN -+#endif -+ - static inline uintptr_t - ALIGN(uintptr_t value, int32_t alignment) - { Index: head/graphics/mesa-dri/files/patch-src_util_futex.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_futex.h +++ head/graphics/mesa-dri/files/patch-src_util_futex.h @@ -1,52 +0,0 @@ -- Implement futex_wake() and futex_wait() via _umtx_op() ---- src/util/futex.h.orig 2019-06-26 20:14:08 UTC -+++ src/util/futex.h -@@ -24,15 +24,37 @@ - #ifndef UTIL_FUTEX_H - #define UTIL_FUTEX_H - --#if defined(HAVE_LINUX_FUTEX_H) -+/* #if defined(HAVE_LINUX_FUTEX_H) */ - - #include - #include - #include -+#if defined(__FreeBSD__) -+#include -+#include -+#else - #include - #include -+#endif - #include - -+#if defined(__FreeBSD__) -+static inline int futex_wake(uint32_t *addr, int count) -+{ -+ return _umtx_op(addr, UMTX_OP_WAKE, (uint32_t)count, NULL, NULL) == -1 ? errno : 0; -+} -+ -+static inline int futex_wait(uint32_t *addr, int32_t value, struct timespec *timeout) -+{ -+ void *uaddr = NULL, *uaddr2 = NULL; -+ if (timeout != NULL) { -+ const struct _umtx_time tmo = { ._timeout = *timeout, ._flags = UMTX_ABSTIME, ._clockid = CLOCK_MONOTONIC }; -+ uaddr = (void *)(uintptr_t)sizeof(tmo); -+ uaddr2 = (void *)&tmo; -+ } -+ return _umtx_op(addr, UMTX_OP_WAIT_UINT, (uint32_t)value, uaddr, uaddr2) == -1 ? errno : 0; -+} -+#else - static inline long sys_futex(void *addr1, int op, int val1, const struct timespec *timeout, void *addr2, int val3) - { - return syscall(SYS_futex, addr1, op, val1, timeout, addr2, val3); -@@ -50,7 +72,8 @@ static inline int futex_wait(uint32_t *addr, int32_t v - return sys_futex(addr, FUTEX_WAIT_BITSET, value, timeout, NULL, - FUTEX_BITSET_MATCH_ANY); - } -- - #endif -+ -+/* #endif */ - - #endif /* UTIL_FUTEX_H */ Index: head/graphics/mesa-dri/files/patch-src_util_os__file.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_os__file.c +++ head/graphics/mesa-dri/files/patch-src_util_os__file.c @@ -0,0 +1,50 @@ +--- src/util/os_file.c.orig 2020-10-05 09:57:28 UTC ++++ src/util/os_file.c +@@ -80,7 +80,7 @@ os_dupfd_cloexec(int fd) + #endif + + +-#if DETECT_OS_LINUX ++#if DETECT_OS_LINUX || DETECT_OS_FREEBSD + + #include + #include +@@ -93,7 +93,11 @@ os_dupfd_cloexec(int fd) + static ssize_t + readN(int fd, char *buf, size_t len) + { ++#if DETECT_OS_LINUX + int err = -ENODATA; ++#elif DETECT_OS_FREEBSD ++ int err = -1; ++#endif + size_t total = 0; + do { + ssize_t ret = read(fd, buf + total, len - total); +@@ -185,6 +189,7 @@ os_read_file(const char *filename, size_t *size) + return buf; + } + ++#if DETECT_OS_LINUX + int + os_same_file_description(int fd1, int fd2) + { +@@ -196,6 +201,18 @@ os_same_file_description(int fd1, int fd2) + + return syscall(SYS_kcmp, pid, pid, KCMP_FILE, fd1, fd2); + } ++#else ++int ++os_same_file_description(int fd1, int fd2) ++{ ++ /* Same file descriptor trivially implies same file description */ ++ if (fd1 == fd2) ++ return 0; ++ ++ /* Otherwise we can't tell */ ++ return -1; ++} ++#endif + + #else + Index: head/graphics/mesa-dri/files/patch-src_util_os__misc.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_os__misc.c +++ head/graphics/mesa-dri/files/patch-src_util_os__misc.c @@ -0,0 +1,26 @@ +--- src/util/os_misc.c.orig 2020-09-28 22:52:13 UTC ++++ src/util/os_misc.c +@@ -58,7 +58,7 @@ + # include + #elif DETECT_OS_LINUX || DETECT_OS_CYGWIN || DETECT_OS_SOLARIS || DETECT_OS_HURD + # include +-#elif DETECT_OS_OPENBSD ++#elif DETECT_OS_OPENBSD || DETECT_OS_FREEBSD + # include + # include + #elif DETECT_OS_APPLE || DETECT_OS_BSD +@@ -213,9 +213,13 @@ os_get_available_system_memory(uint64_t *size) + + free(meminfo); + return false; +-#elif DETECT_OS_OPENBSD ++#elif defined(DETECT_OS_OPENBSD) || defined(DETECT_OS_FREEBSD) + struct rlimit rl; ++#if DETECT_OS_OPENBSD + int mib[] = { CTL_HW, HW_USERMEM64 }; ++#elif DETECT_OS_FREEBSD ++ int mib[] = { CTL_HW, HW_USERMEM }; ++#endif + int64_t mem_available; + size_t len = sizeof(mem_available); + Index: head/graphics/mesa-dri/files/patch-src_util_os__time.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_os__time.c +++ head/graphics/mesa-dri/files/patch-src_util_os__time.c @@ -1,13 +0,0 @@ -- Use monotonic clock for timeouts - ---- src/util/os_time.c.orig 2018-04-21 05:48:25 UTC -+++ src/util/os_time.c -@@ -95,7 +95,7 @@ os_time_get_nano(void) - void - os_time_sleep(int64_t usecs) - { --#if defined(PIPE_OS_LINUX) -+#if defined(HAVE_CLOCK_NANOSLEEP) - struct timespec time; - time.tv_sec = usecs / 1000000; - time.tv_nsec = (usecs % 1000000) * 1000; Index: head/graphics/mesa-dri/files/patch-src_util_u__process.c =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_u__process.c +++ head/graphics/mesa-dri/files/patch-src_util_u__process.c @@ -0,0 +1,29 @@ +--- src/util/u_process.c.orig 2020-10-05 09:53:46 UTC ++++ src/util/u_process.c +@@ -44,6 +44,11 @@ + #include + #endif + ++#if DETECT_OS_FREEBSD ++#include ++#include ++#endif ++ + #if defined(__linux__) && defined(HAVE_PROGRAM_INVOCATION_NAME) + + static char *path = NULL; +@@ -175,6 +180,14 @@ util_get_process_exec_path(char* process_path, size_t + int result = _NSGetExecutablePath(process_path, &bufSize); + + return (result == 0) ? strlen(process_path) : 0; ++#elif DETECT_OS_FREEBSD ++ int mib[4] = { CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, -1 }; ++ size_t read_len = len; ++ ++ (void) sysctl(mib, 4, process_path, &read_len, NULL, 0); ++ process_path[len - 1] = '\0'; ++ ++ return read_len; + #elif DETECT_OS_UNIX + ssize_t r; + Index: head/graphics/mesa-dri/files/patch-src_util_u__thread.h =================================================================== --- head/graphics/mesa-dri/files/patch-src_util_u__thread.h +++ head/graphics/mesa-dri/files/patch-src_util_u__thread.h @@ -1,42 +0,0 @@ -- Implement setting thread name -- Use monotonic clock for timeouts - ---- src/util/u_thread.h.orig 2018-11-09 11:03:00 UTC -+++ src/util/u_thread.h -@@ -34,7 +34,14 @@ - - #ifdef HAVE_PTHREAD - #include -+#if defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) -+#include -+# if !defined(__DragonFly__) -+# define cpu_set_t cpuset_t -+# endif -+#undef ALIGN /* Avoid conflict on FreeBSD in main/macros.h */ - #endif -+#endif - - static inline thrd_t u_thread_create(int (*routine)(void *), void *param) - { -@@ -64,6 +69,12 @@ static inline void u_thread_setname( const char *name - (__GLIBC__ >= 3 || (__GLIBC__ == 2 && __GLIBC_MINOR__ >= 12)) && \ - defined(__linux__) - pthread_setname_np(pthread_self(), name); -+# elif defined(__sun) -+ pthread_setname_np(pthread_self(), name); -+# elif defined(__DragonFly__) || defined(__FreeBSD__) || defined(__OpenBSD__) -+ pthread_set_name_np(pthread_self(), name); -+# elif defined(__NetBSD__) -+ pthread_setname_np(pthread_self(), "%s", (void*)name); - # endif - #endif - (void)name; -@@ -134,7 +145,7 @@ util_get_L3_for_pinned_thread(thrd_t thread, unsigned - static inline int64_t - u_thread_get_time_nano(thrd_t thread) - { --#if defined(__linux__) && defined(HAVE_PTHREAD) -+#if defined(HAVE_PTHREAD) - struct timespec ts; - clockid_t cid; - Index: head/graphics/mesa-dri/files/pkg-message.in =================================================================== --- head/graphics/mesa-dri/files/pkg-message.in +++ head/graphics/mesa-dri/files/pkg-message.in @@ -0,0 +1,9 @@ +[ +{ type: install + message: <=1.8:graphics/wayland-protocols + +.include +.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" + +ONLY_FOR_ARCHS= i386 amd64 aarch64 powerpc64 +ONLY_FOR_ARCHS_REASON= Used only by amd/radeon hardware + +MESON_ARGS+= -Ddri-drivers="" \ + -Dgallium-drivers="radeonsi,r600" \ + -Dvulkan-drivers="" \ + -Dgallium-vdpau=disabled \ + -Dgallium-omx=disabled \ + -Dgallium-xa=disabled \ + -Dgallium-opencl=disabled \ + -Dgallium-xvmc=disabled \ + -Dgallium-nine=false \ + -Degl=disabled \ + -Dgbm=disabled \ + -Dgles2=disabled \ + -Dglx=disabled \ + -Dopengl=false \ + -Dshared-glapi=disabled \ + -Dosmesa=none + +LDFLAGS_i386= -Wl,-znotext + +MESON_ARGS+= -Dgallium-va=enabled + +.include "${MASTERDIR}/Makefile.targets" +.include Index: head/graphics/mesa-gallium-va/pkg-descr =================================================================== --- head/graphics/mesa-gallium-va/pkg-descr +++ head/graphics/mesa-gallium-va/pkg-descr @@ -0,0 +1,9 @@ +Mesa is a 3-D graphics library with an API which is very similar to that +of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or +state machine, it is being used with authorization from Silicon Graphics, +Inc. However, the author makes no claim that Mesa is in any way a +compatible replacement for OpenGL or associated with Silicon Graphics, Inc. + +VA is a Gallium driver for video decoding on AMD hardware. + +WWW: https://www.mesa3d.org/ Index: head/graphics/mesa-gallium-va/pkg-plist =================================================================== --- head/graphics/mesa-gallium-va/pkg-plist +++ head/graphics/mesa-gallium-va/pkg-plist @@ -0,0 +1,3 @@ +lib/dri/r600_drv_video.so +lib/dri/radeonsi_drv_video.so +@comment share/drirc.d/00-mesa-defaults.conf Index: head/graphics/mesa-gallium-vdpau/Makefile =================================================================== --- head/graphics/mesa-gallium-vdpau/Makefile +++ head/graphics/mesa-gallium-vdpau/Makefile @@ -0,0 +1,45 @@ +# $FreeBSD$ + +PORTNAME= mesa-gallium-vdpau +PORTVERSION= ${MESAVERSION} +CATEGORIES= graphics + +COMMENT= Mesa Gallium VDPAU drivers + +USES= xorg +USE_XORG= xcb xfixes xrandr + +LIB_DEPENDS= libva.so:multimedia/libva \ + libvdpau.so:multimedia/libvdpau \ + libzstd.so:archivers/zstd +BUILD_DEPENDS= wayland-protocols>=1.8:graphics/wayland-protocols + +.include +.include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" + +ONLY_FOR_ARCHS= i386 amd64 aarch64 powerpc64 +ONLY_FOR_ARCHS_REASON= Used only by amd/radeon hardware + +MESON_ARGS+= -Ddri-drivers="" \ + -Dgallium-drivers="r300,r600,radeonsi" \ + -Dvulkan-drivers="" \ + -Dgallium-va=disabled \ + -Dgallium-omx=disabled \ + -Dgallium-xa=disabled \ + -Dgallium-opencl=disabled \ + -Dgallium-xvmc=disabled \ + -Dgallium-nine=false \ + -Degl=disabled \ + -Dgbm=disabled \ + -Dgles2=disabled \ + -Dglx=disabled \ + -Dopengl=false \ + -Dshared-glapi=disabled \ + -Dosmesa=none + +LDFLAGS_i386= -Wl,-znotext + +MESON_ARGS+= -Dgallium-vdpau=enabled + +.include "${MASTERDIR}/Makefile.targets" +.include Index: head/graphics/mesa-gallium-vdpau/pkg-descr =================================================================== --- head/graphics/mesa-gallium-vdpau/pkg-descr +++ head/graphics/mesa-gallium-vdpau/pkg-descr @@ -0,0 +1,9 @@ +Mesa is a 3-D graphics library with an API which is very similar to that +of OpenGL*. To the extent that Mesa utilizes the OpenGL command syntax or +state machine, it is being used with authorization from Silicon Graphics, +Inc. However, the author makes no claim that Mesa is in any way a +compatible replacement for OpenGL or associated with Silicon Graphics, Inc. + +VDPAU is a Gallium driver for video decoding on AMD hardware. + +WWW: https://www.mesa3d.org/ Index: head/graphics/mesa-gallium-vdpau/pkg-plist =================================================================== --- head/graphics/mesa-gallium-vdpau/pkg-plist +++ head/graphics/mesa-gallium-vdpau/pkg-plist @@ -0,0 +1,13 @@ +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.1 +lib/vdpau/libvdpau_r600.so.1.0 +lib/vdpau/libvdpau_r600.so.1.0.0 +lib/vdpau/libvdpau_radeonsi.so +lib/vdpau/libvdpau_radeonsi.so.1 +lib/vdpau/libvdpau_radeonsi.so.1.0 +lib/vdpau/libvdpau_radeonsi.so.1.0.0 +@comment share/drirc.d/00-mesa-defaults.conf Index: head/graphics/mesa-gallium-xa/Makefile =================================================================== --- head/graphics/mesa-gallium-xa/Makefile +++ head/graphics/mesa-gallium-xa/Makefile @@ -1,12 +1,11 @@ # Created by: johalun # $FreeBSD$ -PORTNAME= libxatracker +PORTNAME= mesa-gallium-xa PORTVERSION= ${MESAVERSION} -PORTREVISION= 5 CATEGORIES= graphics -COMMENT= Mesa XA state tracker +COMMENT= Mesa Gallium XA state tracker USES= xorg USE_XORG= xorgproto @@ -20,25 +19,25 @@ MESON_ARGS+= -Ddri-drivers="" \ -Dgallium-drivers="svga" \ -Dvulkan-drivers="" \ - -Dgallium-vdpau=false \ + -Dplatforms="" \ + -Dgallium-vdpau=disabled \ -Dgallium-omx=disabled \ - -Dgallium-va=false \ + -Dgallium-va=disabled \ -Dgallium-opencl=disabled \ - -Dgallium-xvmc=false \ + -Dgallium-xvmc=disabled \ -Dgallium-nine=false \ - -Degl=false \ - -Dgbm=false \ - -Dgles1=false \ - -Dgles2=false \ + -Degl=disabled \ + -Dgbm=disabled \ + -Dgles1=disabled \ + -Dgles2=disabled \ -Dglx=disabled \ -Dopengl=false \ - -Dshared-glapi=false \ - -Dosmesa=none \ - -Dplatforms= + -Dshared-glapi=disabled \ + -Dosmesa=none LDFLAGS_i386= -Wl,-znotext -MESON_ARGS+= -Dgallium-xa=true +MESON_ARGS+= -Dgallium-xa=enabled .include "${MASTERDIR}/Makefile.targets" .include Index: head/graphics/mesa-libs/Makefile =================================================================== --- head/graphics/mesa-libs/Makefile +++ head/graphics/mesa-libs/Makefile @@ -3,7 +3,6 @@ PORTNAME= mesa-libs PORTVERSION= ${MESAVERSION} -PORTREVISION= 3 CATEGORIES= graphics COMMENT= OpenGL libraries that support GLX and EGL clients @@ -11,15 +10,13 @@ CONFLICTS_INSTALL= libglvnd # include/GL/gl.h OPTIONS_GROUP= PLATFORM -OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS +OPTIONS_GROUP_PLATFORM= PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_X11_DESC= Enable X11 support for GBM/EGL PLATFORM_WAYLAND_DESC= Enable Wayland support for GBM/EGL -PLATFORM_DRM_DESC= Enable DRM support for GBM/EGL -PLATFORM_SURFACELESS_DESC= Enable Surfaceless support for GBM/EGL PLATFORM_WAYLAND_IMPLIES= WAYLAND -OPTIONS_DEFINE= WAYLAND -OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND PLATFORM_DRM PLATFORM_SURFACELESS +OPTIONS_DEFINE= WAYLAND ZSTD +OPTIONS_DEFAULT=WAYLAND PLATFORM_X11 PLATFORM_WAYLAND ZSTD OPTIONS_SUB= yes WAYLAND_DESC= Enable support for the Wayland platform in EGL @@ -27,21 +24,25 @@ WAYLAND_LIB_DEPENDS= libwayland-egl.so:graphics/wayland WAYLAND_IMPLIES= PLATFORM_WAYLAND +ZSTD_DESC= Use ZSTD for shader cache +ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd +ZSTD_MESON_ENABLED= zstd + .include .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Dgallium-drivers="" \ - -Dgallium-vdpau=false \ - -Dgallium-xvmc=false \ + -Dgallium-vdpau=disabled \ + -Dgallium-xvmc=disabled \ -Dgallium-omx=disabled \ - -Dgallium-va=false \ - -Dgallium-xa=false \ + -Dgallium-va=disabled \ + -Dgallium-xa=disabled \ -Dgallium-nine=false \ -Dgallium-clover=disabled \ -Dosmesa=none \ -Dtools="" \ - -Degl=true \ - -Dgbm=true \ + -Degl=enabled \ + -Dgbm=enabled \ -Dvulkan-drivers="" # Building EGL and GBM requires a dri driver so add swrast MESON_ARGS+= -Ddri-drivers="swrast" @@ -58,14 +59,6 @@ .if ${PORT_OPTIONS:MPLATFORM_WAYLAND} && ${PORT_OPTIONS:MWAYLAND} MESA_PLATFORMS+= wayland -.endif - -.if ${PORT_OPTIONS:MPLATFORM_DRM} -MESA_PLATFORMS+= drm -.endif - -.if ${PORT_OPTIONS:MPLATFORM_SURFACELESS} -MESA_PLATFORMS+= surfaceless .endif MESON_ARGS+= -Dplatforms="${MESA_PLATFORMS:ts,:tl}" Index: head/graphics/mesa-libs/pkg-plist =================================================================== --- head/graphics/mesa-libs/pkg-plist +++ head/graphics/mesa-libs/pkg-plist @@ -4,11 +4,9 @@ include/EGL/eglmesaext.h include/EGL/eglplatform.h include/GL/gl.h -include/GL/gl_mangle.h include/GL/glcorearb.h include/GL/glext.h %%GLX%%include/GL/glx.h -%%GLX%%include/GL/glx_mangle.h %%GLX%%include/GL/glxext.h @comment include/GL/internal/dri_interface.h include/GLES/egl.h Index: head/lang/clover/Makefile =================================================================== --- head/lang/clover/Makefile +++ head/lang/clover/Makefile @@ -2,14 +2,14 @@ PORTNAME= clover PORTVERSION= ${MESAVERSION} -PORTREVISION= 1 CATEGORIES= lang COMMENT= Mesa OpenCL implementation for AMD GPUs BUILD_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl -LIB_DEPENDS= libOpenCL.so:devel/ocl-icd +LIB_DEPENDS= libOpenCL.so:devel/ocl-icd \ + libzstd.so:archivers/zstd RUN_DEPENDS= libclc>=0.3.0:devel/libclc \ opencl>=0:devel/opencl @@ -20,24 +20,24 @@ .include "${.CURDIR:H:H}/graphics/mesa-dri/Makefile.common" MESON_ARGS+= -Ddri-drivers="" \ - -Dgallium-drivers=r600,radeonsi \ - -Dvulkan-drivers="" \ -Dplatforms="" \ - -Dgallium-vdpau=false \ + -Dvulkan-drivers="" \ + -Dgallium-nine=false \ -Dgallium-omx=disabled \ - -Dgallium-va=false \ -Dgallium-opencl=disabled \ - -Dgallium-xa=false \ - -Dgallium-xvmc=false \ - -Dgallium-nine=false \ - -Dgles1=false \ - -Dgles2=false \ + -Dgallium-va=disabled \ + -Dgallium-vdpau=disabled \ + -Dgallium-xa=disabled \ + -Dgallium-xvmc=disabled \ + -Dgles1=disabled \ + -Dgles2=disabled \ -Dopengl=false \ -Dglx=disabled \ - -Degl=false \ - -Dgbm=false \ + -Degl=disabled \ + -Dgbm=disabled \ + -Dtools="" \ -Dgallium-opencl=icd \ - -Dtools="" + -Dgallium-drivers=r600,radeonsi LDFLAGS_i386= -Wl,-znotext