After update graphics/mesa-dri to use llvm90 - crap on screen on ryzen 2200g + amdgu, FreeBSD 12.1 (latest and latest ports).
Rebuilding graphics/mesa-dri with llvm80 fix image on screen.
Created attachment 207677 [details] v1 (In reply to rozhuk.im from comment #0) > ... crap on screen ... Not very detailed. ;) Can you make a screenshot or photo? Besides, run with LIBGL_DEBUG=verbose to try to get Mesa print diagnostics and check if LIBGL_ALWAYS_SOFTWARE=1 is also affected. Since 18.3.2 more HAVE_LLVM >= 0x0900 checks are upstream: 2019-04-17 https://gitlab.freedesktop.org/mesa/mesa/commit/dded2edf8bed (in the patch) 2019-04-29 https://gitlab.freedesktop.org/mesa/mesa/commit/bd4c661ad08e 2019-05-01 https://gitlab.freedesktop.org/mesa/mesa/commit/bfd3d504875a 2019-05-13 https://gitlab.freedesktop.org/mesa/mesa/commit/81fe33735a55 2019-05-13 https://gitlab.freedesktop.org/mesa/mesa/commit/d814c21b1bea 2019-06-12 https://gitlab.freedesktop.org/mesa/mesa/commit/33be5ad8a39a 2019-06-12 https://gitlab.freedesktop.org/mesa/mesa/commit/b519ddc35cf9 2019-07-03 https://gitlab.freedesktop.org/mesa/mesa/commit/594010e366f9 2019-07-07 https://gitlab.freedesktop.org/mesa/mesa/commit/bf1e1a29c301 2019-07-19 https://gitlab.freedesktop.org/mesa/mesa/commit/39d0c68321df (in the patch) 2019-08-02 https://gitlab.freedesktop.org/mesa/mesa/commit/e1c5d8a36490 Does the attached patch help? If not check whether bug 235570 is also affected.
The very same problem seems to have hit here: Upon xinit the screen is garbled. FreeBSD 12.0-RELEASE-p10 GENERIC amd64 and latest ports Error message (repeated in quick succession): LLVM failed to compile shader LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main void ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, i32, i32, i32, i32, [0 x <4 x i32>] addrspace(6)*, i32, i32, i32, i32, i32): unsupported call from graphics shader of functio n llvm.SI.load.const.v4i32 The attached patch did not fix the issue. Tried with software rendering, not affected.
Created attachment 207706 [details] v2 (In reply to freebsdbugs from comment #3) > unsupported call from graphics shader of function llvm.SI.load.const.v4i32 Thanks. It makes the fix obvious. I've also looked at HAVE_LLVM >= 0x0800. 2018-11-28 https://gitlab.freedesktop.org/mesa/mesa/commit/648dc52367c6 (in the patch) 2018-12-20 https://gitlab.freedesktop.org/mesa/mesa/commit/0a7e767e5869 (in the patch) 2018-12-20 https://gitlab.freedesktop.org/mesa/mesa/commit/576040f2e52c 2019-01-14 https://gitlab.freedesktop.org/mesa/mesa/commit/7fbd48fdc084 2019-01-14 https://gitlab.freedesktop.org/mesa/mesa/commit/e4803ab7d2b6 (in the patch) 2019-01-29 https://gitlab.freedesktop.org/mesa/mesa/commit/3e249b853ebb (in the patch) 2019-03-20 https://gitlab.freedesktop.org/mesa/mesa/commit/29132af2347e 2019-03-20 https://gitlab.freedesktop.org/mesa/mesa/commit/30c2aca67f5a 2019-04-10 https://gitlab.freedesktop.org/mesa/mesa/commit/09b4049be358 2019-04-15 https://gitlab.freedesktop.org/mesa/mesa/commit/14f03978ed0e 2019-04-23 https://gitlab.freedesktop.org/mesa/mesa/commit/35cd57df2ef2 2019-05-16 https://gitlab.freedesktop.org/mesa/mesa/commit/b19884e08ed8 2019-06-17 https://gitlab.freedesktop.org/mesa/mesa/commit/b5012a05185c (in the patch) 2019-07-19 https://gitlab.freedesktop.org/mesa/mesa/commit/47dee973292e Does the attached patch help?
If not obvious llvm.SI.load.const.v4i32 is fixed by https://gitlab.freedesktop.org/mesa/mesa/commit/e4803ab7d2b6 I've probably backported more than necessary in hope to fix unreported regressions.
How it should be: http://www.netlab.linkpc.net/download/Me/Private/IMG_20190922_044103.jpg Crap: http://www.netlab.linkpc.net/download/Me/Private/IMG_20190922_044231.jpg http://www.netlab.linkpc.net/download/Me/Private/IMG_20190922_044645.jpg (will remove it on bug close) LIBGL_ALWAYS_SOFTWARE=1 - yes, this helps! LIBGL_DEBUG=verbose ============================================================= LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main <{ i32, i32, i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }> ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, float, i32, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, i32, i32, float, i32): unsupported call from graphics shader of function llvm.SI.load.const.v4i32 LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main <{ i32, i32, i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }> ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, float, i32, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, i32, i32, float, i32): unsupported call from graphics shader of function llvm.SI.load.const.v4i32 ... LLVM failed to compile shader radeonsi: can't compile a main shader part LLVM failed to compile shader radeonsi: can't compile a main shader part LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main <{ i32, i32, i32, i32, i32, float, float, float, float, float, float, float, float, float, float, float, float, float, float, float }> ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, float, i32, <2 x i32>, <2 x i32>, <2 x i32>, <3 x i32>, <2 x i32>, <2 x i32>, <2 x i32>, float, float, float, float, float, i32, i32, float, i32): unsupported call from graphics shader of function llvm.SI.load.const.v4i32 ... LLVM failed to compile shader LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main void ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, i32, i32, i32, i32, [0 x <4 x i32>] addrspace(6)*, i32, i32, i32, i32, i32, i32, i32): unsupported call from graphics shader of function llvm.SI.load.const.v4i32 ... LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main void ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, i32, i32, i32, i32, [0 x <4 x i32>] addrspace(6)*, i32, i32, i32, i32, i32, i32): unsupported call from graphics shader of function llvm.SI.load.const.v4i32 LLVM triggered Diagnostic Handler: <unknown>:0:0: in function main void ([0 x <4 x i32>] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, [0 x float] addrspace(6)*, [0 x <8 x i32>] addrspace(6)*, i32, i32, i32, i32, [0 x <4 x i32>] addrspace(6)*, i32, i32, i32, i32, i32, i32, i32): unsupported call from graphics shader of function llvm.SI.load.const.v4i32 ... ============================================================= Patch - work. (I remove LIBGL_ALWAYS_SOFTWARE=1 then check) PS: EXTRAS - if unset in lang/llvm90 then got error: pkg-static: Unable to access file /tmp/ports/usr/ports/devel/llvm90/work/stage/usr/local/llvm90/bin/clangd:No such file or directory
To confirm, patch v2 resolves the issue. Thank you!
A commit references this bug: Author: jbeich Date: Sun Sep 22 10:21:11 UTC 2019 New revision: 512573 URL: https://svnweb.freebsd.org/changeset/ports/512573 Log: graphics/mesa-dri: fix rendering glitches on AMD GPUs after r512440 PR: 240722 Reported by: rozhuk.im@gmail.com, freebsdbugs@urisc.net Tested by: rozhuk.im@gmail.com, freebsdbugs@urisc.net Obtained from: upstream Approved by: portmgr blanket Changes: head/graphics/mesa-dri/Makefile head/graphics/mesa-dri/files/patch-0a7e767 head/graphics/mesa-dri/files/patch-39d0c68 head/graphics/mesa-dri/files/patch-3e249b8 head/graphics/mesa-dri/files/patch-648dc52 head/graphics/mesa-dri/files/patch-b5012a0 head/graphics/mesa-dri/files/patch-dded2ed head/graphics/mesa-dri/files/patch-e4803ab
Thanks for the quick feedback. Expect the fix in binary packages from Tuesday on. Hopefully, ~1 week is enough to stabilize before 2019Q4 branches.
(In reply to rozhuk.im from comment #6) > PS: EXTRAS - if unset in lang/llvm90 then got error: > pkg-static: Unable to access file /tmp/ports/usr/ports/devel/llvm90/work/stage/usr/local/llvm90/bin/clangd:No such file or directory File a separate bug to let brooks@ investigate. Neither me nor x11@ maintain devel/llvm* ports.
I know this is closed, but it seems to me that 1 week before the branch point while there's a BSD conference going on is an unwise time to try to throw the switch on the compiler version change. We're now in un-planned fired rill mode, and that's quite disrespectful of people's time and borders on abuse, imho. Jan, please consider how your actions affect others more in the future because this sort of behavior is the kind of friction that the core team is trying to reduce.
(In reply to Jan Beich from comment #9) Thanks!