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"GOBType" = "nil_gob_type" 27"Image" = "nil_image" 28"ImageDim" = "nil_image_dim" 29"ImageInitInfo" = "nil_image_init_info" 30"ImageLevel" = "nil_image_level" 31"Offset4D" = "nil_offset4d" 32"SampleLayout" = "nil_sample_layout" 33"SampleOffset" = "nil_sample_offset" 34"Tiling" = "nil_tiling" 35"View" = "nil_view" 36"ViewType" = "nil_view_type" 37 38# There's just no good solution for this one 39"ImageUsageFlags" = "nil_image_usage_flags" 40"IMAGE_USAGE_2D_VIEW_BIT" = "NIL_IMAGE_USAGE_2D_VIEW_BIT" 41"IMAGE_USAGE_LINEAR_BIT" = "NIL_IMAGE_USAGE_LINEAR_BIT" 42"IMAGE_USAGE_SPARSE_RESIDENCY_BIT" = "NIL_IMAGE_USAGE_SPARSE_RESIDENCY_BIT" 43 44[macro_expansion] 45bitflags = true # We need this for the bitflags crate 46 47[enum] 48prefix_with_name = true 49rename_variants = "ScreamingSnakeCase" 50