xref: /aosp_15_r20/external/mesa3d/src/nouveau/nil/cbindgen.toml (revision 6104692788411f58d303aa86923a9ff6ecaded22)
1language = "C"
2
3includes = ["nouveau/headers/nv_device_info.h", "util/format/u_format.h", "drm-uapi/drm_fourcc.h"]
4autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */"
5include_guard = "NIL_H"
6usize_is_size_t = true
7style = "tag"
8
9[export]
10prefix = "nil_"
11renaming_overrides_prefixing = true
12
13# Rename everything from bindgen
14# See https://github.com/mozilla/cbindgen/issues/621
15[export.rename]
16"nv_device_info" = "struct nv_device_info"
17"pipe_format" = "enum pipe_format"
18"pipe_swizzle" = "enum pipe_swizzle"
19"GOB_DEPTH" = "NIL_GOB_DEPTH"
20"GOB_WIDTH_B" = "NIL_GOB_WIDTH_B"
21"MAX_LEVELS" = "NIL_MAX_LEVELS"
22"MAX_DRM_FORMAT_MODS" = "NIL_MAX_DRM_FORMAT_MODS"
23
24# This is annoying. rename_types doesn't seem to work
25"Format" = "nil_format"
26"Image" = "nil_image"
27"ImageDim" = "nil_image_dim"
28"ImageInitInfo" = "nil_image_init_info"
29"ImageLevel" = "nil_image_level"
30"Offset4D" = "nil_offset4d"
31"SampleLayout" = "nil_sample_layout"
32"Tiling" = "nil_tiling"
33"View" = "nil_view"
34"ViewType" = "nil_view_type"
35
36# There's just no good solution for this one
37"ImageUsageFlags" = "nil_image_usage_flags"
38"IMAGE_USAGE_2D_VIEW_BIT" = "NIL_IMAGE_USAGE_2D_VIEW_BIT"
39"IMAGE_USAGE_LINEAR_BIT" = "NIL_IMAGE_USAGE_LINEAR_BIT"
40"IMAGE_USAGE_SPARSE_RESIDENCY_BIT" = "NIL_IMAGE_USAGE_SPARSE_RESIDENCY_BIT"
41
42[macro_expansion]
43bitflags = true # We need this for the bitflags crate
44
45[enum]
46prefix_with_name = true
47rename_variants = "ScreamingSnakeCase"
48