Page MenuHomeFreeBSD

Update mesa ports to version 17.0.2
AbandonedPublic

Authored by jmd on Feb 7 2017, 3:11 AM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Oct 4, 12:00 PM
Unknown Object (File)
Wed, Oct 2, 6:01 PM
Unknown Object (File)
Wed, Oct 2, 5:25 PM
Unknown Object (File)
Tue, Oct 1, 10:22 PM
Unknown Object (File)
Fri, Sep 27, 9:43 AM
Unknown Object (File)
Sat, Sep 21, 3:56 PM
Unknown Object (File)
Sep 8 2024, 5:55 PM
Unknown Object (File)
Sep 8 2024, 7:18 AM
Subscribers

Details

Reviewers
swills
rene
kwm
Summary

This patch updates Mesa and all its slave ports to 17.0.0 rc3 (the last rc before final). It increases the llvm dependency to 4.0 for better support of late model AMD GPUs. It changes compilation to also use said LLVM instead of the base compiler. It changes the backend (thanks to mmacy!) to use libudev-devd. Adds support for DRI3 (thanks to johalun!).

Test Plan

Used in the FreeBSDDesktop github, working on i915 and amdgpu for the accompanying kernel. poudriere tested to compile on 10.3, 11.0, HEAD amd64 and i386.

If initial reviews are positive and patch is converged, CFT on freebsd-x11, and mail to ports committers.

Please note: portlint complains about a few things in this port but did so also for the original. I'd be willing to sort those out after we got the big version bump out of the way.

Diff Detail

Repository
rP FreeBSD ports repository
Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

jmd retitled this revision from to Update mesa ports to version 17.0.0.
jmd updated this object.
jmd edited the test plan for this revision. (Show Details)
jmd added reviewers: kwm, swills, rene.
jmd set the repository for this revision to rP FreeBSD ports repository.
jmd changed the visibility from "All Users" to "Public (No Login Required)".

Refresh after recent minor upgrade in ports, upgrade mesa to release 17.0.0.

Passes same poudriere tests as before.

Ok so here are some comments I saw. I will actually test the proposed changes laster. If something is unclear, you know where to find me.

graphics/dri/Makefile
6

For development these are usefull, but I believe these should be reset for normal ports.

26

I'm not sure what to do about DRI3 to be honest, I'm not sure if the OPTION is the way to go. If it fallsback to dri2 if dri3 isn't support by the kernel driver we can just enabled it. Otherwise we might need to think up something else. But atleast the description needs updating, or else nobody is going to use it.

Also there is code in Makefile.common that just enables dri3 atm right away.

graphics/libGL/Makefile.common
59

Where did this come from?

87

Why was this block removed?

99

Last time I tried this, it causes GL stuff to crash, apparently it works now? We also need to make sure we test older releases to make sure they also work.

138

is VAAPI support removed, or should we add implicit support?

155

If this now works on FreeBSD, please update the comment also

169

Hmm seems this (whole ALL_DRI_DRIVERS block) needs a new look, I think it beter to keep the vanilla layout and if needed merge the 17.0 changes. Ask me on IRC if your have questions.

graphics/libGL/files/patch-configure
10

These look like post-patch sed changes. So this patch needs to be redone without those.

lang/Makefile
133 โ†—(On Diff #26056)

stray patch?

A few comments, will address with a new patch (I can't promise when its done, poudriere'ing stuff takes a long time.... ;-) ).

graphics/dri/Makefile
6

I'll do that when I update the patch to 17.0.1 next.

26

Yeah, I'd propose we just enable it. Without the FreeBSDDesktop repo we have nothing that supports it but the fallback should work (or I'll make it work). So then next patch version default enable?

graphics/libGL/Makefile.common
59

This is important, we talked about this, I think. Instead of just linking against the llvm libraries, we now also compile with the same compiler (those anyways are there) which got around a few inconsistencies that broke stuff for amdgpu (where the whole thing seems more finicky).

99

The i915 guys running FreeBSDDesktop use the earlier version of this patch and it works. A CFT will happen before commit, so I am hoping we catch a lot of the issues.

lang/Makefile
133 โ†—(On Diff #26056)

Yes, sorry, I was also working on ROCm in the same checkout. Will remove in next version.

Update to 17.0.1, address comments by kwm. poudriere compiled on HEAD i386, 11.0 amd64, 11.0 i386, 10.3 amd64, 10.3 i386.

Please either use arc diff to generate the patches, or at least, ask for a diff with a lot of context, like arc does, either git diff -U10000 or whatever incantation is needed for svn.

lang/clover/files/git_sha1.h
1

This file could be created by a simple touch when you need it and not added here.

jmd retitled this revision from Update mesa ports to version 17.0.0 to Update mesa ports to version 17.0.2.

Update to 17.0.2, regenerate with more context, reduced diff.

Compiled on all platforms below. Dogfooding on CURRENT amd64.

jmd marked 8 inline comments as done.Mar 30 2017, 3:50 AM

Mark TODOs as done.

This comment was removed by jbeich.
graphics/dri/Makefile
6

What about other Mesa ports? libglapi has PORTREVISION > 0 that hasn't been reset on update.

graphics/libEGL/pkg-plist
10

What if I don't want Wayland on my X11 desktop or vice versa? Keep it separate until Mesa is collapsed into one big port, maybe with a bunch of options ready for subpackage support.

graphics/libGL/Makefile
15

Why? /usr/local/libdata/pkgconfig/gl.pc doesn't list dri2proto.

graphics/libGL/Makefile.common
23

Why do you need extra space?

25

Old versions aren't available there. Once the current version is obsolete (e.g. on a quarterly branch) the ports may end up with BROKEN= fails to fetch as relying solely on distfiles cache is not allowed.

32

Is this required for every Mesa port or just libGL and libEGL?

33

devel/llvm* is already required to build Gallium. If base Clang is too old express it via USES=compiler.

37

USES=compiler:c++11-lib may still be required on sparc64, powerpc* to depend on newer GCC.

52

Define USE_BINUTILS instead. Why do you need it for every Mesa port? Looks like a cargo cult. Clang would ignores those in favor of -B or COMPILER_PATH.

55

Redundant, see Mk/bsd.port.mk.

81

When did DRI2 fallback stopped to work?

83

Maybe dedup with libGL/Makefile.

84

Replace with USE_XORG=xcb then dedup with libGL/Makefile.

85

Already default since rP371035.

98

Doesn't work, even on drm-next.

$ xonotic
[...]
Linked against SDL version 1.2.15
Using SDL library version 1.2.15
Process 20396 stopped
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address: 0x108)
    frame #0: libGL.so.1`__glXSetupForCommand(dpy=0x0000000805fd8400) at glxext.c:971
   968
   969     /* If this thread has a current context, flush its rendering commands */
   970     gc = __glXGetCurrentContext();
-> 971     if (gc->currentDpy) {
   972        /* Flush rendering buffer of the current context, if any */
   973        (void) __glXFlushRenderBuffer(gc, gc->pc);
   974
(lldb) bt
* thread #1, stop reason = signal SIGSEGV: invalid address (fault address: 0x108)
  * frame #0: libGL.so.1`__glXSetupForCommand(dpy=0x0000000805fd8400) at glxext.c:971
    frame #1: libGL.so.1`glx_context_init(gc=0x0000000805dae540, psc=0x0000000805fc6440, config=0x00000008085ad500) at glxcmds.c:257
    frame #2: libGL.so.1`dri2_create_context(base=0x0000000805fc6440, config_base=0x00000008085ad500, shareList=0x0000000000000000, renderType=32788) at dri2_glx.c:209
    frame #3: libGL.so.1`CreateContext(dpy=0x0000000805fd8400, generic_id=33, config=0x00000008085ad500, shareList_user=0x0000000000000000, allowDirect=1, code=3, renderType=32788, screen=0) at glxcmds.c:300
    frame #4: libGL.so.1`glXCreateContext(dpy=0x0000000805fd8400, vis=0x0000000805da2900, shareList=0x0000000000000000, allowDirect=1) at glxcmds.c:431
    frame #5: 0x0000000800e90a1c libSDL-1.2.so.0`X11_GL_CreateContext + 60
    frame #6: 0x0000000800e94bd4 libSDL-1.2.so.0`X11_SetVideoMode + 1140
    frame #7: 0x0000000800e80892 libSDL-1.2.so.0`SDL_SetVideoMode + 1026
    frame #8: 0x00000000002c211f xonotic`VID_WrapSDL_SetVideoMode + 2111
    frame #9: 0x000000000055e6a3 xonotic`VID_Mode + 3347
    frame #10: 0x000000000055fc4e xonotic`VID_Start + 1582
    frame #11: 0x0000000000339281 xonotic`SCR_BeginLoadingPlaque + 417
    frame #12: 0x0000000000413e78 xonotic`Host_Init + 29224
    frame #13: 0x0000000000400d4d xonotic`Host_Main + 29
    frame #14: 0x00000000002c05d8 xonotic`main + 392
    frame #15: xonotic`_start(ap=<unavailable>, cleanup=<unavailable>) at crt1.c:72
149

Can you explain why?

graphics/libGL/files/patch-configure
8

Agree. I may need to revive bug 208440 to put an end to the siliness.

34

Such ELF target isn't supported by binutils in base and ports. post-patch may need to be fixed but not required.

45

Such ELF target does not exist. Same as above.

301

Don't revert upstream changes.

336

Move freebsd* to linux*) block to get rid of copypasta. Don't use *freebsd* as it matches GNU/kFreeBSD or keep it consistent with the glob in dri3_default case.

graphics/libGL/files/patch-src__loader__Makefile.in
9

Do you need libdevq somewhere despite using libudev?

graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_invocation.cpp
6

Why clobber existing build fix from rP433862 with your own version?

graphics/libGL/files/patch-src_gallium_state__trackers_clover_llvm_metadata.hpp
1

Can you restore the file comment?

graphics/libGL/files/patch-src_gallium_winsys_amdgpu_drm_amdgpu__winsys.c
8

Can you add a comment why this is necessary (for posterity)?

graphics/libGL/files/patch-src_intel_tools_aubinator.c
1โ€“3

The new file comment is more vague. Please, restore previous version.

graphics/libGL/files/patch-src_util_u__endian.h
8โ€“9

Keep space around || and sort OSes or just drop the change.

lang/clover/Makefile
31

Why? src/Makefile already handles it.

Sorry, I've realized my review was inappropriate but phabricator doesn't seem to allow removing inline comments. Feel free to ignore it.