Bug 230789 - graphics/mesa-dri: switch to llvm70
Summary: graphics/mesa-dri: switch to llvm70
Status: New
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 mailing list
URL:
Keywords: patch
Depends on: 227682
Blocks: 235570
  Show dependency treegraph
 
Reported: 2018-08-20 23:07 UTC by Jan Beich
Modified: 2019-02-07 10:46 UTC (History)
4 users (show)

See Also:
zeising: maintainer-feedback-


Attachments
For Mesa 18.1 (5.46 KB, patch)
2018-08-20 23:07 UTC, Jan Beich
no flags Details | Diff
v1 (2.80 KB, patch)
2018-08-20 23:34 UTC, Jan Beich
no flags Details | Diff
v2 (7.88 KB, patch)
2018-11-29 13:23 UTC, Jan Beich
jbeich: maintainer-approval? (x11)
Details | Diff
beignet + llvm80 (2.68 KB, patch)
2019-01-30 13:33 UTC, Jan Beich
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Beich freebsd_committer 2018-08-20 23:07:53 UTC
Created attachment 196405 [details]
For Mesa 18.1
Comment 1 Jan Beich freebsd_committer 2018-08-20 23:34:38 UTC
Created attachment 196406 [details]
v1

Oops, drop patch that will conflict with bug 230298.
Comment 2 Niclas Zeising freebsd_committer 2018-08-24 14:37:43 UTC
Hi!
llvm70 is still in RC in the ports tree.  I would like to see it get bumped to a release version before this goes in.
I also hope that gecko ports and other big consumers of ports llvm70 gets bumped at the same time.  That way there won't be a window where you would need two llvm versions installed.
Comment 3 Brooks Davis freebsd_committer 2018-08-24 15:56:06 UTC
FYI, llvm70 is definitely currently broken on i386 (it generates lib calls for atomics what we don't implement).  dim@ is working on getting the change that caused this fixed.
Comment 4 Jan Beich freebsd_committer 2018-08-26 17:57:19 UTC
(In reply to Niclas Zeising from comment #2)
> I also hope that gecko ports and other big consumers of ports llvm70
> gets bumped at the same time.  That way there won't be a window
> where you would need two llvm versions installed.

I'd like to start somewhere.
- bug 230790 will bump 10.4/11.1 users to Clang 7.0 but after 10.4/11.1 EOL that change would be nop.
- gecko@ needs clang-sys to support "clang_7_0" bindings or bindgen may crash when building Stylo but, surprisingly, it doesn't, see https://ptpb.pw/mpif

(In reply to Brooks Davis from comment #3)
Mesa doesn't use LLVM for atomics, so the change here builds fine on all Clang architectures. For one, llvmpipe (installed as swrast_dri.so) works fine on 10.4 i386 (tested Firefox 63 with WebRender enabled).
Comment 5 Jan Beich freebsd_committer 2018-09-23 17:47:15 UTC
I plan to land this shortly after 2018Q4 branches. Mesa itself needs newer LLVM in order to support recent (mainly AMD) hardware better.

llvm60 is unlikely to receive upstream backports now that llvm70 is stable. Projects that support more than one stable branch are actually rare due to tremendous waste of resources. Even Mesa quickly sunsets previous branch after X.Y.1 release.
Comment 6 Niclas Zeising freebsd_committer 2018-09-24 15:33:52 UTC
As I've stated before, I'd like for this to happen to most of the ports tree at once.  Only bumping mesa just means that everyone will need to have two versions of llvm installed in order to get other desktop applications, such as gecko ports.
Comment 7 Tobias Kortkamp freebsd_committer 2018-10-14 08:46:42 UTC
(In reply to Niclas Zeising from comment #6)
> As I've stated before, I'd like for this to happen to most of the
> ports tree at once.

What's the plan to make this happen?

> Only bumping mesa just means that everyone will need to have two
> versions of llvm installed in order to get other desktop applications,
> such as gecko ports.

Since ports r481071 Gecko ports require llvm70 to build as well.
Comment 8 Tobias Kortkamp freebsd_committer 2018-11-16 07:04:04 UTC
Ping?  Another month has passed.

Can we be clued into the roadmap to llvm70 here?
Comment 9 Niclas Zeising freebsd_committer 2018-11-16 08:10:12 UTC
(In reply to Tobias Kortkamp from comment #8)

We recently switched wayland default to on for mesa ports.  I'd like for that to settle before switching this as well.  We have a graphics team meeting next week, after that.
Comment 10 Jan Beich freebsd_committer 2018-11-29 13:23:35 UTC
Created attachment 199665 [details]
v2

Hop onto DEFAULT_VERSIONS train after ports r485466. Obviously, if x11@ is gonna drag progress during the next bump Mesa would return to the local default.
Comment 11 Tobias Kortkamp freebsd_committer 2018-11-29 13:31:14 UTC
(In reply to Niclas Zeising from comment #9)
> We have a graphics team meeting next week, after that.

Are you still planning on publishing meeting notes like in October?
Comment 12 Niclas Zeising freebsd_committer 2018-11-29 14:38:15 UTC
(In reply to Tobias Kortkamp from comment #11)
> Are you still planning on publishing meeting notes like in October?

Yes, that's the plan.  I'm looking into why this hasn't happened yet.
Comment 13 Jan Beich freebsd_committer 2019-01-26 12:38:05 UTC
After bug 235215 lands v2 will switch mesa-* to llvm80. Pick v1 if you want to stay on llvm70.
Comment 14 Tobias Kortkamp freebsd_committer 2019-01-28 14:51:34 UTC
mesa-dri-18.3.2 with llvm80-8.0.0.r1 and amdgpu needs a backport
of [1] to avoid

 '+vgpr-spilling' is not a recognized feature for this target (ignoring feature)

errors.

[1] https://gitlab.freedesktop.org/mesa/mesa/commit/9cab8ccd6cb5aa8a4748dd6d7fc15d9747624df6
Comment 15 Jan Beich freebsd_committer 2019-01-30 13:33:09 UTC
Created attachment 201531 [details]
beignet + llvm80

(After v2) lang/beignet fails with DEFAULT_VERSIONS+=llvm=80, so here's a fix. Tested on Skylake GT2 via graphics/waifu2x-converter-cpp.

Rationale is in the patch header. I suspect Debian will send a similar fix upstream but given bug 233652 there's not much hope.