Commit graph

110 commits

Author SHA1 Message Date
Emmanuel Vadot
a751a7f865 graphics/mesa-libs: Add back patch for iris
Due to how the mesa ports are split we need to patch meson files so
iris is prefered on compatible intel GPU.

PR:  257462
2021-08-04 12:23:10 +02:00
Emmanuel Vadot
f74b56360d graphics/mesa-*: Unbreak on 11.4
Re-add patches that was removed on the 21.1.5 update.

PR:    257305
2021-07-28 09:12:07 +02:00
Piotr Kubaj
588ce0d6f9 graphics/mesa-dri: fix build on powerpc64le
n file included from ../src/gallium/drivers/llvmpipe/lp_setup_tri.c:50:
/usr/lib/clang/11.0.1/include/altivec.h:55:19: error: unknown type name 'vector'
static __inline__ vector bool char __ATTRS_o_ai
                  ^
/usr/lib/clang/11.0.1/include/altivec.h:56:10: error: unknown type name 'vector'
vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c);
         ^
/usr/lib/clang/11.0.1/include/altivec.h:56:32: error: unknown type name 'vector'
vec_perm(vector bool char __a, vector bool char __b, vector unsigned char __c);
                               ^
/usr/lib/clang/11.0.1/include/altivec.h:66:19: error: unknown type name 'vector'
static __inline__ vector bool short __ATTRS_o_ai vec_perm(
                  ^
/usr/lib/clang/11.0.1/include/altivec.h:67:5: error: unknown type name 'vector'
    vector bool short __a, vector bool short __b, vector unsigned char __c);
    ^
/usr/lib/clang/11.0.1/include/altivec.h:67:28: error: unknown type name 'vector'
    vector bool short __a, vector bool short __b, vector unsigned char __c);
                           ^
/usr/lib/clang/11.0.1/include/altivec.h:80:19: error: unknown type name 'vector'
static __inline__ vector bool int __ATTRS_o_ai
                  ^
/usr/lib/clang/11.0.1/include/altivec.h:81:10: error: unknown type name 'vector'
vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c);
         ^
/usr/lib/clang/11.0.1/include/altivec.h:81:31: error: unknown type name 'vector'
vec_perm(vector bool int __a, vector bool int __b, vector unsigned char __c);
                              ^
/usr/lib/clang/11.0.1/include/altivec.h:96:19: error: unknown type name 'vector'
static __inline__ vector bool long long __ATTRS_o_ai
                  ^
/usr/lib/clang/11.0.1/include/altivec.h:97:10: error: unknown type name 'vector'
vec_perm(vector bool long long __a, vector bool long long __b,
         ^
/usr/lib/clang/11.0.1/include/altivec.h:97:37: error: unknown type name 'vector'
vec_perm(vector bool long long __a, vector bool long long __b,
                                    ^
/usr/lib/clang/11.0.1/include/altivec.h:203:9: error: unknown type name 'vector'
vec_add(vector bool char __a, vector signed char __b) {
        ^
/usr/lib/clang/11.0.1/include/altivec.h:208:33: error: unknown type name 'vector'
vec_add(vector signed char __a, vector bool char __b) {
                                ^
/usr/lib/clang/11.0.1/include/altivec.h:218:9: error: unknown type name 'vector'
vec_add(vector bool char __a, vector unsigned char __b) {
        ^
/usr/lib/clang/11.0.1/include/altivec.h:223:35: error: unknown type name 'vector'
vec_add(vector unsigned char __a, vector bool char __b) {
                                  ^
/usr/lib/clang/11.0.1/include/altivec.h:232:53: error: unknown type name 'vector'
static __inline__ vector short __ATTRS_o_ai vec_add(vector bool short __a,
                                                    ^
/usr/lib/clang/11.0.1/include/altivec.h:238:53: error: unknown type name 'vector'
                                                    vector bool short __b) {
                                                    ^
/usr/lib/clang/11.0.1/include/altivec.h:248:9: error: unknown type name 'vector'
vec_add(vector bool short __a, vector unsigned short __b) {
        ^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
20 errors generated.

Additionally, fix packaging failure on all powerpc*, since llvmpipe is now used.
2021-07-21 11:21:44 +00:00
Emmanuel Vadot
22a85734ff mesa*: Update to 21.1.5
- swrast is only a gallium driver now.
- Bump needed llvm to 12
- libclc is still a llvm10, moving to >10 needs to change
  from where we pick libclc as its now part of llvm

Differential Revision:	    https://reviews.freebsd.org/D31165
Reviewed by: kbowling, zeising
2021-07-20 09:36:39 +02:00
Piotr Kubaj
5409d7b219 graphics/mesa-dri: enable libunwind on armv7 2021-06-28 20:27:16 +00:00
Kevin Bowling
da3162c7c9 graphics/mesa-libs: Bump reverse deps for libglvnd
Per discussion with bapt on helping pkg handle the changing of these
deps and avoiding impossible upgrade senarios.

PR:		246767
Reviewed by:	manu, bapt
Approved by:	x11
Differential Revision:	https://reviews.freebsd.org/D30824
2021-06-22 11:53:08 -07:00
Piotr Kubaj
b2c4a0ef4b graphics/mesa-dri: fix build on riscv64
Submitted by:	linimon
PR:	256138
2021-06-16 20:33:08 +00:00
Mathieu Arnold
305f148f48
Remove # $FreeBSD$ from Makefiles. 2021-04-06 16:31:07 +02:00
Alexey Dokuchaev
1c59c354a0 Improve r556423 and allow building against custom LLVM version, i.e.
respect flexible LLVM_DEFAULT, by not hardcoding package version and
depending on the appropriate executable instead.

This is to help users sticking to the particular LLVM versions lower
the number of different LLVM packages installed.  For example, there
is currently a mismatch between LLVM_DEFAULT assigned by the default
versions framework (90) and in this file (10; this hasn't changed).
2021-03-15 06:04:47 +00:00
Mark Linimon
c72af79a3f Remove obsolete sparc64 stanza. This collided with ONLY_FOR_ARCHS
statements in the ports that include it, with the following absurd
value for IGNORE on e.g. aarch64:

  is only for amd64 i386, while you are running aarch64 (reason: Clover needs a GPU supported by the Radeon KMS driver) (reason: not supported on sparc64)

Approved by:	portmgr (tier-2 blanket)
2021-01-27 08:36:47 +00:00
Jan Beich
0b0b8b94d5 graphics/mesa-dri: exclude buffer age on iris under kwin
Freeze in OpenGL initialization detected

PR:		251836
Reported by:	Roman, Oleg Nauman, arrowd, Oleksandr Kryvulia
Tested by:	arrowd, Roman
Approved by:	manu
2020-12-24 04:22:33 +00:00
Emmanuel Vadot
450f410688 mesa-*: Update to 20.2.3
- Fix mesa-gallium-va and mesa-gallium-vdpau for X11 usage
 - Add a patch so iris will be prefered for compatible intel GPUs (>=broadwell)

PR:		250307 250325
2020-12-03 20:55:32 +00:00
Piotr Kubaj
99ed1a64da graphics/mesa-dri: make powerpc64 use LLVM10
LLVM90 requirement was introduced when Mesa used LLVM80 and 90 gave much better experience on powerpc64. Now that everyone moved to 10, make a move on powerpc64 as well.
2020-11-27 00:23:11 +00:00
Mathieu Arnold
e38fe546ea Remove non existing patch.
PR:		250723
2020-11-05 16:44:47 +00:00
Piotr Kubaj
631389fe37 graphics/mesa-dri: fix build of libosmesa on powerpc64le
Error:
../src/gallium/auxiliary/util/u_pwr8.h:87:11: error: implicit declaration of function 'vec_perm' is invalid in C99 [-Werror,-Wimplicit-function-declaration]
   return vec_perm (even, odd, perm_mask);
          ^
2020-10-23 00:08:58 +00:00
Emmanuel Vadot
c6b2d4f359 graphics/mesa*: Add Iris Gallium driver and libunwind for more arch
Iris is the prefered gallium driver for Intel Gen8 to Gen11, add it
to the build. [1]
Add libunwind support for more arch. [2]

PR:		250307 [1], 250305 [2]
Submitted by:	jbeich [2]
Reported by:	jbeich [1]
Reviewed by:	zeising
2020-10-13 11:53:49 +00:00
Emmanuel Vadot
57ce68a0c0 graphics/mesa*: Update to 20.2
Update to 20.2
Move graphics/libxatracker to graphics/mesa-gallium-xa
Remove VAAPI and VDPAU options in mesa-libs in favor of
two new ports : mesa-gallium-va and mesa-gallium-vdpau
Bump needed llvm to llvm10
Change a lot of meson option from false to disabled as it's
deprecated.
Remove the drm and surfaceless platform from mesa* as it's always
enabled now.
Add zstd option, used for shader cache.

Reviewed by:	x11 (zeising@)
Differential Revision:	https://reviews.freebsd.org/D26682
2020-10-12 08:30:54 +00:00
Emmanuel Vadot
19c76400cc mesa-libs: Add glesv1 lib
There is no real reason to disable glesv1 so add it to the build.
While here add a USE_GL for it.

Reviewed by:	zeising
Approved by:	x11 (zeising@)
Differential Revision:	https://reviews.freebsd.org/D26461
2020-09-19 09:34:36 +00:00
Emmanuel Vadot
a55db457da mesa: Remove sparc64 patches
No one who cares about graphics have a sparc64 machine.
Next update to 20.2 will not contain any patches too.

Reviewed by:	zeising
Approved by:	x11 (zeising@)
Differential Revision:	https://reviews.freebsd.org/D26460
2020-09-19 09:33:33 +00:00
Emmanuel Vadot
bee928efb5 mesa*: Only add x11 dependancy if it's requested
This allow to have a full setup without any x11 deps.

PR:	247029
Reviewed by:	zeising
Approved by:	x11 (zeising@)
Differential Revision:	https://reviews.freebsd.org/D26438
2020-09-17 09:22:29 +00:00
Niclas Zeising
cf91f2edba graphics/mesa: Fix build with -fno-common
Pull in a bunch of upstream patches to graphics/mesa to fix build with
-fno-common, which is the default after the llvm 11 import.

MFH:		2020Q3
2020-08-18 17:50:21 +00:00
Piotr Kubaj
8a99661feb graphics/mesa-dri: switch powerpc64 to llvmpipe
powerpc* is left in .elif block for powerpc and powerpcspe which I didn't test.
2020-07-10 11:54:29 +00:00
Emmanuel Vadot
c913da8a18 mesa-dri: Use gallium SWRAST on x86 and aarch64
Mesa have two software rasterizer, the classic mesa dri one and
the gallium one.
The classic dri one is starting to be deprecated upstream (like all
dri drivers) so switch the arches that can build the gallium one to it.

Approved by:	zeising (x11)
2020-07-03 17:13:14 +00:00
Niclas Zeising
86562318c7 graphics/mesa: Fix minor issues from meson switch
Fix a couple of minor issues with mesa related ports after the switch to
meson.
Define _GNU_SOURCE when building on FreeBSD.  This fixes blur effects in
Plasma 5 and issues with the SDDM greeter.  This fix was originally applied
in r516100 but got lost in the switch to meson. [1]
Properly detect sys/sysctl.h on FreeBSD.  On FreeBSD sys/sysctl.h needs
sys/types.h as well, patch the meson build script to take this into account.
Fix a broken sed command to properly set ${LOCALBASE}/etc and
${LOCALBASE}/share/ as appropriate.

Bump portrevision of all mesa related ports.

PR:		247138 [1]
Reported by:	Roman [1]
Reviewed by:	manu
Tested by:	Roman, Serge Volkov
Differential Revision:	https://reviews.freebsd.org/D25265
2020-06-16 15:38:29 +00:00
Emmanuel Vadot
983ffd80ac mesa-dri: Bump PORTREVISION after 538573
Approved by:	zeising (x11@ implicit)
2020-06-12 08:03:57 +00:00
Emmanuel Vadot
6e4e06900f mesa-dri: SWRAST is set with DRIVER not GDRIVER
Fix packaging swrast_dri.so

PR:		247194
Approved by:	zeising (x11@ implicit)
2020-06-12 08:01:13 +00:00
Emmanuel Vadot
3d85ce5b1b mesa-dri: Switch back to the dri swrast drivers
The meson switch changed which swrast driver we build from dri to gallium.
I'm not too sure at how the gallium swrast is usable but switch back to the dri
one.
This also fixes the build on armv7 where the gallium swrast driver isn't available.

Approved by:	zeising (x11@ implicit)
2020-06-11 14:22:35 +00:00
Emmanuel Vadot
73a20c3860 mesa-dri: Fix build when PLATFORM_X11 isn't set
Approved by:	zeising (x11@ implicit)
2020-06-10 20:12:21 +00:00
Niclas Zeising
a568c2781c mesa: Fix build empty DRI_DRIVER
In some cases, such as on sparc64, armv6 and armv7 etc, DRI_DRIVER,
GALLIUM_DRIVER and/or VULKAN_DRIVER might be undefined.  This causes an
error similar to
make: "/usr/ports/graphics/mesa-dri/Makefile" line 106: Malformed conditional (${DRI_DRIVERS:M${:UI915}})

Fix this by checking if [DRI,GALLIUM,VULKAN]_DRIVER is defined before
checking what it is set to.

While here, remove textproc/py-mako dependency from mesa-dri/Makefile, it's
already included in mesa-dri/Makefile.common, no need to depend on it twice.

PR:		247117
Reported by:	jbeich
2020-06-09 19:56:17 +00:00
Emmanuel Vadot
3bfb7a4ed5 mesa-dri: Bump PORTREVISION
Due to some options change we had a small windows where wayland might
not have been enabled, bump PORTREVISION so next at next update it will
be brought back.

Reported by:	zeising
Approved by:	zeizing (x11@ implicit)
2020-06-09 12:46:12 +00:00
Emmanuel Vadot
5d84b15788 mesa-dri: Add wayland to -Dplatform if option is selected
PR:		247056
Approved by:	zeising (x11@ implicit)
2020-06-08 10:49:33 +00:00
Emmanuel Vadot
f914799192 mesa*: Switch to using a native-file for llvm
Meson seems to not care that a llvm-config binary exists and will prefer
to use llvm-config-devel for some reason.
Using a native-file fixes that and meson will correctly use the llvm specified
in it.

PR:	247026
Approved by:	zeising (x11@ implicit)
2020-06-08 09:55:38 +00:00
Emmanuel Vadot
d212d9633c mesa*: Add platforms option
Mesa support different platforms, add some options that control which one
we are enabling and build the -Dplatform meson arg based on that.
Keep the WAYLAND option for now but if you're using it switch to the
newly created PLATFORM_WAYLAND.

PR:		246969
Approved by:	zeising (x11@ implicit)
2020-06-06 09:23:13 +00:00
Emmanuel Vadot
51c873e1b0 mesa-dri: Disable some arm drivers
We don't have any hardware or driver capable of running the freedreno driver
so disable it.
Our VC4 support don't work with mesa so disable it too.

Reviewed by:	zeising (x11@)
Approved by:	zeising (x11@)
Differential Revision:	https://reviews.freebsd.org/D25093
2020-06-05 18:49:51 +00:00
Emmanuel Vadot
ba3f92c501 mesa*: Use lld from devel/binutils if /usr/bin/ld isn't lld
GCC arches on 11 and 12 will uses ld.bfd and don't have ld.lld so we
can't blindly use ld.lld.

Suggested by: jbeich
Reported by:	pkubaj
Approved by:	zeising (x11@ implicit)
2020-06-05 18:44:21 +00:00
Emmanuel Vadot
de20ce3e56 mesa*: Always use LLD
LLD is already used in 12 and 13 but we still use ld.bfd by default on 11
and for some unknown reason some mesa libs fails to build with it since the
meson switch.

PR:		246997
Approved by:	zeising (x11@ implicit)
2020-06-05 16:18:58 +00:00
Emmanuel Vadot
5c9b4f4a8b mesa*: Fix build on i386
Fix build related to libatomic on i386.
Simply copy the patch from mesa-devel.

Reported by:	jbeich
Approved by:	zeising (x11@ implicit)
2020-06-05 12:57:04 +00:00
Emmanuel Vadot
317e5989e2 mesa: Fix linking on 11
11 uses gnuld by default and it doesn't support --build-id
Add a check in meson and raise the meson version to 0.46 as
cc.get_supported_link_arguments was added in this version.
Upstream already do this check.

Reported by:	kib
Approved by:	zeising (x11@, implicit)
2020-06-05 11:31:35 +00:00
Emmanuel Vadot
899ab84a70 mesa*: Switch to meson
Upstream switched to meson for their build system so do the same as
it will be easier to find problems sooner than later.
This also switch to python3, python is only used for the build.
There is more thing enabled by default (or auto-enabled based on some
configuration) so we need to disable a lot more things than with autotools.

This should be a non functional change.

Reviewed by:	zeising (x11@)
Differential Revision:	https:/reviews.freebsd.org/D25092
2020-06-05 09:13:57 +00:00
Jan Beich
cf473c33af Adapt LLVM_DEFAULT downgrades to the new version scheme in devel/llvm10
$ DEFAULT_VERSIONS=llvm=90 make -V LLVM_DEFAULT -C graphics/mesa-dri
80
$ DEFAULT_VERSIONS=llvm=10 make -V LLVM_DEFAULT -C graphics/mesa-dri
10

PR:		245178
Reported by:	mi
Approved by:	x11 (zeising), maintainer timeout (2 months)
MFH:		2020Q2 (for llvm10 users)
Differential Revision:	https://reviews.freebsd.org/D24222
2020-05-11 20:11:41 +00:00
Niclas Zeising
94e6b0d69b graphics/mesa: Update to 19.0.8
Update mesa and related ports to 19.0.8.
This is the last version where the autotools build system is being used.
This serves as a stepping stone for reworking the ports to use the meson
build system and to enable further updates.

PR:		235570
Submitted by:	jbeich (with minor changes)
Differential Revision:	https://reviews.freebsd.org/D19099
			https://reviews.freebsd.org/D19100
2020-05-03 16:15:23 +00:00
Piotr Kubaj
b319705268 graphics/mesa-dri: switch to llvm90 on powerpc64
It fixes some graphic crashes.
2020-03-16 19:57:41 +00:00
Niclas Zeising
121ae90af1 graphics/mesa-libs: Change default to use DRI3
Change the default mesa configuration to use DRI3 rather than the older DRI2
interface.  This should improve performance somewhat, and alleviates the need
for the FIXDRM option in x11-servers/xorg-server.

Remove the FIXDRM option from x11-servers/xorg-server.

Add an UPDATING entry for the change.

For users of graphics/drm-legacy-kmod or the base graphics drivers, this might
cause regressions.  If you experience problems when running OpenGL applications
please force the use of the DRI2 backend by setting the LIBGL_DRI3_DISABLE
environment variable to 1 before starting any OpenGL application.  This is
easiest done by adding it to your shell startup file or .xinitrc.

Add UPDATING entry for xorg-server, detailing the change of device
configuration backend.

PR:		196678, 244306 (for tracking)
2020-03-08 19:27:27 +00:00
Niclas Zeising
fdfb1d3b8c Enable AMD drivers on arm64
Submitted by:	andrew
Differential Revision:	https://reviews.freebsd.org/D23439
2020-02-15 20:49:31 +00:00
Dmitry Marakasov
fe43a33435 - Update WWW
Approved by:	portmgr blanket
2020-01-06 09:30:12 +00:00
Piotr Kubaj
e5ababfaee graphics/mesa-dri: remove ppc64 elfv2 workaround
After https://svnweb.freebsd.org/base?view=revision&revision=355397, base clang can compile mesa on ppc64, so there's no need for this workaround anymore.

No PORTREVISION bump because elfv2 still isn't the default.

Approved by:	zeising (maintainer), mentors (implicit approval)
Differential Revision:	https://reviews.freebsd.org/D22686
2019-12-05 10:28:10 +00:00
Piotr Kubaj
4b2b20a5a8 graphics/mesa-dri: fix build on powerpc64 elfv2
Base LLVM9 fails to build this port with clang crash (reported on https://bugs.llvm.org/show_bug.cgi?id=43862). The port builds when using LLVM8. Since we depend on LLVM8 anyway, use it also for compilation on elfv2.

Approved by:	zeising (maintainer), tcberner (mentor)
Differential Revision:	https://reviews.freebsd.org/D22274
2019-11-29 21:37:03 +00:00
Niclas Zeising
d9df28a9ce Update xorgproto, libX11 and libXvMC
Update x11/xorgproto to 2019.2 [0]
Disable all legacy headers, they are no longer needed, since they only
detail deprecated protocol features.

Update x11/libX11 to 1.6.9
This is a minor update, mostly containing fixes to work with updated
x11/xorgproto.

Update x11/libXvMC to  1.0.12 [1]
This is a minor update, mostly containing fixes to work with updated
x11/xorgproto.

Patch mesa prts to explicitly link against -lXv, previously this was pulled
in by x11/libXvMC, but with changes to libXvMC .pc file, this is no longer
true.
Bump portrevision for mesa-dri because of this.

Thanks fo antoine for the exp-run!

PR:		241314 (exp-run) [0], 240801 [1]
Submitted by:	pete@nomadlogic.org [1]
2019-11-06 17:58:27 +00:00
Niclas Zeising
c32f72e68d Switch all ports to use USES=xorg-cat
Change all ports to use USES=xorg-cat instead of the old XORG_CAT
Add USES=xorg and USES=gl as needed to x11@ ports
2019-11-03 21:56:37 +00:00
Niclas Zeising
0824125a0c graphics/mesa: Add -D_GNU_SOURCE to compile flags
Add -D_GNU_SOURCE to compile flags when building on FreeBSD.  This is needed
to have mesa work with various locales, that for instance use , instead of .
as a decmal separator.

Bump portrevision on all mesa related ports.

PR:		241506
Reported by:	Jesper Schmitz Mouridsen
MFH:		2019Q4
2019-10-30 19:07:32 +00:00