Skip to content

treewide: run clang-format on everything

He Haocheng requested to merge hch12907/mesa-demos:clang-format into main

The .clang-format config file was based on the ones deployed by src/amd & src/asahi in Mesa.

I removed the foreach configs (since it's obvious that we are not going to use nir_foreach_* here...), and made some changes to the #include order sorting.

Afterwards it was just a matter of running this command:

clang-format --style=file -i $(find src -type f -name "*.cpp" -o -name "*.c" -o -name "*.h")

and do some manual interventions, like reformatting the EGL/GLX attrib arrays.

Edited by He Haocheng

Merge request reports