How to set Mesa's ACO compiler as default system-wide?

quick question: is there any way to set mesa to use ACO instead of LLVM globally, unless specified per-application to use LLVM?
i find it slightly annoying having to remember to add RADV_PERFTEST=aco before my 3D applications.

You could set it in /etc/profile or your ~/.bashrc

Just do export RADV_PERFTEST=aco

5 Likes

I often also do mesa_glthread=true to enable OpenGL multithreading.

Might be a stupid question but what is ACO and what are the advantages over LLVM?
asking for a friend

Faster compile time for shaders. The freezing with LLVM compiling shaders is cut down by quite a bit on ACO.

1 Like

Mh never really had many issues with LLVM so far, but haven’t heard of ACO either.

Might look into it at some point.

1 Like

aco stands for Amd COmpiler. it makes 3D applications perforn alot better than llvm. at least, in the vast majority of applications

Mh, wondering why ACO doesn’t come by default then considering AMD is also working on Mesa :thinking:

Is it this here:
https://www.phoronix.com/scan.php?page=article&item=epyc-7742-compilers&num=1

If so it seems AOCC is “just” a modified LLVM?

No, it’s a Valve endorsed graphics compiler specifically for Vulkan shader compilation.

2 Likes

ACO isn’t default yet because it is not finished yet.
its not perfectly stable, doesn’t support as much hardware as LLVM, and doesn’t always outperform LLVM.

I’d imagine that in the future, once ACO comes closer to being finished and supports far more hardware, it will become the default.

1 Like

OK Valve was the keyword to find this apparently :stuck_out_tongue:

https://www.phoronix.com/scan.php?page=news_item&px=Mesa-19.3-Lands-RADV-ACO

i know ACO’s improvements are most pronounced with Vulkan, but i have noticed improvements in OpenGL applications as well.

With Valve behind the effort, I expect to see the same level of support it gives DXVK to also be present and DXVK has come a long way since Valve basically hired the guy that made it.

1 Like

Well seems interesting at least, might try it out later. Though I’m not sure which Mesa I’m currently at… might even be 19.3.

If you need a stable Mesa to test, use ppa:kisak/kisak-mesa if you’re on Ubuntu. That’s the latest stable Mesa with ACO. You will need an environment variable in place to activate it though: RADV_PERFTEST=aco

1 Like

I’m on Fedora, so gonna see how it works out. Read about the Env-Variable :slight_smile:

On Fedora, you could look up GloriousEggroll’s Fsync kernels and updated Mesas and fsync libc versions:

https://www.patreon.com/posts/fedora-packages-29302167

1 Like

I’ll look into it, though I prefer staying on official Distro sources if possible (even if it means maybe missing out on something for a while).