pkgsrc-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[pkgsrc/trunk]: pkgsrc/graphics/MesaLib MesaLib: fix PR 54823



details:   https://anonhg.NetBSD.org/pkgsrc/rev/d9b4944e383f
branches:  trunk
changeset: 409513:d9b4944e383f
user:      triaxx <triaxx%pkgsrc.org@localhost>
date:      Sat Jan 18 21:29:05 2020 +0000

description:
MesaLib: fix PR 54823

pkgsrc changes:
---------------
  * Undefine ALIGN symbol as close as possible to the ALIGN function since
    it is defined in machine/param.h on FreeBSD.
  * Add test to verify there is at least one needed gallium driver for VA.
    On FreeBSD, nouveau is disabled and r600 and radeonsi are enabled only
    if llvm option is activated.

diffstat:

 graphics/MesaLib/Makefile                              |  20 +++++++++--------
 graphics/MesaLib/distinfo                              |   3 +-
 graphics/MesaLib/patches/patch-src_mesa_main_marshal.h |  16 ++++++++++++++
 3 files changed, 29 insertions(+), 10 deletions(-)

diffs (78 lines):

diff -r 812017f8ea05 -r d9b4944e383f graphics/MesaLib/Makefile
--- a/graphics/MesaLib/Makefile Sat Jan 18 21:23:34 2020 +0000
+++ b/graphics/MesaLib/Makefile Sat Jan 18 21:29:05 2020 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.180 2020/01/04 01:50:32 nia Exp $
+# $NetBSD: Makefile,v 1.181 2020/01/18 21:29:05 triaxx Exp $
 
 DISTNAME=      mesa-19.2.7
 PKGNAME=       ${DISTNAME:S/mesa/MesaLib/}
@@ -54,14 +54,6 @@
 MESON_ARGS+=           -Dgbm=true
 MESON_ARGS+=           -Dgallium-xa=true
 PLIST.kms=             yes
-.  include "../../multimedia/libva/available.mk"
-.  if ${VAAPI_AVAILABLE} == "yes"
-MESON_ARGS+=           -Dgallium-va=true
-PLIST.vaapi=           yes
-.    include "../../multimedia/libva/buildlink3.mk"
-.  else
-MESON_ARGS+=           -Dgallium-va=false
-.  endif
 .  if !empty(MACHINE_ARCH:M*arm*) || \
       ${MACHINE_ARCH} == "aarch64"
 # ARM Mali Utgard
@@ -109,6 +101,16 @@
 PLIST.r200=            yes
 PLIST.r300=            yes
 .  endif
+.  include "../../multimedia/libva/available.mk"
+.  if ${VAAPI_AVAILABLE} == "yes" && \
+      !(empty(GALLIUM_DRIVERS:Mr600) && empty(GALLIUM_DRIVERS:Mradeonsi) && \
+        empty(GALLIUM_DRIVERS:Mnouveau))
+MESON_ARGS+=           -Dgallium-va=true
+PLIST.vaapi=           yes
+.    include "../../multimedia/libva/buildlink3.mk"
+.  else
+MESON_ARGS+=           -Dgallium-va=false
+.  endif
 .else
 MESA_PLATFORMS+=       surfaceless
 MESON_ARGS+=           -Degl=false
diff -r 812017f8ea05 -r d9b4944e383f graphics/MesaLib/distinfo
--- a/graphics/MesaLib/distinfo Sat Jan 18 21:23:34 2020 +0000
+++ b/graphics/MesaLib/distinfo Sat Jan 18 21:29:05 2020 +0000
@@ -1,4 +1,4 @@
-$NetBSD: distinfo,v 1.145 2019/12/08 13:07:20 nia Exp $
+$NetBSD: distinfo,v 1.146 2020/01/18 21:29:05 triaxx Exp $
 
 SHA1 (mesa-19.2.7.tar.xz) = 9b8ebf66770353a48bd710e12e2727fb33645f44
 RMD160 (mesa-19.2.7.tar.xz) = 5323b623ac22c168b86548cf6d842ce004e346a9
@@ -35,6 +35,7 @@
 SHA1 (patch-src_mapi_u__current.h) = 9f4744681381a0959fda2926a436f296c89577f3
 SHA1 (patch-src_mesa_main_extensions.c) = 2f48bdb1176c2878bb33bcfab7556172b50a987e
 SHA1 (patch-src_mesa_main_macros.h) = c5dceaa8dc02a58e5b2273d82e3fe1cc12e327d3
+SHA1 (patch-src_mesa_main_marshal.h) = 4e4c08796a61aaa9f2463a9797e382e2e29860e9
 SHA1 (patch-src_mesa_main_shader__query.cpp) = 3f9c31645d87855759def11344dee16af23c7be3
 SHA1 (patch-src_mesa_x86_common__x86.c) = f8c4b93443ef66d017f6aa114b877565b30f2598
 SHA1 (patch-src_util_build__id.c) = 7a9547bbda9d2fb9f0018ccf27b70b59e497aa2c
diff -r 812017f8ea05 -r d9b4944e383f graphics/MesaLib/patches/patch-src_mesa_main_marshal.h
--- /dev/null   Thu Jan 01 00:00:00 1970 +0000
+++ b/graphics/MesaLib/patches/patch-src_mesa_main_marshal.h    Sat Jan 18 21:29:05 2020 +0000
@@ -0,0 +1,16 @@
+$NetBSD: patch-src_mesa_main_marshal.h,v 1.1 2020/01/18 21:29:05 triaxx Exp $
+
+ALIGN is also defined in machine/param.h on FreetBSD.
+
+--- src/mesa/main/marshal.h.orig       2019-12-04 22:10:14.000000000 +0000
++++ src/mesa/main/marshal.h
+@@ -55,6 +55,9 @@ _mesa_glthread_allocate_command(struct gl_context *ctx
+    struct glthread_state *glthread = ctx->GLThread;
+    struct glthread_batch *next = &glthread->batches[glthread->next];
+    struct marshal_cmd_base *cmd_base;
++#ifdef ALIGN
++#undef ALIGN
++#endif
+    const size_t aligned_size = ALIGN(size, 8);
+ 
+    if (unlikely(next->used + size > MARSHAL_MAX_CMD_SIZE)) {



Home | Main Index | Thread Index | Old Index