xref: /aosp_15_r20/external/mesa3d/src/.clang-format (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1
2AlignAfterOpenBracket: true
3AlignConsecutiveMacros: true
4
5AllowAllArgumentsOnNextLine: false
6AllowShortCaseLabelsOnASingleLine: false
7AllowShortFunctionsOnASingleLine: false
8
9AlwaysBreakAfterReturnType: TopLevelDefinitions
10
11BraceWrapping:
12  AfterControlStatement: false
13  AfterEnum: false
14  AfterFunction: true
15  AfterStruct: false
16  BeforeElse: false
17  SplitEmptyFunction: true
18
19BinPackArguments: true
20BinPackParameters: true
21
22BreakBeforeBraces: Custom
23
24ColumnLimit: 0
25PenaltyBreakBeforeFirstCallParameter: 1
26PenaltyExcessCharacter: 100
27
28ContinuationIndentWidth: 3
29IndentWidth: 3
30UseTab: Never
31
32Cpp11BracedListStyle: true
33
34SpaceAfterCStyleCast: false
35SpaceBeforeCpp11BracedList: false
36SpaceBeforeCtorInitializerColon: false
37SpacesInContainerLiterals: false
38
39PointerAlignment: Right
40
41IncludeBlocks: Preserve
42IncludeCategories:
43  - Regex:           '<[[:alnum:].]+>'
44    Priority:        1
45  - Regex:           '.*\/.*'
46    Priority:        2
47  - Regex:           '.*'
48    Priority:        3
49
50ForEachMacros:
51# util
52  - u_foreach_bit
53  - u_foreach_bit64
54
55  - BITSET_FOREACH_SET
56  - BITSET_FOREACH_RANGE
57
58  - hash_table_foreach
59  - hash_table_foreach_remove
60  - hash_table_u64_foreach
61
62  - rb_tree_foreach
63  - rb_tree_foreach_rev
64  - rb_tree_foreach_rev_safe
65  - rb_tree_foreach_safe
66  - uinterval_tree_foreach
67
68  - set_foreach
69  - set_foreach_remove
70
71  - util_dynarray_foreach
72  - util_dynarray_foreach_reverse
73
74  - util_idalloc_foreach
75
76  - LIST_FOR_EACH_ENTRY
77  - LIST_FOR_EACH_ENTRY_FROM
78  - LIST_FOR_EACH_ENTRY_FROM_REV
79  - LIST_FOR_EACH_ENTRY_SAFE
80  - LIST_FOR_EACH_ENTRY_SAFE_REV
81  - list_for_each_entry
82  - list_for_each_entry_from
83  - list_for_each_entry_from_rev
84  - list_for_each_entry_from_safe
85  - list_for_each_entry_rev
86  - list_for_each_entry_rev_safe
87  - list_for_each_entry_safe
88  - list_pair_for_each_entry
89
90  - foreach_in_list
91  - foreach_in_list_reverse
92  - foreach_in_list_reverse_safe
93  - foreach_in_list_safe
94  - foreach_in_list_use_after
95  - foreach_list_typed
96  - foreach_list_typed_from
97  - foreach_list_typed_reverse
98  - foreach_list_typed_reverse_safe
99  - foreach_list_typed_safe
100  - foreach_two_lists
101
102# nir
103  - nir_foreach_function_temp_variable
104  - nir_foreach_function_temp_variable_safe
105  - nir_foreach_image_variable
106  - nir_foreach_image_variable_safe
107  - nir_foreach_shader_in_variable
108  - nir_foreach_shader_in_variable_safe
109  - nir_foreach_shader_out_variable
110  - nir_foreach_shader_out_variable_safe
111  - nir_foreach_uniform_variable
112  - nir_foreach_uniform_variable_safe
113  - nir_foreach_variable
114  - nir_foreach_variable_in_list
115  - nir_foreach_variable_in_list_safe
116  - nir_foreach_variable_in_shader
117  - nir_foreach_variable_in_shader_safe
118  - nir_foreach_variable_safe
119  - nir_foreach_variable_with_modes
120  - nir_foreach_variable_with_modes_safe
121
122  - nir_foreach_reg_decl
123  - nir_foreach_reg_decl_safe
124  - nir_foreach_reg_load
125  - nir_foreach_reg_load_safe
126  - nir_foreach_reg_store
127  - nir_foreach_reg_store_safe
128
129  - nir_foreach_if_use
130  - nir_foreach_if_use_safe
131  - nir_foreach_use
132  - nir_foreach_use_including_if
133  - nir_foreach_use_including_if_safe
134  - nir_foreach_use_safe
135
136  - nir_foreach_phi_src
137  - nir_foreach_phi_src_safe
138
139  - nir_foreach_parallel_copy_entry
140
141  - nir_foreach_instr
142  - nir_foreach_instr_in_worklist
143  - nir_foreach_instr_reverse
144  - nir_foreach_instr_reverse_safe
145  - nir_foreach_instr_safe
146
147  - nir_foreach_phi
148  - nir_foreach_phi_safe
149
150  - nir_foreach_function
151  - nir_foreach_function_safe
152  - nir_foreach_function_with_impl
153
154  - nir_foreach_function_impl
155
156  - nir_foreach_block_unstructured
157  - nir_foreach_block_unstructured_safe
158
159  - nir_foreach_block
160  - nir_foreach_block_in_cf_node
161  - nir_foreach_block_in_cf_node_reverse
162  - nir_foreach_block_reverse
163  - nir_foreach_block_reverse_safe
164  - nir_foreach_block_safe
165
166# egl
167  - egl_relax
168
169# wayland
170  - wl_list_for_each
171  - wl_list_for_each_safe
172  - wl_list_for_each_reverse
173  - wl_list_for_each_reverse_safe
174  - wl_array_for_each
175
176# vulkan
177  - vk_foreach_queue
178  - vk_foreach_queue_safe
179
180  - vk_foreach_struct
181  - vk_foreach_struct_const
182
183  - vk_foreach_multi_draw
184  - vk_foreach_multi_draw_indexed
185
186# asahi
187  - foreach_active
188  - foreach_submitted
189  - hk_foreach_view
190  - hk_foreach_variant
191  - AGX_BATCH_FOREACH_BO_HANDLE
192  - agx_pack
193  - agx_push
194  - agx_usc_pack
195  - agx_ppp_push
196  - agx_ppp_push_merged
197  - agx_foreach_block
198  - agx_foreach_block_safe
199  - agx_foreach_block_from
200  - agx_foreach_block_from_rev
201  - agx_foreach_block_rev
202  - agx_foreach_dest
203  - agx_foreach_dest_rev
204  - agx_foreach_instr_global
205  - agx_foreach_instr_global_rev
206  - agx_foreach_instr_global_safe
207  - agx_foreach_instr_global_safe_rev
208  - agx_foreach_instr_in_block
209  - agx_foreach_instr_in_block_from
210  - agx_foreach_instr_in_block_from_rev
211  - agx_foreach_instr_in_block_rev
212  - agx_foreach_instr_in_block_safe
213  - agx_foreach_instr_in_block_safe_rev
214  - agx_foreach_non_phi_in_block_rev
215  - agx_foreach_phi_in_block
216  - agx_foreach_phi_in_block_safe
217  - agx_foreach_predecessor
218  - agx_foreach_src
219  - agx_foreach_src_rev
220  - agx_foreach_ssa_dest
221  - agx_foreach_ssa_dest_rev
222  - agx_foreach_ssa_src
223  - agx_foreach_ssa_src_rev
224  - agx_foreach_successor
225  - foreach_next_use
226
227# radv
228  - PHASE
229
230# freedreno
231  - ir2_foreach_instr
232  - ir2_foreach_live_reg
233  - ir2_foreach_avail
234  - ir2_foreach_src
235  - foreach_two_lists
236  - foreach_sched_node
237  - foreach_src
238  - foreach_src_n
239  - foreach_src_if
240  - foreach_dst
241  - foreach_dst_n
242  - foreach_dst_if
243  - ra_foreach_dst
244  - ra_foreach_src
245  - ra_foreach_src_rev
246  - foreach_ssa_use
247  - foreach_ssa_srcp_n
248  - foreach_ssa_srcp
249  - foreach_ssa_src_n
250  - foreach_ssa_src
251  - foreach_input_n
252  - foreach_input
253  - foreach_output_n
254  - foreach_output
255  - foreach_instr
256  - foreach_instr_rev
257  - foreach_instr_safe
258  - foreach_instr_from_safe
259  - foreach_block
260  - foreach_block_safe
261  - foreach_block_rev
262  - foreach_array
263  - foreach_array_safe
264  - foreach_name_n
265  - foreach_name
266  - foreach_def
267  - foreach_use
268  - foreach_interval
269  - foreach_interval_safe
270  - foreach_interval_rev
271  - foreach_interval_rev_safe
272  - foreach_batch
273  - foreach_line_in_section
274  - perf_time
275  - perf_time_ctx
276  - foreach_submit
277  - foreach_submit_safe
278  - foreach_instr_rpt
279  - foreach_instr_rpt_excl
280  - foreach_instr_rpt_excl_safe
281
282# Disable clang formatting by default. Drivers that use clang-format
283# inherit from this .clang-format file and re-enable formatting:
284#
285# DisableFormat: false
286#
287DisableFormat: true
288