Module: Mesa Branch: main Commit: b56b30b20d9c0ac83dbe5bce90f9cf025e614b11 URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=b56b30b20d9c0ac83dbe5bce90f9cf025e614b11
Author: Konstantin Seurer <[email protected]> Date: Fri May 26 21:36:37 2023 +0200 freedreno: Use the Mesa base style Acked-by: Alyssa Rosenzweig <[email protected]> Reviewed-by: Eric Engestrom <[email protected]> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23275> --- src/freedreno/.clang-format | 137 +------------------------------------ src/freedreno/vulkan/.clang-format | 18 ++--- 2 files changed, 8 insertions(+), 147 deletions(-) diff --git a/src/freedreno/.clang-format b/src/freedreno/.clang-format index d783419a34b..3036a9d696d 100644 --- a/src/freedreno/.clang-format +++ b/src/freedreno/.clang-format @@ -1,137 +1,6 @@ -AlignAfterOpenBracket: true -AlignConsecutiveMacros: true + +BasedOnStyle: InheritParentConfig + AlignConsecutiveBitFields: true -AllowAllArgumentsOnNextLine: false -AllowShortCaseLabelsOnASingleLine: false -AllowShortFunctionsOnASingleLine: false -AlwaysBreakAfterReturnType: TopLevelDefinitions -BasedOnStyle: LLVM -BraceWrapping: - AfterControlStatement: false - AfterEnum: false - AfterFunction: true - AfterStruct: false - BeforeElse: false - SplitEmptyFunction: true -BinPackArguments: true -BinPackParameters: true -BreakBeforeBraces: Custom ColumnLimit: 80 -ContinuationIndentWidth: 3 -Cpp11BracedListStyle: false -Cpp11BracedListStyle: true BreakStringLiterals: false -ForEachMacros: - - BITSET_FOREACH_SET - - BITSET_FOREACH_RANGE - - LIST_FOR_EACH_ENTRY - - LIST_FOR_EACH_ENTRY_SAFE - - LIST_FOR_EACH_ENTRY_SAFE_REV - - list_for_each_entry - - list_for_each_entry_safe - - list_for_each_entry_rev - - list_for_each_entry_rev_safe - - list_for_each_entry_from - - list_for_each_entry_from_rev - - foreach_list_typed - - u_foreach_bit - - util_dynarray_foreach - - rb_tree_foreach - - rb_tree_foreach_safe - - nir_foreach_variable - - nir_foreach_variable_safe - - nir_foreach_uniform_variable - - nir_foreach_uniform_variable_safe - - nir_foreach_register - - nir_foreach_register_safe - - nir_foreach_use - - nir_foreach_use_safe - - nir_foreach_if_use - - nir_foreach_if_use_safe - - nir_foreach_def - - nir_foreach_def_safe - - nir_foreach_phi_src - - nir_foreach_phi_src_safe - - nir_foreach_parallel_copy_entry - - nir_foreach_instr - - nir_foreach_instr_reverse - - nir_foreach_instr_safe - - nir_foreach_instr_reverse_safe - - nir_foreach_instr_from_safe - - nir_foreach_function - - nir_foreach_block - - nir_foreach_block_safe - - nir_foreach_block_reverse - - nir_foreach_block_reverse_safe - - nir_foreach_block_in_cf_node - - nir_foreach_shader_in_variable - - nir_foreach_shader_out_variable_safe - - nir_foreach_variable_in_list - - nir_foreach_variable_with_modes_safe - - nir_foreach_variable_with_modes - - nir_foreach_shader_out_variable - - ir2_foreach_instr - - ir2_foreach_live_reg - - ir2_foreach_avail - - ir2_foreach_src - - foreach_two_lists - - foreach_bit - - foreach_sched_node - - foreach_src - - foreach_src_n - - foreach_dst - - foreach_dst_n - - ra_foreach_dst - - ra_foreach_src - - ra_foreach_src_rev - - foreach_ssa_use - - foreach_ssa_srcp_n - - foreach_ssa_srcp - - foreach_ssa_src_n - - foreach_ssa_src - - foreach_input_n - - foreach_input - - foreach_output_n - - foreach_output - - foreach_instr - - foreach_instr_rev - - foreach_instr_safe - - foreach_instr_from_safe - - foreach_block - - foreach_block_safe - - foreach_block_rev - - foreach_array - - foreach_array_safe - - foreach_name_n - - foreach_name - - foreach_def - - foreach_use - - foreach_interval - - foreach_interval_safe - - foreach_interval_rev - - foreach_interval_rev_safe - - foreach_batch - - hash_table_foreach - - set_foreach - - foreach_line_in_section - - perf_time - - perf_time_ctx - - foreach_submit - - foreach_submit_safe - -IncludeBlocks: Preserve -IncludeCategories: - - Regex: '<[[:alnum:].]+>' - Priority: 1 - - Regex: '.*\/.*' - Priority: 2 - - Regex: '.*' - Priority: 3 -IndentWidth: 3 -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyExcessCharacter: 100 -SpaceAfterCStyleCast: false -SpaceBeforeCpp11BracedList: false -SpaceBeforeCtorInitializerColon: false -SpacesInContainerLiterals: false - diff --git a/src/freedreno/vulkan/.clang-format b/src/freedreno/vulkan/.clang-format index 4b63a08d7ad..15354909bee 100644 --- a/src/freedreno/vulkan/.clang-format +++ b/src/freedreno/vulkan/.clang-format @@ -1,17 +1,11 @@ -BasedOnStyle: LLVM + +BasedOnStyle: InheritParentConfig + AlwaysBreakAfterReturnType: TopLevel BinPackParameters: false -BraceWrapping: - AfterControlStatement: false - AfterEnum: true - AfterFunction: true - AfterStruct: true - BeforeElse: false - SplitEmptyFunction: true -BreakBeforeBraces: Custom ColumnLimit: 78 -ContinuationIndentWidth: 3 Cpp11BracedListStyle: false + IncludeBlocks: Regroup IncludeCategories: - Regex: '^"tu_common.h"$' @@ -24,8 +18,6 @@ IncludeCategories: Priority: 2 - Regex: '.*' Priority: 1 -IndentWidth: 3 -PenaltyBreakBeforeFirstCallParameter: 1 -PenaltyExcessCharacter: 100 + SpaceAfterCStyleCast: true SpaceBeforeCpp11BracedList: true
