Preface:
The reason I decided to write this guide is because mesa-git always, and I mean, ALWAYS has new and exciting things happening almost weekly as far as driver contributions go. If you are on an intel or amd gpu, or both, you REALLY should be running mesa-git if you’re remotely interested in playing the latest and greatest games via natively or via DXVK+wine or Steam Play/Proton. Note: These instructions should also work on Antergos and Manjaro.

libglvnd:https://github.com/NVIDIA/libglvnd
glvnd is a vendor neutral libgl library that was made by nvidia so that nvidia proprietary drivers can co-exist with mesa on the same system. The use-case for this is usually desktops or laptops with an intel iGPU and an nvidia dGPU. If you are running intel/amd or all amd, you don’t need libglvnd. My reason for removing it was because it causes Dying Light to crash on mesa. Mesa has it’s own version of libgl that it can provide if specified in the config. This is what you want to use.

glxinfo | grep 'OpenGL'
to verify that its using llvm 8.0.0 and mesa 18.3.0

and then:

vulkaninfo | grep "GPU id"
to verify vulkan recognizes your gpu(s)

PART 2: Compiling mesa-git and lib32-mesa-git

Now, if you followed part 1 and don’t care to compile your own packages, that’s it, you’re done!. If you DO want to compile your own mesa packages, here’s how.

First, llvm-svn does not need to be updated very often, maybe once a month. PLEASE KEEP IN MIND: If you update llvm, you either need to ALSO update mesa-git, or recompile mesa-git. What I do is I comment out the repos:

Then, when I want to update llvm, I uncomment the llvm-svn repo, and run sudo pacman -Syu. THEN I recompile mesa-git:yay -S mesa-git lib32-mesa-git

It’s important to note I’m using yay here, so that it compiles the packages from the AUR. Also to be noted is that this will replace your vulkan packages, as the AUR packages build updated vulkan packages. I would run this about once a week.

DO NOT FORGET: If you update llvm in any way, you must also update or compile mesa-git afterwards.

When you do this, it’s going to ask you to replace vulkan-radeon and/or vulkan-intel packages, as well as remove libglvnd. This is because mesa-git provides all of those when compiled from this package, libglvnd being replaced with mesa’s libgl. If compiled from the AUR, it replaces just the vulkan packages.

Lastly, once again run:glxinfo | grep 'OpenGL'
to verify that its using llvm 8.0.0 and mesa 18.3.0