Skip to content

treewide: Add a .clang-format file

Add a Mesa base style instead of copying the same rules multiple times.
This is especially annoying with foreach macros, where every
.clang-format file maintains it's own incomplete list of the same
macros.

Adding a tree wide .clang-format allows other drivers to derive their
code style from whatever is considered default Mesa style.

Since clang-format doesn't allow us to derive ForEachMacros, driver
specific foreach macros have to be added to the common file.

Having a tree wide clang format should also help (new) contributers with
working oin parts of the tree that don't have their own .clang-format
file. (With regards to code formatting)

Merge request reports