Bug 220982 - graphics/mesa-dri: update to 17.2.2
Summary: graphics/mesa-dri: update to 17.2.2
Status: Closed FIXED
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 (Nobody)
URL: https://www.mesa3d.org/relnotes/17.2....
Keywords: needs-qa, patch, patch-ready
Depends on: 219247 220967 220981 224659
Blocks: 223195
  Show dependency treegraph
 
Reported: 2017-07-24 21:17 UTC by Jan Beich
Modified: 2017-12-28 23:08 UTC (History)
6 users (show)

See Also:


Attachments
rc1 (5.15 KB, patch)
2017-07-24 21:17 UTC, Jan Beich
no flags Details | Diff
rc2 (5.15 KB, patch)
2017-07-31 22:47 UTC, Jan Beich
no flags Details | Diff
rc2 (8.01 KB, patch)
2017-08-05 15:10 UTC, Jan Beich
no flags Details | Diff
rc2 (8.23 KB, patch)
2017-08-05 15:16 UTC, Jan Beich
no flags Details | Diff
rc2 (7.73 KB, patch)
2017-08-05 15:30 UTC, Jan Beich
no flags Details | Diff
rc3 (final) (8.85 KB, patch)
2017-08-07 22:44 UTC, Jan Beich
no flags Details | Diff
rc4 (9.30 KB, patch)
2017-08-13 01:21 UTC, Jan Beich
no flags Details | Diff
rc5 (9.30 KB, patch)
2017-08-21 15:27 UTC, Jan Beich
no flags Details | Diff
release (9.16 KB, patch)
2017-09-05 11:21 UTC, Jan Beich
no flags Details | Diff
release, v2 (9.16 KB, patch)
2017-09-17 23:53 UTC, Jan Beich
no flags Details | Diff
glxinfo-mesa-17.2.1 (27.22 KB, text/plain)
2017-09-21 18:25 UTC, Carlos J. Puga Medina
no flags Details
release, v3 (9.55 KB, patch)
2017-10-03 05:35 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 freebsd_triage 2017-07-24 21:17:19 UTC
Created attachment 184678 [details]
rc1

Minor releases (a la semver) have medium risk of runtime regressions. Let's piece together the puzzle of QA e.g.,

- mesa-{libs,dri}, libosmesa, clover: build fine on 10.3 i386/amd64, 11.0 i386/amd64, 12.0 i386/amd64
- mesa-{libs,dri} builds fine on 11.1 aarch64 (no armv6 due to bug 220542)
- mesa-dri + llvm39 builds fine on 12.0 amd64 (llvm50 is N/A atm)
- mesa-dri + TEXTURE=off + VAAPI=on + VDPAU=on builds fine on 10.3 i386
- mesa-libs + WAYLAND=on builds fine on 10.3 i386 (see bug 220981)
- OpenGL and VAAPI apps work fine on i965/skl + X11+DRI3 on 12.0+drm-next amd64

https://lists.freedesktop.org/archives/mesa-dev/2017-July/164195.html
Comment 1 Jan Beich freebsd_committer freebsd_triage 2017-07-24 21:32:03 UTC
Any clue when devel/llvm50 is going to be available in the ports? According to llvm.org schedule rc1 should've appeared a few days ago. devel/llvm-devel is currently too old to be of much use. 12.0-CURRENT has Clang 5.0 since base r321369, so it'd be nice to check LLVM 5.0 fallout via Mesa, Beignet, Firefox (Stylo), Rust, etc.
Comment 3 Jan Beich freebsd_committer freebsd_triage 2017-08-05 14:07:50 UTC
Comment on attachment 184874 [details]
rc2

Oops, armv6 is busted after https://cgit.freedesktop.org/mesa/mesa/commit/?id=a373f77662c5

=======================<phase: patch          >============================
===>  Patching for mesa-dri-17.2.0.rc2
===>  Applying extra patch /usr/ports/graphics/mesa-dri/files/extra-src_gallium_drivers_vc4_Makefile.in
1 out of 1 hunks failed--saving rejects to src/gallium/drivers/vc4/Makefile.in.rej
*** Error code 1
Comment 4 Jan Beich freebsd_committer freebsd_triage 2017-08-05 15:10:30 UTC
Created attachment 185043 [details]
rc2

The existing NEON fix was incomplete:
- never used on aarch64 or FreeBSD armv6
- pessimized for CPUTYPE > armv7-a (e.g., armv7ve or armv8*)

build logs after:
- head-armv6 - http://sprunge.us/FQET
- head-aarch64 - http://sprunge.us/DhPL
Comment 5 Jan Beich freebsd_committer freebsd_triage 2017-08-05 15:16:38 UTC
Created attachment 185044 [details]
rc2
Comment 6 Jan Beich freebsd_committer freebsd_triage 2017-08-05 15:30:54 UTC
Created attachment 185045 [details]
rc2

Oops, NEON was still disabled on aarch64 but it's not really compatible (see below). Dropping aarch64-specific changes.

In file included from vc4_tiling_lt_neon.c:30:
./vc4_tiling_lt.c:84:27: error: unknown register name 'q0' in asm
                        : "q0", "q1", "q2", "q3");
                          ^
./vc4_tiling_lt.c:106:27: error: unknown register name 'q0' in asm
                        : "q0", "q1", "q2", "q3");
                          ^
./vc4_tiling_lt.c:141:27: error: unknown register name 'q0' in asm
                        : "q0", "q1", "q2", "q3");
                          ^
./vc4_tiling_lt.c:161:27: error: unknown register name 'q0' in asm
                        : "q0", "q1", "q2", "q3");
                          ^
4 errors generated.
Comment 7 Jan Beich freebsd_committer freebsd_triage 2017-08-07 22:44:25 UTC
Created attachment 185138 [details]
rc3 (final)

https://lists.freedesktop.org/archives/mesa-dev/2017-August/165750.html

According the schedule during -rc1 announcement this one is supposed to be final candidate. As usual, tested per comment 0 menu with more focus on armv6/aarch64. MESA_LLVM_VER=50 state is still unknown as devel/llvm-devel is too old.
Comment 8 Jan Beich freebsd_committer freebsd_triage 2017-08-13 01:21:38 UTC
Created attachment 185340 [details]
rc4

https://lists.freedesktop.org/archives/mesa-dev/2017-August/166189.html

- Switch to __ELF_WORD_SIZE for Elf{32,64} types.
Comment 10 Jan Beich freebsd_committer freebsd_triage 2017-09-05 11:21:11 UTC
Created attachment 186074 [details]
release
Comment 11 Val Packett 2017-09-06 21:43:12 UTC
Starting Xorg with 17.2.0 (this "release" patch + Vulkan patch) on amdgpu (Radeon RX 480, 12-CURRENT built today (git rev b2f0b570ad4), drm-next-kmod port) results in glitch art instead of display output and the following text repeatedly spammed into console:

.AMDGPU.config is empty!
radeonsi: cannot read an ELF shader binary
LLVM failed to compile shader

Works fine on Intel Haswell though.
Comment 12 Jan Beich freebsd_committer freebsd_triage 2017-09-07 04:40:57 UTC
(In reply to Greg V from comment #11)
> .AMDGPU.config is empty!
> radeonsi: cannot read an ELF shader binary
> LLVM failed to compile shader

Not sure why mesa-dri-17.1.7 works fine for you despite https://cgit.freedesktop.org/mesa/mesa/commit/?id=c968de198902

Can you try reverting that commit?
Can you try reverting graphics/mesa-dri/files/patch-src_util_build__id.c ?
Can you check if MESA_LLVM_VER=39 is affected as well?
Comment 13 Val Packett 2017-09-07 15:48:11 UTC
(In reply to Jan Beich from comment #12)
MESA_LLVM_VER=39, MESA_LLVM_VER=-devel — same problem. Reverting that commit results in a black screen and then terminal instead of Xorg.

Also just built 17.1.8 from ports… same problem! So it's not 17.2.0 related. Probably some weird incompatibility between downloaded pkgs and ports built on my machine… I've had that kind of issue with Intel in the past.
Comment 14 Val Packett 2017-09-07 17:59:34 UTC
(In reply to Greg V from comment #13)
Okay, so there is some weird problem with builds on my desktop. 17.1.7 built here also glitches.

Took 17.2.0+Vulkan packages built on my laptop and copied them to the desktop — it works!
Comment 15 Jan Beich freebsd_committer freebsd_triage 2017-09-17 09:04:30 UTC
mesa-dri-17.2.0 builds fine against llvm50.
Comment 17 Val Packett 2017-09-18 16:06:31 UTC
Tested 17.2.1 with llvm50 on AMD Polaris10 and Intel Haswell, works fine.
Comment 18 Jan Beich freebsd_committer freebsd_triage 2017-09-21 05:30:46 UTC
No one has tested on current FreeBSD *releases* yet. ports r443828 doesn't inspire confidence *minor* Mesa updates are safe with old kernel DRM code.
Comment 19 Jan Beich freebsd_committer freebsd_triage 2017-09-21 15:38:06 UTC
Carlos, can you check i965 from Mesa 17.2 works fine for you on FreeBSD 10.* ? Try running mpv, chromium and a 3D game.
Comment 20 Jan Beich freebsd_committer freebsd_triage 2017-09-21 15:59:04 UTC
Mikhail, can you check r300 from Mesa 17.2 works fine for you on FreeBSD 10.* ? Try running mplayer (-vo gl), firefox (with/without OpenGL compositing) and a 3D game.
Comment 21 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-09-21 18:24:34 UTC
(In reply to Jan Beich from comment #19)

It works fine for me. Chromium and MPV run properly.

I didn't notice any regression at the moment.
Comment 22 Carlos J. Puga Medina freebsd_committer freebsd_triage 2017-09-21 18:25:27 UTC
Created attachment 186599 [details]
glxinfo-mesa-17.2.1
Comment 23 Jan Beich freebsd_committer freebsd_triage 2017-10-03 05:35:44 UTC
Created attachment 186873 [details]
release, v3

https://lists.freedesktop.org/archives/mesa-dev/2017-October/171348.html

Reminder:
drm-next or drm-next-kmod users may want to build with CFLAGS += -D__DRM_NEXT__ set in either make.conf or Makefile.local. It'd disable some workarounds maintainer added to keep the port working against old DRM kernel code. For one, using EGL with DRI3 can improve performance.
Comment 24 Val Packett 2017-10-04 13:58:38 UTC
(In reply to Jan Beich from comment #23)
Maybe make a port option that adds -D__DRM_NEXT__?
Comment 25 Mikhail T. 2017-10-05 15:35:27 UTC
(In reply to Greg V from comment #24)
> Maybe make a port option that adds -D__DRM_NEXT__?

Why not make a run-time check for whatever functionality is missing or bug present instead?

> using EGL with DRI3 can improve performance.

Looking at the port's patches now, I can see, that EGL can be triggered without recompiling simply by adding LIBGL_DRI3_ENABLE to the environment...
Comment 26 Val Packett 2017-10-05 15:51:57 UTC
(In reply to Mikhail T. from comment #25)
I'm a bit confused here with what y'all are talking about.

DRI3 is the latest X direct rendering protocol. It still works with GLX clients. I have LIBGL_DRI3_ENABLE set, it works.

EGL is the window-system-independent protocol for getting a GL context. It's used by Wayland compositors, Android, demos like kmscube… Is it somehow also usable with DRI3 X clients? And disabling the workarounds should boost performance of *that*?
Comment 27 Mikhail T. 2017-10-05 21:35:39 UTC
The proposed patch (v3) seems to work fine on my machine -- running the "drm-next" branch of FreeBSD-12 with an Intel's video card.
Comment 28 Val Packett 2017-10-10 16:37:08 UTC
17.2.2 landed, without mentioning this bug o_0 https://github.com/freebsd/freebsd-ports/commit/6b976bd6fd2a46321cabe1d1b55c90ea4ec282ee
Comment 29 Conrad Meyer freebsd_committer freebsd_triage 2017-10-10 18:35:44 UTC
(In reply to Greg V from comment #28)
That's r451657 in svn.

Does it resolve the issue adequately?
Comment 30 Val Packett 2017-10-10 19:21:24 UTC
(In reply to Conrad Meyer from comment #29)
Well, yeah, it does upgrade Mesa to 17.2.2 :)

I'm just surprised that it's a slightly different patch than https://bugs.freebsd.org/bugzilla/attachment.cgi?id=186873&action=diff and from a different committer…
Comment 31 Jan Beich freebsd_committer freebsd_triage 2017-10-14 19:09:08 UTC
See bug 219247 comment 8. Let's not speculate why x11@ folks prefer to collaborate outside of public eye.

There's not much point in keeping this bug open. files/patch-src_egl_Makefile.in appears to be no longer required. NEON detection can be fixed in a better way now that we have AT_HWCAP support on -CURRENT.