Getting the new mesa-aco from Valve using Toolbox and without replacing system libs

Hello there!

I was looking into giving a try to the new mesa-aco from Valve. For those who don’t know it, is a fork of mesa with some improvements on AMD hardware regarding shader caching and in some cases even the framerate.

I actually build it myself inside a toolbox, which means that my Fedora Workstation is still clean from all the build dependencies and it still uses the regular and stable mesa that comes with it for the rest of the system. This should work on both Workstation and Silverblue.

  1. Clone the repository: git clone ~/mesa-aco
  2. Create a Toolbox, I actually did one just for mesa-aco building with toolbox create -c mesa-aco-toolbox
  3. Enter the Toolbox with toolbox enter -c mesa-aco-toolbox
  4. Get all the build dependencies inside the toolbox: sudo dnf install meson gcc g++ libdrm-devel zlib-devel expat-devel llvm-devel elfutils-libelf-devel wayland-devel wayland-protocols-devel libxcb-devel libX11-devel libxshmfence-devel libXrandr-devel gettext-devel glslang-devel bison flex
  5. Move to the mesa-aco dir cd ~/mesa-aco
  6. Build it: meson -Dbuildtype=release -Db_ndebug=true -Dplatforms=x11,wayland,drm,surfaceless -Ddri-drivers= -Dgallium-drivers= -Dvulkan-drivers=amd -Ddri3=true -Degl=false -Dgallium-nine=false -Dglvnd=false -Dglx=disabled -Dllvm=true -Dvulkan-overlay-layer=true -Dtools= -Dlmsensors=false build
  7. ninja -C build

To use it on any program:
VK_ICD_FILENAMES=~/mesa-aco/build/src/amd/vulkan/dev_icd.json program

To use it on a Steam game, go into the launch options of the game on it’s properties and put VK_ICD_FILENAMES=~/mesa-aco/build/src/amd/vulkan/dev_icd.json %command%

This instructions are based on this Reddit Post. I just added the toolbox layer (Which was pretty easy) and figured out the build dependencies (This is what actually took me time).

Hoping this is usefull for any Fedora gamer out there!

In this way you can use it without messing around with your system native mesa version and without all those build packages around :slight_smile:


So… I’ve been giving Silverblue (And the Steam Flatpak version) a try these days and couldn’t get his working. Seems like there is some problem just like with the controllers. The Steam client has access to it, but then the games don’t.

Can anyone help me figuring out how to fix it?

I can’t open github right now (special proxy) but there are a few cases if you search for steam inside flatpak’s issues as well as in the steam recipe repo for flatpak. For example there is some special environment flatpak variable to get Civ6 working on Flatpak steam…