mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-06-19 08:28:21 +02:00
compiler: Generate files with newline at end
These generator scripts use the `write` function that, unlike `print`, doesn't print a trailing newline. So let's add one to the template. Reviewed-by: Faith Ekstrand <faith.ekstrand@collabora.com> Reviewed-by: Marek Olšák <marek.olsak@amd.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/35697>
This commit is contained in:
parent
2ce201707e
commit
6100dbc3d0
3 changed files with 6 additions and 3 deletions
|
|
@ -21,7 +21,8 @@ template = """\
|
|||
extern const struct glsl_type glsl_type_builtin_${t["name"]};
|
||||
%endfor
|
||||
|
||||
#endif /* _BUILTIN_TYPES_ */"""
|
||||
#endif /* _BUILTIN_TYPES_ */
|
||||
"""
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
print('Missing output argument', file=sys.stderr)
|
||||
|
|
|
|||
|
|
@ -45,7 +45,8 @@ typedef enum {
|
|||
|
||||
extern const char *nir_intrinsic_index_names[NIR_INTRINSIC_NUM_INDEX_FLAGS];
|
||||
|
||||
#endif /* _NIR_INTRINSICS_ */"""
|
||||
#endif /* _NIR_INTRINSICS_ */
|
||||
"""
|
||||
|
||||
from nir_intrinsics import INTR_OPCODES, INTR_INDICES
|
||||
from mako.template import Template
|
||||
|
|
|
|||
|
|
@ -69,7 +69,8 @@ nir_intrinsic_has_${name}(const nir_intrinsic_instr *instr)
|
|||
}
|
||||
% endfor
|
||||
|
||||
#endif /* _NIR_INTRINSICS_INDICES_ */"""
|
||||
#endif /* _NIR_INTRINSICS_INDICES_ */
|
||||
"""
|
||||
|
||||
from nir_intrinsics import INTR_INDICES
|
||||
from mako.template import Template
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue