17ec681f3Smrg 27ec681f3Smrg# TODO: Inherit Style from RADV when Clang 13 is default. 37ec681f3Smrg# BasedOnStyle: InheritParentConfig 47ec681f3Smrg 57ec681f3Smrg# Copied from /src/amd/.clang-format 67ec681f3Smrg# ACO specific rules can be found below 77ec681f3SmrgAlignAfterOpenBracket: true 87ec681f3SmrgAlignConsecutiveMacros: true 97ec681f3SmrgAllowAllArgumentsOnNextLine: false 107ec681f3SmrgAllowShortCaseLabelsOnASingleLine: false 117ec681f3SmrgAllowShortFunctionsOnASingleLine: false 127ec681f3SmrgAlwaysBreakAfterReturnType: TopLevelDefinitions 137ec681f3SmrgBasedOnStyle: LLVM 147ec681f3SmrgBraceWrapping: 157ec681f3Smrg AfterControlStatement: false 167ec681f3Smrg AfterEnum: false 177ec681f3Smrg AfterFunction: true 187ec681f3Smrg AfterStruct: false 197ec681f3Smrg BeforeElse: false 207ec681f3Smrg SplitEmptyFunction: true 217ec681f3SmrgBinPackArguments: true 227ec681f3SmrgBinPackParameters: true 237ec681f3SmrgBreakBeforeBraces: Custom 247ec681f3SmrgColumnLimit: 100 257ec681f3SmrgContinuationIndentWidth: 3 267ec681f3SmrgCpp11BracedListStyle: false 277ec681f3SmrgCpp11BracedListStyle: true 287ec681f3SmrgForEachMacros: 297ec681f3Smrg - LIST_FOR_EACH_ENTRY 307ec681f3Smrg - LIST_FOR_EACH_ENTRY_SAFE 317ec681f3Smrg - foreach_list_typed 327ec681f3Smrg - util_dynarray_foreach 337ec681f3Smrg - nir_foreach_variable 347ec681f3Smrg - nir_foreach_variable_safe 357ec681f3Smrg - nir_foreach_register 367ec681f3Smrg - nir_foreach_register_safe 377ec681f3Smrg - nir_foreach_use 387ec681f3Smrg - nir_foreach_use_safe 397ec681f3Smrg - nir_foreach_if_use 407ec681f3Smrg - nir_foreach_if_use_safe 417ec681f3Smrg - nir_foreach_def 427ec681f3Smrg - nir_foreach_def_safe 437ec681f3Smrg - nir_foreach_phi_src 447ec681f3Smrg - nir_foreach_phi_src_safe 457ec681f3Smrg - nir_foreach_parallel_copy_entry 467ec681f3Smrg - nir_foreach_instr 477ec681f3Smrg - nir_foreach_instr_reverse 487ec681f3Smrg - nir_foreach_instr_safe 497ec681f3Smrg - nir_foreach_instr_reverse_safe 507ec681f3Smrg - nir_foreach_function 517ec681f3Smrg - nir_foreach_block 527ec681f3Smrg - nir_foreach_block_safe 537ec681f3Smrg - nir_foreach_block_reverse 547ec681f3Smrg - nir_foreach_block_reverse_safe 557ec681f3Smrg - nir_foreach_block_in_cf_node 567ec681f3Smrg - nir_foreach_shader_in_variable 577ec681f3Smrg - nir_foreach_shader_out_variable_safe 587ec681f3Smrg - nir_foreach_variable_in_list 597ec681f3Smrg - nir_foreach_src 607ec681f3Smrg - foreach_two_lists 617ec681f3Smrg - foreach_bit 627ec681f3Smrg - foreach_sched_node 637ec681f3Smrg - foreach_src 647ec681f3Smrg - foreach_src_n 657ec681f3Smrg - foreach_ssa_use 667ec681f3Smrg - foreach_ssa_srcp_n 677ec681f3Smrg - foreach_ssa_srcp 687ec681f3Smrg - foreach_ssa_src_n 697ec681f3Smrg - foreach_ssa_src 707ec681f3Smrg - foreach_input_n 717ec681f3Smrg - foreach_input 727ec681f3Smrg - foreach_output_n 737ec681f3Smrg - foreach_output 747ec681f3Smrg - foreach_instr 757ec681f3Smrg - foreach_instr_rev 767ec681f3Smrg - foreach_instr_safe 777ec681f3Smrg - foreach_block 787ec681f3Smrg - foreach_block_safe 797ec681f3Smrg - foreach_block_rev 807ec681f3Smrg - foreach_array 817ec681f3Smrg - foreach_array_safe 827ec681f3Smrg - foreach_name_n 837ec681f3Smrg - foreach_name 847ec681f3Smrg - foreach_def 857ec681f3Smrg - foreach_use 867ec681f3Smrg - set_foreach 877ec681f3Smrg 887ec681f3SmrgIncludeBlocks: Preserve 897ec681f3SmrgIncludeCategories: 907ec681f3Smrg - Regex: '<[[:alnum:].]+>' 917ec681f3Smrg Priority: 1 927ec681f3Smrg - Regex: '.*\/.*' 937ec681f3Smrg Priority: 2 947ec681f3Smrg - Regex: '.*' 957ec681f3Smrg Priority: 3 967ec681f3SmrgIndentWidth: 3 977ec681f3SmrgPenaltyBreakBeforeFirstCallParameter: 1 987ec681f3SmrgPenaltyExcessCharacter: 100 997ec681f3SmrgSpaceAfterCStyleCast: false 1007ec681f3SmrgSpaceBeforeCpp11BracedList: false 1017ec681f3SmrgSpaceBeforeCtorInitializerColon: false 1027ec681f3SmrgSpacesInContainerLiterals: false 1037ec681f3Smrg 1047ec681f3Smrg 1057ec681f3Smrg# ACO clang-format rules: 1067ec681f3SmrgLanguage: Cpp 1077ec681f3SmrgStandard: c++14 1087ec681f3Smrg 1097ec681f3Smrg# Force pointers to the type for C++ 1107ec681f3SmrgDerivePointerAlignment: false 1117ec681f3SmrgPointerAlignment: Left 1127ec681f3Smrg 1137ec681f3Smrg# Same effect as IndentAccessModifiers: False 1147ec681f3SmrgAccessModifierOffset: -3 1157ec681f3Smrg 1167ec681f3Smrg# Compact some cumbersome C++ code 1177ec681f3SmrgSpaceBeforeCtorInitializerColon: True 1187ec681f3SmrgAllowShortCaseLabelsOnASingleLine: True 1197ec681f3SmrgAllowShortFunctionsOnASingleLine: InlineOnly 1207ec681f3SmrgAllowShortBlocksOnASingleLine: Empty 1217ec681f3SmrgAllowShortLambdasOnASingleLine: All 1227ec681f3Smrg 1237ec681f3Smrg# Wrap before LambdaBody and disable SplitEmptyFunction 1247ec681f3SmrgBraceWrapping: 1257ec681f3Smrg AfterControlStatement: false 1267ec681f3Smrg AfterEnum: false 1277ec681f3Smrg AfterFunction: true 1287ec681f3Smrg AfterStruct: false 1297ec681f3Smrg BeforeElse: false 1307ec681f3Smrg SplitEmptyFunction: false 1317ec681f3Smrg SplitEmptyRecord: false 1327ec681f3Smrg BeforeLambdaBody: true 1337ec681f3Smrg 1347ec681f3Smrg# Regroup #include blocks 1357ec681f3SmrgIncludeBlocks: Regroup 1367ec681f3SmrgIncludeCategories: 1377ec681f3Smrg - Regex: '"aco.*' 1387ec681f3Smrg Priority: 1 1397ec681f3Smrg - Regex: '"(common|llvm|vulkan)\/.*' 1407ec681f3Smrg Priority: 2 1417ec681f3Smrg - Regex: '"(nir|util\/).*' 1427ec681f3Smrg Priority: 3 1437ec681f3Smrg - Regex: '.*\/.*' 1447ec681f3Smrg Priority: 4 1457ec681f3Smrg - Regex: '.*' 1467ec681f3Smrg Priority: 5 1477ec681f3Smrg 148