mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-05 16:08:04 +02:00
nir/builder_opcodes: Do not generate empty intrinsic indices
Gets rid of all the
struct nir_*_indices {
int _; /* exists to avoid empty initializers */
};
declarations. 14293 loc -> 12900 loc
Reviewed-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Reviewed-by: Friedrich Vock <friedrich.vock@gmx.de>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23906>
This commit is contained in:
parent
e379b9ad8c
commit
82aaf1893d
1 changed files with 2 additions and 0 deletions
|
|
@ -62,12 +62,14 @@ nir_${name}(nir_builder *build, ${src_decl_list(opcode.num_inputs)})
|
|||
% endfor
|
||||
|
||||
% for name, opcode in sorted(INTR_OPCODES.items()):
|
||||
% if opcode.indices:
|
||||
struct _nir_${name}_indices {
|
||||
int _; /* exists to avoid empty initializers */
|
||||
% for index in opcode.indices:
|
||||
${index.c_data_type} ${index.name};
|
||||
% endfor
|
||||
};
|
||||
% endif
|
||||
% endfor
|
||||
|
||||
<%
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue