svn commit: r537139 - in head/graphics: . mesa-devel mesa-devel/files
Jan Beich
jbeich at FreeBSD.org
Sun May 31 09:23:54 UTC 2020
Author: jbeich
Date: Sun May 31 09:23:52 2020
New Revision: 537139
URL: https://svnweb.freebsd.org/changeset/ports/537139
Log:
graphics/mesa-devel: add new port
Submitted by: Greg V (based on)
Development branch of Mesa 3D graphics library. Only some drivers are
enabled, so it can co-exist with the stable version.
https://www.mesa3d.org/
Added:
head/graphics/mesa-devel/
head/graphics/mesa-devel/Makefile (contents, props changed)
head/graphics/mesa-devel/distinfo (contents, props changed)
head/graphics/mesa-devel/files/
head/graphics/mesa-devel/files/libmap.conf.in (contents, props changed)
head/graphics/mesa-devel/files/patch-freebsd11 (contents, props changed)
head/graphics/mesa-devel/files/patch-i386 (contents, props changed)
head/graphics/mesa-devel/files/patch-libdrm-2.4.99 (contents, props changed)
head/graphics/mesa-devel/files/patch-suffix (contents, props changed)
head/graphics/mesa-devel/pkg-descr (contents, props changed)
head/graphics/mesa-devel/pkg-plist (contents, props changed)
Modified:
head/graphics/Makefile (contents, props changed)
Modified: head/graphics/Makefile
==============================================================================
--- head/graphics/Makefile Sun May 31 09:20:12 2020 (r537138)
+++ head/graphics/Makefile Sun May 31 09:23:52 2020 (r537139)
@@ -529,6 +529,7 @@
SUBDIR += megapov
SUBDIR += meh
SUBDIR += mesa-demos
+ SUBDIR += mesa-devel
SUBDIR += mesa-dri
SUBDIR += mesa-libs
SUBDIR += metacam
Added: head/graphics/mesa-devel/Makefile
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/Makefile Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,115 @@
+# $FreeBSD$
+
+PORTNAME= mesa
+DISTVERSION= 20.1-branchpoint-1310
+DISTVERSIONSUFFIX= -gaaec065f03e
+CATEGORIES= graphics
+PKGNAMESUFFIX= -devel
+
+PATCH_SITES= https://github.com/${GH_ACCOUNT}/${GH_PROJECT}/commit/
+PATCHFILES+= ee5c7790fa93.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= 9f52b5177728.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= cefdea8105bf.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= 55822330540d.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= f6c7569ad9ea.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= c7a2ab64144b.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= f3b7aba7ed39.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= 23df7d9971dd.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1598
+PATCHFILES+= ec60ac47860a.patch:-p1
+PATCHFILES+= 807ae077ab19.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/3568
+PATCHFILES+= 1b10b42fe65e.patch:-p1 # https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/1619
+PATCHFILES+= 9291544ca0bd.patch:-p1
+PATCHFILES+= 700efacda59c.patch:-p1
+PATCHFILES+= 227ebbd9e837.patch:-p1
+PATCHFILES+= de60a36d5836.patch:-p1
+PATCHFILES+= 0a500a8f4648.patch:-p1
+PATCHFILES+= 15057d74fdb9.patch:-p1
+
+MAINTAINER= jbeich at FreeBSD.org
+COMMENT= Bleeding edge Mesa drivers (OpenGL, Vulkan)
+
+LICENSE= MIT
+
+ONLY_FOR_ARCHS= amd64 i386
+ONLY_FOR_ARCHS_REASON= Limited scope: no old drivers and no software rendering. \
+ See also https://mesamatrix.net/
+BROKEN_DragonFly= requires making Vulkan support conditional
+
+BUILD_DEPENDS= glslangValidator:devel/glslang \
+ ${PYTHON_PKGNAMEPREFIX}mako>0:textproc/py-mako@${PY_FLAVOR}
+LIB_DEPENDS= libLLVM-${LLVM_DEFAULT:C/^([6-9])0/\1/:S/-devel/11/}.so:devel/llvm${LLVM_DEFAULT} \
+ libdrm.so:graphics/libdrm \
+ libexpat.so:textproc/expat2
+
+USES= bison compiler:c++11-lib meson pkgconfig python:3.6+,build shebangfix
+USE_GITHUB= yes
+GH_ACCOUNT= mesa3d
+USE_LDCONFIG= yes
+BINARY_ALIAS= llvm-config=llvm-config${LLVM_DEFAULT} python=${PYTHON_CMD}
+SHEBANG_FILES= src/vulkan/overlay-layer/${PORTNAME}-overlay-control.py
+PLATFORMS= ${PORT_OPTIONS:MX11:tl} ${PORT_OPTIONS:MWAYLAND:tl} drm surfaceless
+MESON_ARGS= -Ddri-drivers=i965 \
+ -Dgallium-drivers=iris,r600,radeonsi \
+ -Dgallium-omx=disabled \
+ -Dgallium-opencl=disabled \
+ -Dgallium-va=false \
+ -Dgallium-vdpau=false \
+ -Dgallium-xa=false \
+ -Dgallium-xvmc=false \
+ -Dplatforms=${PLATFORMS:ts,} \
+ -Dvulkan-device-select-layer=true \
+ -Dvulkan-overlay-layer=true \
+ ${PKGNAMESUFFIX:S/^/-Degl-lib-suffix=/} \
+ ${NULL}
+SUB_FILES= libmap.conf
+SUB_LIST= PKGNAMESUFFIX=${PKGNAMESUFFIX}
+PLIST_SUB= ARCH=${ARCH:S/amd/x86_/} PKGNAMESUFFIX=${PKGNAMESUFFIX}
+
+.if ${/usr/bin/ld:L:tA} != /usr/bin/ld.lld
+# --build-id isn't supported by old GNU ld.bfd in base
+LDFLAGS+= -fuse-ld=lld
+.endif
+
+OPTIONS_DEFINE= LIBUNWIND VAAPI VDPAU WAYLAND X11 ZSTD
+OPTIONS_DEFAULT= LIBUNWIND VAAPI VDPAU WAYLAND X11 ZSTD
+OPTIONS_SUB= yes
+
+LIBUNWIND_DESC= Use libunwind for stacktraces
+LIBUNWIND_LIB_DEPENDS= libunwind.so:devel/libunwind
+LIBUNWIND_MESON_TRUE= libunwind
+
+VAAPI_BUILD_DEPENDS= libva>0:multimedia/libva
+VAAPI_MESON_TRUE= gallium-va
+
+VDPAU_BUILD_DEPENDS= libvdpau>0:multimedia/libvdpau
+VDPAU_MESON_TRUE= gallium-vdpau
+
+WAYLAND_BUILD_DEPENDS= wayland-protocols>0:graphics/wayland-protocols
+WAYLAND_LIB_DEPENDS= libwayland-server.so:graphics/wayland
+
+X11_USES= xorg
+X11_USE= XORG=x11,xcb,xdamage,xext,xfixes,xorgproto,xrandr,xshmfence,xxf86vm
+X11_MESON_OFF= -Dglx=disabled
+
+ZSTD_DESC= Use ZSTD for shader cache
+ZSTD_LIB_DEPENDS= libzstd.so:archivers/zstd
+ZSTD_MESON_TRUE= zstd
+
+post-patch:
+# Extract (snapshot) version from the port instead of empty string
+ @${REINPLACE_CMD} '/MESA_GIT_SHA1/s/""/" (git-${DISTVERSIONSUFFIX:C/.*-g//})"/' \
+ ${WRKSRC}/bin/git_sha1_gen.py
+.if defined(PKGNAMESUFFIX)
+ @${MV} ${WRKSRC}/src/egl/main/50_${PORTNAME}.json \
+ ${WRKSRC}/src/egl/main/50_${PKGBASE}.json
+ @${MV} ${WRKSRC}/src/util/00-${PORTNAME}-defaults.conf \
+ ${WRKSRC}/src/util/00-${PKGBASE}-defaults.conf
+.endif
+
+post-install:
+.if defined(PKGNAMESUFFIX)
+ @${INSTALL_DATA} ${WRKDIR}/libmap.conf \
+ ${STAGEDIR}${PREFIX}/etc/libmap.d/${PKGBASE}.conf.sample
+.endif
+
+.include <bsd.port.mk>
Added: head/graphics/mesa-devel/distinfo
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/distinfo Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,37 @@
+TIMESTAMP = 1590884698
+SHA256 (mesa3d-mesa-20.1-branchpoint-1310-gaaec065f03e_GH0.tar.gz) = 54728415dbc4b352d8ce3fb1ace710c92617af7c2e86a6ad2dca461eae0c979d
+SIZE (mesa3d-mesa-20.1-branchpoint-1310-gaaec065f03e_GH0.tar.gz) = 19826036
+SHA256 (ee5c7790fa93.patch) = 2bebf30e8dfc5d1b5d0c540f3fbbfd75b0876690be8e1ab3626cca0b69854b58
+SIZE (ee5c7790fa93.patch) = 1653
+SHA256 (9f52b5177728.patch) = d4f380b8872726b88c1aa75d0a9cb63adf79144a7c34da6b7fd525ea417d2b73
+SIZE (9f52b5177728.patch) = 832
+SHA256 (cefdea8105bf.patch) = caeb49b2a1a1b6685ad5757f6ff02b0b2eb8858a6113b830c516b33da2d2f3a1
+SIZE (cefdea8105bf.patch) = 1731
+SHA256 (55822330540d.patch) = fc776fee1d59f743a060ad1f78e1d9eba8826beb1fe7abef1734a407734b6109
+SIZE (55822330540d.patch) = 1278
+SHA256 (f6c7569ad9ea.patch) = 481784ca37e35549bf265e21eee1b9a29d2b0b8d3294de1d5b6b83a84f3d7a9b
+SIZE (f6c7569ad9ea.patch) = 1653
+SHA256 (c7a2ab64144b.patch) = 6402bbbcc6f290374615b8ee50cd9587f2a6db89af4f3cf2331f700f98d61a13
+SIZE (c7a2ab64144b.patch) = 2054
+SHA256 (f3b7aba7ed39.patch) = de44136a4482b47cca0453ab93407d8e71e430b39ef7bb56c9ab9e54d11ee913
+SIZE (f3b7aba7ed39.patch) = 1325
+SHA256 (23df7d9971dd.patch) = b0516ae9018e7807d0267afa0c8e3fc807436f59433ce96ab62683343c96edc8
+SIZE (23df7d9971dd.patch) = 1335
+SHA256 (ec60ac47860a.patch) = 847c847888368eb5252aa3926ce100dc0fcf6b6bf05c7ee7efe2022f4629d204
+SIZE (ec60ac47860a.patch) = 3647
+SHA256 (807ae077ab19.patch) = 3b9fb7e75e4343a42667a249a0ee533110be9a6f113a4a3138d32de592d32bbc
+SIZE (807ae077ab19.patch) = 3514
+SHA256 (1b10b42fe65e.patch) = f0aa9c049a43733fefff0edba4dcb322682fef4dc58d6affa41effcce7ed9eb3
+SIZE (1b10b42fe65e.patch) = 11952
+SHA256 (9291544ca0bd.patch) = e2b1c8a57aa6938fc3a6bda17b80846eefaae15539ff209210baac44a5882a36
+SIZE (9291544ca0bd.patch) = 1489
+SHA256 (700efacda59c.patch) = f034cfbe09edff0baba67e46e7e3812fdef73ff3cf3e579050c024c95234c8d5
+SIZE (700efacda59c.patch) = 981
+SHA256 (227ebbd9e837.patch) = 2321e198b85a3f936ee5f0545ebf560735ae2c1d56f0d0d5c42a969876f17202
+SIZE (227ebbd9e837.patch) = 39765
+SHA256 (de60a36d5836.patch) = aabe774d90cb41c8c0218abb9dec7d2efe6f7ab7b68750e307eb70c9e9e8377a
+SIZE (de60a36d5836.patch) = 2432
+SHA256 (0a500a8f4648.patch) = cc2df782fe514cabe68e17a46c811961ac30783f14b69e38aad8b2f08748d5c2
+SIZE (0a500a8f4648.patch) = 2000
+SHA256 (15057d74fdb9.patch) = c307d2c1c09d7170fac9ead710543eec6cad6dc0b5fcf889437d8416a55d7cb4
+SIZE (15057d74fdb9.patch) = 972
Added: head/graphics/mesa-devel/files/libmap.conf.in
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/files/libmap.conf.in Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,26 @@
+# EGL/GLX built with -Dglvnd=false
+libEGL.so.1 libEGL%%PKGNAMESUFFIX%%.so.1
+libGL.so.1 libGL%%PKGNAMESUFFIX%%.so.1
+libGLESv1_CM.so.1 libGLESv1_CM%%PKGNAMESUFFIX%%.so.1
+libGLESv2.so.2 libGLESv2%%PKGNAMESUFFIX%%.so.2
+
+# EGL/GLX built with -Dglvnd=true
+# Xorg sets GLX_EXT_libglvnd to "mesa" by default
+libEGL_mesa.so.0 libEGL_mesa%%PKGNAMESUFFIX%%.so.0
+libGLX_mesa.so.0 libGLX_mesa%%PKGNAMESUFFIX%%.so.0
+
+# Fallback if GLX_EXT_libglvnd is missing or vendor library doesn't exist
+libGLX_indirect.so.0 libGLX_mesa%%PKGNAMESUFFIX%%.so.0
+
+# GBM clients like eglkms and wlroots fail otherwise
+libgbm.so.1 libgbm%%PKGNAMESUFFIX%%.so.1
+
+# Avoid different versions of the same driver showing up as multiple GPUs
+%%PREFIX%%/lib/libvulkan_intel.so libvulkan_intel%%PKGNAMESUFFIX%%.so
+%%PREFIX%%/lib/libvulkan_radeon.so libvulkan_radeon%%PKGNAMESUFFIX%%.so
+
+# VAAPI/VDPAU
+%%PREFIX%%/lib/dri/r600_drv_video.so %%PREFIX%%/lib/dri%%PKGNAMESUFFIX%%/r600_drv_video.so
+%%PREFIX%%/lib/dri/radeonsi_drv_video.so %%PREFIX%%/lib/dri%%PKGNAMESUFFIX%%/radeonsi_drv_video.so
+%%PREFIX%%/lib/vdpau/libvdpau_r600.so.1 %%PREFIX%%/lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_r600.so.1
+%%PREFIX%%/lib/vdpau/libvdpau_radeonsi.so.1 %%PREFIX%%/lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_radeonsi.so.1
Added: head/graphics/mesa-devel/files/patch-freebsd11
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/files/patch-freebsd11 Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,34 @@
+https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=225302
+
+../src/util/build_id.c:42:4: error: unknown type name 'Elf_Nhdr'
+ ElfW(Nhdr) nhdr;
+ ^
+../src/util/build_id.c:38:20: note: expanded from macro 'ElfW'
+#define ElfW(type) Elf_##type
+ ^
+<scratch space>:101:1: note: expanded from here
+Elf_Nhdr
+^
+../src/util/build_id.c:91:33: error: use of undeclared identifier 'Elf_Nhdr'
+ size_t offset = sizeof(ElfW(Nhdr)) +
+ ^
+../src/util/build_id.c:38:20: note: expanded from macro 'ElfW'
+#define ElfW(type) Elf_##type
+ ^
+<scratch space>:102:1: note: expanded from here
+Elf_Nhdr
+^
+
+--- src/util/build_id.c.orig 2020-05-30 21:28:01 UTC
++++ src/util/build_id.c
+@@ -38,6 +38,10 @@
+ #define ElfW(type) Elf_##type
+ #endif
+
++#if defined(__FreeBSD__) && __FreeBSD__ < 12
++typedef Elf_Note Elf_Nhdr;
++#endif
++
+ struct build_id_note {
+ ElfW(Nhdr) nhdr;
+
Added: head/graphics/mesa-devel/files/patch-i386
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/files/patch-i386 Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,53 @@
+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 <stdint.h>
++if cc.links('''#include <stdint.h>
+ int main() {
+ struct {
+ uint64_t *v;
+@@ -1079,24 +1079,6 @@ if cc.compiles('''#include <stdint.h>
+ }''',
+ 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 <stdint.h>
+- 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 <stdint.h>
+ uint64_t v;
Added: head/graphics/mesa-devel/files/patch-libdrm-2.4.99
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/files/patch-libdrm-2.4.99 Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,107 @@
+Revert libdrm 2.4.100 dependencies:
+https://gitlab.freedesktop.org/mesa/mesa/commit/9edcce2a32ed
+https://gitlab.freedesktop.org/mesa/mesa/commit/f9fe86e02ada
+
+--- meson.build.orig 2020-05-30 21:28:01 UTC
++++ meson.build
+@@ -1319,7 +1319,7 @@ dep_libdrm_radeon = null_dep
+ dep_libdrm_nouveau = null_dep
+ dep_libdrm_intel = null_dep
+
+-_drm_amdgpu_ver = '2.4.100'
++_drm_amdgpu_ver = '2.4.99'
+ _drm_radeon_ver = '2.4.71'
+ _drm_nouveau_ver = '2.4.66'
+ _drm_intel_ver = '2.4.75'
+--- src/amd/common/ac_gpu_info.c.orig 2020-05-30 21:28:01 UTC
++++ src/amd/common/ac_gpu_info.c
+@@ -516,14 +516,9 @@ bool ac_query_gpu_info(int fd, void *dev_p,
+ }
+ if (info->chip_class >= GFX10) {
+ info->tcc_cache_line_size = 128;
+-
+- if (info->drm_minor >= 35) {
+- info->tcc_harvested = device_info.tcc_disabled_mask != 0;
+- } else {
+- /* This is a hack, but it's all we can do without a kernel upgrade. */
+- info->tcc_harvested =
+- (info->vram_size / info->num_tcc_blocks) != 512*1024*1024;
+- }
++ /* This is a hack, but it's all we can do without a kernel upgrade. */
++ info->tcc_harvested =
++ (info->vram_size / info->num_tcc_blocks) != 512*1024*1024;
+ } else {
+ info->tcc_cache_line_size = 64;
+ }
+--- src/gallium/winsys/amdgpu/drm/amdgpu_cs.c.orig 2020-05-30 21:28:01 UTC
++++ src/gallium/winsys/amdgpu/drm/amdgpu_cs.c
+@@ -341,49 +341,32 @@ static enum pipe_reset_status
+ amdgpu_ctx_query_reset_status(struct radeon_winsys_ctx *rwctx)
+ {
+ struct amdgpu_ctx *ctx = (struct amdgpu_ctx*)rwctx;
++ uint32_t result, hangs;
+ int r;
+
+ /* Return a failure due to a GPU hang. */
+- if (ctx->ws->info.drm_minor >= 24) {
+- uint64_t flags;
++ r = amdgpu_cs_query_reset_state(ctx->ctx, &result, &hangs);
++ if (r) {
++ fprintf(stderr, "amdgpu: amdgpu_cs_query_reset_state failed. (%i)\n", r);
++ return PIPE_NO_RESET;
++ }
+
+- r = amdgpu_cs_query_reset_state2(ctx->ctx, &flags);
+- if (r) {
+- fprintf(stderr, "amdgpu: amdgpu_cs_query_reset_state failed. (%i)\n", r);
+- return PIPE_NO_RESET;
++ switch (result) {
++ case AMDGPU_CTX_GUILTY_RESET:
++ return PIPE_GUILTY_CONTEXT_RESET;
++ case AMDGPU_CTX_INNOCENT_RESET:
++ return PIPE_INNOCENT_CONTEXT_RESET;
++ case AMDGPU_CTX_UNKNOWN_RESET:
++ return PIPE_UNKNOWN_CONTEXT_RESET;
++ case AMDGPU_CTX_NO_RESET:
++ default:
++ /* Return a failure due to a rejected command submission. */
++ if (ctx->ws->num_total_rejected_cs > ctx->initial_num_total_rejected_cs) {
++ return ctx->num_rejected_cs ? PIPE_GUILTY_CONTEXT_RESET :
++ PIPE_INNOCENT_CONTEXT_RESET;
+ }
+-
+- if (flags & AMDGPU_CTX_QUERY2_FLAGS_RESET) {
+- if (flags & AMDGPU_CTX_QUERY2_FLAGS_GUILTY)
+- return PIPE_GUILTY_CONTEXT_RESET;
+- else
+- return PIPE_INNOCENT_CONTEXT_RESET;
+- }
+- } else {
+- uint32_t result, hangs;
+-
+- r = amdgpu_cs_query_reset_state(ctx->ctx, &result, &hangs);
+- if (r) {
+- fprintf(stderr, "amdgpu: amdgpu_cs_query_reset_state failed. (%i)\n", r);
+- return PIPE_NO_RESET;
+- }
+-
+- switch (result) {
+- case AMDGPU_CTX_GUILTY_RESET:
+- return PIPE_GUILTY_CONTEXT_RESET;
+- case AMDGPU_CTX_INNOCENT_RESET:
+- return PIPE_INNOCENT_CONTEXT_RESET;
+- case AMDGPU_CTX_UNKNOWN_RESET:
+- return PIPE_UNKNOWN_CONTEXT_RESET;
+- }
++ return PIPE_NO_RESET;
+ }
+-
+- /* Return a failure due to a rejected command submission. */
+- if (ctx->ws->num_total_rejected_cs > ctx->initial_num_total_rejected_cs) {
+- return ctx->num_rejected_cs ? PIPE_GUILTY_CONTEXT_RESET :
+- PIPE_INNOCENT_CONTEXT_RESET;
+- }
+- return PIPE_NO_RESET;
+ }
+
+ /* COMMAND SUBMISSION */
Added: head/graphics/mesa-devel/files/patch-suffix
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/files/patch-suffix Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,179 @@
+Add library suffix to avoid conflict with mesa-libs + mesa-dri.
+Library selection is handled by libglvnd and/or libmap.conf.
+
+--- meson.build.orig 2020-05-30 21:28:01 UTC
++++ meson.build
+@@ -79,7 +79,7 @@ with_imgui = with_intel_tools or with_vulkan_overlay_l
+
+ dri_drivers_path = get_option('dri-drivers-path')
+ if dri_drivers_path == ''
+- dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri')
++ dri_drivers_path = join_paths(get_option('prefix'), get_option('libdir'), 'dri' + get_option('egl-lib-suffix'))
+ endif
+ dri_search_path = get_option('dri-search-path')
+ if dri_search_path == ''
+@@ -427,9 +427,6 @@ if with_glvnd
+ elif with_glx == 'disabled' and not with_egl
+ error('glvnd requires DRI based GLX and/or EGL')
+ endif
+- if get_option('egl-lib-suffix') != ''
+- error('''EGL lib suffix can't be used with libglvnd''')
+- endif
+ endif
+
+ if with_vulkan_icd_dir == ''
+@@ -491,7 +488,7 @@ if with_gallium_vdpau
+ endif
+ vdpau_drivers_path = get_option('vdpau-libs-path')
+ if vdpau_drivers_path == ''
+- vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau')
++ vdpau_drivers_path = join_paths(get_option('libdir'), 'vdpau' + get_option('egl-lib-suffix'))
+ endif
+
+ if with_gallium_zink
+@@ -638,7 +635,7 @@ endif
+
+ va_drivers_path = get_option('va-libs-path')
+ if va_drivers_path == ''
+- va_drivers_path = join_paths(get_option('libdir'), 'dri')
++ va_drivers_path = join_paths(get_option('libdir'), 'dri' + get_option('egl-lib-suffix'))
+ endif
+
+ _xa = get_option('gallium-xa')
+--- src/amd/vulkan/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/amd/vulkan/meson.build
+@@ -158,7 +158,7 @@ if with_platform_android
+ endif
+
+ libvulkan_radeon = shared_library(
+- 'vulkan_radeon',
++ 'vulkan_radeon' + get_option('egl-lib-suffix'),
+ [libradv_files, radv_entrypoints, radv_extensions_c, amd_vk_format_table_c, sha1_h, radv_gfx10_format_table_h],
+ include_directories : [
+ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_gallium_aux, inc_amd, inc_amd_common, inc_amd_common_llvm, inc_compiler, inc_util, inc_vulkan_wsi,
+--- src/egl/main/50_mesa.json.orig 2020-05-30 21:28:01 UTC
++++ src/egl/main/50_mesa.json
+@@ -1,6 +1,6 @@
+ {
+ "file_format_version" : "1.0.0",
+ "ICD" : {
+- "library_path" : "libEGL_mesa.so.0"
++ "library_path" : "libEGL_mesa at 0@.so.0".format(get_option('egl-lib-suffix'))
+ }
+ }
+--- src/egl/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/egl/meson.build
+@@ -147,13 +147,13 @@ if not with_glvnd
+ egl_lib_name = 'EGL' + get_option('egl-lib-suffix')
+ egl_lib_version = '1.0.0'
+ else
+- egl_lib_name = 'EGL_mesa'
++ egl_lib_name = 'EGL_mesa' + get_option('egl-lib-suffix')
+ egl_lib_version = '0.0.0'
+ deps_for_egl += dep_glvnd
+ files_egl += [g_egldispatchstubs_h, g_egldispatchstubs_c]
+ files_egl += files('main/eglglvnd.c', 'main/egldispatchstubs.c')
+ install_data(
+- 'main/50_mesa.json',
++ 'main/50_mesa at 0@.json'.format(get_option('egl-lib-suffix')),
+ install_dir : join_paths(get_option('datadir'), 'glvnd', 'egl_vendor.d')
+ )
+ endif
+--- src/gbm/backends/dri/gbm_dri.c.orig 2020-05-30 21:28:01 UTC
++++ src/gbm/backends/dri/gbm_dri.c
+@@ -307,14 +307,6 @@ dri_bind_extensions(struct gbm_dri_device *dri,
+ static const __DRIextension **
+ dri_open_driver(struct gbm_dri_device *dri)
+ {
+- /* Temporarily work around dri driver libs that need symbols in libglapi
+- * but don't automatically link it in.
+- */
+- /* XXX: Library name differs on per platforms basis. Update this as
+- * osx/cygwin/windows/bsd gets support for GBM..
+- */
+- dlopen("libglapi.so.0", RTLD_LAZY | RTLD_GLOBAL);
+-
+ static const char *search_path_vars[] = {
+ /* Read GBM_DRIVERS_PATH first for compatibility, but LIBGL_DRIVERS_PATH
+ * is recommended over GBM_DRIVERS_PATH.
+--- src/gbm/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/gbm/meson.build
+@@ -44,7 +44,7 @@ if with_platform_wayland
+ endif
+
+ libgbm = shared_library(
+- 'gbm',
++ 'gbm' + get_option('egl-lib-suffix'),
+ files_gbm,
+ include_directories : incs_gbm,
+ c_args : [c_vis_args, args_gbm],
+--- src/glx/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/glx/meson.build
+@@ -113,10 +113,10 @@ elif with_dri_platform == 'windows'
+ endif
+
+ if not with_glvnd
+- gl_lib_name = 'GL'
++ gl_lib_name = 'GL' + get_option('egl-lib-suffix')
+ gl_lib_version = '1.2.0'
+ else
+- gl_lib_name = 'GLX_mesa'
++ gl_lib_name = 'GLX_mesa' + get_option('egl-lib-suffix')
+ gl_lib_version = '0.0.0'
+ files_libglx += files(
+ 'g_glxglvnddispatchfuncs.c',
+--- src/intel/vulkan/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/intel/vulkan/meson.build
+@@ -188,7 +188,7 @@ libanv_common = static_library(
+ )
+
+ libvulkan_intel = shared_library(
+- 'vulkan_intel',
++ 'vulkan_intel' + get_option('egl-lib-suffix'),
+ [files('anv_gem.c'), anv_entrypoints[0], anv_extensions_h],
+ include_directories : [
+ inc_include, inc_src, inc_mapi, inc_mesa, inc_gallium, inc_intel, inc_compiler, inc_vulkan_wsi,
+--- src/mapi/es1api/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/mapi/es1api/meson.build
+@@ -33,7 +33,7 @@ if with_platform_windows
+ endif
+
+ libglesv1_cm = shared_library(
+- 'GLESv1_CM' + get_option('gles-lib-suffix'),
++ 'GLESv1_CM' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'),
+ ['../entry.c', es1_glapi_mapi_tmp_h],
+ c_args : [
+ c_msvc_compat_args,
+--- src/mapi/es2api/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/mapi/es2api/meson.build
+@@ -33,7 +33,7 @@ if with_platform_windows
+ endif
+
+ libgles2 = shared_library(
+- 'GLESv2' + get_option('gles-lib-suffix'),
++ 'GLESv2' + get_option('egl-lib-suffix') + get_option('gles-lib-suffix'),
+ ['../entry.c', es2_glapi_mapi_tmp_h],
+ c_args : [
+ c_msvc_compat_args,
+--- src/mapi/shared-glapi/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/mapi/shared-glapi/meson.build
+@@ -42,7 +42,7 @@ if with_platform_windows
+ endif
+
+ libglapi = shared_library(
+- 'glapi',
++ 'glapi' + get_option('egl-lib-suffix'),
+ [files_mapi_glapi, files_mapi_util, shared_glapi_mapi_tmp_h],
+ c_args : [
+ _glapi_c_args,
+--- src/util/meson.build.orig 2020-05-30 21:28:01 UTC
++++ src/util/meson.build
+@@ -122,7 +122,7 @@ files_mesa_util = files(
+ 'xxhash.h',
+ )
+
+-files_drirc = files('00-mesa-defaults.conf')
++files_drirc = files('00-mesa at 0@-defaults.conf'.format(get_option('egl-lib-suffix')))
+
+ install_data(files_drirc, install_dir : join_paths(get_option('datadir'), 'drirc.d'))
+
Added: head/graphics/mesa-devel/pkg-descr
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/pkg-descr Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,4 @@
+Development branch of Mesa 3D graphics library. Only some drivers are
+enabled, so it can co-exist with the stable version.
+
+WWW: https://www.mesa3d.org/
Added: head/graphics/mesa-devel/pkg-plist
==============================================================================
--- /dev/null 00:00:00 1970 (empty, because file is newly added)
+++ head/graphics/mesa-devel/pkg-plist Sun May 31 09:23:52 2020 (r537139)
@@ -0,0 +1,75 @@
+bin/mesa-overlay-control.py
+ at sample etc/libmap.d/mesa%%PKGNAMESUFFIX%%.conf.sample
+ at comment include/EGL/egl.h
+ at comment include/EGL/eglext.h
+ at comment include/EGL/eglextchromium.h
+ at comment include/EGL/eglmesaext.h
+ at comment include/EGL/eglplatform.h
+ at comment include/GL/gl.h
+ at comment include/GL/glcorearb.h
+ at comment include/GL/glext.h
+ at comment include/GL/glx.h
+ at comment include/GL/glxext.h
+ at comment include/GL/internal/dri_interface.h
+ at comment include/GLES/egl.h
+ at comment include/GLES/gl.h
+ at comment include/GLES/glext.h
+ at comment include/GLES/glplatform.h
+ at comment include/GLES2/gl2.h
+ at comment include/GLES2/gl2ext.h
+ at comment include/GLES2/gl2platform.h
+ at comment include/GLES3/gl3.h
+ at comment include/GLES3/gl31.h
+ at comment include/GLES3/gl32.h
+ at comment include/GLES3/gl3ext.h
+ at comment include/GLES3/gl3platform.h
+ at comment include/KHR/khrplatform.h
+ at comment include/gbm.h
+ at comment include/vulkan/vulkan_intel.h
+lib/dri%%PKGNAMESUFFIX%%/i965_dri.so
+lib/dri%%PKGNAMESUFFIX%%/iris_dri.so
+lib/dri%%PKGNAMESUFFIX%%/r600_dri.so
+lib/dri%%PKGNAMESUFFIX%%/radeonsi_dri.so
+%%VAAPI%%lib/dri%%PKGNAMESUFFIX%%/r600_drv_video.so
+%%VAAPI%%lib/dri%%PKGNAMESUFFIX%%/radeonsi_drv_video.so
+ at comment lib/libEGL%%PKGNAMESUFFIX%%.so
+lib/libEGL%%PKGNAMESUFFIX%%.so.1
+lib/libEGL%%PKGNAMESUFFIX%%.so.1.0.0
+%%X11%%@comment lib/libGL%%PKGNAMESUFFIX%%.so
+%%X11%%lib/libGL%%PKGNAMESUFFIX%%.so.1
+%%X11%%lib/libGL%%PKGNAMESUFFIX%%.so.1.2.0
+ at comment lib/libGLESv1_CM%%PKGNAMESUFFIX%%.so
+lib/libGLESv1_CM%%PKGNAMESUFFIX%%.so.1
+lib/libGLESv1_CM%%PKGNAMESUFFIX%%.so.1.1.0
+ at comment lib/libGLESv2%%PKGNAMESUFFIX%%.so
+lib/libGLESv2%%PKGNAMESUFFIX%%.so.2
+lib/libGLESv2%%PKGNAMESUFFIX%%.so.2.0.0
+lib/libVkLayer_MESA_device_select.so
+lib/libVkLayer_MESA_overlay.so
+ at comment lib/libgbm%%PKGNAMESUFFIX%%.so
+lib/libgbm%%PKGNAMESUFFIX%%.so.1
+lib/libgbm%%PKGNAMESUFFIX%%.so.1.0.0
+ at comment lib/libglapi%%PKGNAMESUFFIX%%.so
+lib/libglapi%%PKGNAMESUFFIX%%.so.0
+lib/libglapi%%PKGNAMESUFFIX%%.so.0.0.0
+lib/libvulkan_intel%%PKGNAMESUFFIX%%.so
+lib/libvulkan_radeon%%PKGNAMESUFFIX%%.so
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_r600.so
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_r600.so.1
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_r600.so.1.0
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_r600.so.1.0.0
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_radeonsi.so
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_radeonsi.so.1
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_radeonsi.so.1.0
+%%VDPAU%%lib/vdpau%%PKGNAMESUFFIX%%/libvdpau_radeonsi.so.1.0.0
+ at comment libdata/pkgconfig/dri.pc
+ at comment libdata/pkgconfig/egl.pc
+ at comment libdata/pkgconfig/gbm.pc
+ at comment libdata/pkgconfig/gl.pc
+ at comment libdata/pkgconfig/glesv1_cm.pc
+ at comment libdata/pkgconfig/glesv2.pc
+share/drirc.d/00-mesa%%PKGNAMESUFFIX%%-defaults.conf
+share/vulkan/explicit_layer.d/VkLayer_MESA_overlay.json
+ at comment share/vulkan/icd.d/intel_icd.%%ARCH%%.json
+ at comment share/vulkan/icd.d/radeon_icd.%%ARCH%%.json
+share/vulkan/implicit_layer.d/VkLayer_MESA_device_select.json
More information about the svn-ports-all
mailing list